fix: isolate panel state between SubAgentFlowDialog and main canvas#323
Merged
breaking-brake merged 2 commits intomainbreaking-brake/cc-wf-studio:mainfrom Dec 23, 2025
fix/subagent-flow-panel-state-isolationbreaking-brake/cc-wf-studio:fix/subagent-flow-panel-state-isolationCopy head branch name to clipboard
Merged
fix: isolate panel state between SubAgentFlowDialog and main canvas#323breaking-brake merged 2 commits intomainbreaking-brake/cc-wf-studio:mainfrom fix/subagent-flow-panel-state-isolationbreaking-brake/cc-wf-studio:fix/subagent-flow-panel-state-isolationCopy head branch name to clipboard
breaking-brake merged 2 commits intomainbreaking-brake/cc-wf-studio:mainfrom
fix/subagent-flow-panel-state-isolationbreaking-brake/cc-wf-studio:fix/subagent-flow-panel-state-isolationCopy head branch name to clipboard
Conversation
- Add local state management for PropertyOverlay and RefinementChatPanel in SubAgentFlowDialog - Add overrideSelectedNodeId and onClose props to PropertyOverlay component - Reset local panel state when dialog closes - Prevents duplicate panel display when selecting nodes in SubAgentFlowDialog 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add RefinementChatState type for controlled component pattern - Add useLocalRefinementChatState hook for local chat state management - Make RefinementChatPanel a controlled component accepting chatState props - Add ensureActiveWorkflow to handle manually created workflows - Fixes issue where SubAgentFlow AI editing synced with main workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Merged
braking-brake-semantic-release Bot
pushed a commit
that referenced
this pull request
Dec 23, 2025
## [3.9.1](v3.9.0...v3.9.1) (2025-12-23) ### Bug Fixes * isolate panel state between SubAgentFlowDialog and main canvas ([#323](#323)) ([a1c9d7e](a1c9d7e)) * resolve dialog z-index stacking issue in SubAgentFlowDialog ([#322](#322)) ([7eb6b0c](7eb6b0c)) * resolve gap between node palette and canvas in compact mode ([#311](#311)) ([8d6ec52](8d6ec52)) ### Improvements * fix tour Load button focus and add Run step ([#312](#312)) ([9ac27ab](9ac27ab)) * refine AI editing panel layout with overlay separation ([#321](#321)) ([9c30e4e](9c30e4e))
|
🎉 This PR is included in version 3.9.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
SubAgentFlowDialog panels were not properly isolated from the main workflow canvas:
Issue 1: Panel Display Synchronization
When opening PropertyOverlay or RefinementChatPanel in SubAgentFlowDialog, they would also open on the main canvas due to shared global state.
Issue 2: Chat History Synchronization
AI editing chat history in SubAgentFlowDialog was synced with main workflow. Opening AI editing in SubAgentFlow would overwrite the main workflow's conversation history in the global refinement store.
Issue 3: Send Button Not Working
In SubAgentFlowDialog, clicking the send button in AI editing did nothing unless the main workflow's AI editing chat had been opened first. This was because
activeWorkflowwas null for manually created workflows.Solution
Panel State Isolation
localSelectedNodeId,isLocalPropertyOverlayOpen,isLocalRefinementPanelOpen) to SubAgentFlowDialogoverrideSelectedNodeIdprop to PropertyOverlay for local controlChat History Isolation (Controlled Component Pattern)
RefinementChatStatetype for shared state interfaceuseLocalRefinementChatStatehook for local chat state management (~230 lines)RefinementChatPanelto be a controlled component acceptingchatStatepropsmainChatStatefrom the existing refinement storeactiveWorkflow Initialization
ensureActiveWorkflow()function to workflow-storehandleToggleAiEditModeto ensureactiveWorkflowexists before AI editingChanges
New Files
src/webview/src/types/refinement-chat-state.ts- Shared state type definitionsrc/webview/src/hooks/useLocalRefinementChatState.ts- Local chat state hookModified Files
SubAgentFlowDialog.tsx- Local panel state + hook usage + ensureActiveWorkflow callPropertyOverlay.tsx- AddedoverrideSelectedNodeIdprop supportRefinementChatPanel.tsx- Controlled component withchatStatepropMessageList.tsx/MessageInput.tsx- Controlled mode supportApp.tsx- BuildmainChatStatefrom refinement storeworkflow-store.ts- AddedensureActiveWorkflowfunctionImpact
Testing
🤖 Generated with Claude Code