chore: fix dataReady for settings page

This commit is contained in:
Abhishek Kumar 2026-04-08 20:18:22 +05:30
parent 6968d20eff
commit c9102ca157
2 changed files with 3 additions and 8 deletions

View file

@ -759,11 +759,6 @@ function WorkflowSettingsContent({
return () => observer.disconnect();
}, []);
// Sections are gated on configurations being present in the store.
// After mount, initializeWorkflow runs in a useEffect — the first render
// may still have stale store data, but the next tick corrects it.
const dataReady = !!workflowConfigurations;
return (
<div className="min-h-screen">
{/* Sticky header */}
@ -785,7 +780,7 @@ function WorkflowSettingsContent({
<div className="mx-auto flex max-w-5xl gap-8 px-6 py-8">
{/* Sections */}
<div className="min-w-0 flex-1 space-y-8">
{dataReady && (
{workflowConfigurations && (
<>
{/* General */}
<GeneralSection

View file

@ -112,7 +112,7 @@ export const useWorkflowStore = create<WorkflowStore>((set, get) => ({
isAddNodePanelOpen: false,
workflowValidationErrors: [],
templateContextVariables: {},
workflowConfigurations: DEFAULT_WORKFLOW_CONFIGURATIONS,
workflowConfigurations: null,
dictionary: '',
rfInstance: null,
@ -393,7 +393,7 @@ export const useWorkflowStore = create<WorkflowStore>((set, get) => ({
isAddNodePanelOpen: false,
workflowValidationErrors: [],
templateContextVariables: {},
workflowConfigurations: DEFAULT_WORKFLOW_CONFIGURATIONS,
workflowConfigurations: null,
dictionary: '',
rfInstance: null,
});