Repository navigation
fix(acp): retain plan progress across session switches - #3040
Merged
Merged
Conversation
Keep the latest ACP plan in session-keyed runtime state and receive updates independently of the active composer. Clear matching plans on turn completion, cancellation, failure, and listener teardown.
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.
Summary
Switching away from an active ACP session cleared its plan, and returning to the session left the panel empty until another plan update arrived.
Keep the latest plan in session-keyed runtime state and receive updates through the global chat listener lifecycle. The composer reads the current session's latest plan. Completion, cancellation, and failure clear only the matching turn; listener teardown clears the cache. No persisted format or ACP protocol changes are introduced.
Verification
pnpm run check:webpassed.pnpm --dir src/web-ui exec vitest run src/flow_chat/hooks/useAcpPlan.test.ts src/app/services/sessionSceneLifecycle.test.ts src/flow_chat/services/sessionActivation.test.ts src/flow_chat/services/storeSync.test.ts src/app/stores/sceneStore.test.tspassed: 60 tests across 5 files.Automated validation was local; remote workspace, remote control, peer-device, and detached-dispatch scenarios were not exercised.