Skip to content

fix(acp): retain plan progress across session switches - #3040

Merged
wgqqqqq merged 1 commit into
GCWing:mainfrom
guantw:fix/acp-plan-session-state
Sep 15, 2026
Merged

wgqqqqq merged 1 commit into
GCWing:mainfrom
guantw:fix/acp-plan-session-state

Conversation

@guantw

@guantw guantw commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

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:web passed.
  • 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.ts passed: 60 tests across 5 files.
  • Coverage includes session switching, updates while the view is unmounted, terminal-event cleanup, and protection from an older turn clearing a newer plan.

Automated validation was local; remote workspace, remote control, peer-device, and detached-dispatch scenarios were not exercised.

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.
@wgqqqqq
wgqqqqq merged commit bedf3d8 into GCWing:main Sep 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants