fix: port shared review and ACP lifecycle fixes - #2903
Open
guantw wants to merge 5 commits into
Open
Conversation
Swap agent canvas snapshots synchronously during workspace activation before opening the target review tab. Deduplicate repeated workspace notifications and cover the ordering with a regression test. (cherry picked from commit 80da126)
Restore persisted review actions only when the session location changes, and use the latest session data when the load completes. Keep local expand actions from being overwritten by streaming updates and cover the behavior with a regression test. (cherry picked from commit 6acfe70)
Allow the ungrouped remediation checkbox to reach the group selection store and include ungrouped in the selection callback types. Cover partial selection, select-all, deselection, and exclusion of completed items in the review action bar regression test. (cherry picked from commit 9b6c945)
Track prompt responses separately from session updates so protocol errors settle active turns and allow retries. Surface transport termination after queued frames are dispatched, preserving partial output and final responses. Add focused client regression tests for errors, retry, cancellation, and connection closure, and document the test entry point. (cherry picked from commit 05c234b2a5aaca344f2dfdd5b43c4ed2342863f2)
Rename the client-local transport closure notification to the OpenBitFun prefix in both its declaration and injected payload. Keep transport termination dispatch consistent and satisfy the product identity audit.
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
Port four shared bug fixes from the HarmonyOS downstream repository to current upstream main:
Type and Areas
Type: Bug fixes and regression tests.
Areas: Web UI review canvas, review action state, remediation selection, and ACP client lifecycle.
Motivation / Impact
All four triggering paths remained in upstream main at
14e4d9583659c4401932755c6344da3272596cef: canvas switching ran in a React effect, persisted review restoration depended on the streaming session object, ungrouped selection returned early, and ACP prompt errors could leave the update reader waiting. Each fix applies to shared behavior and is absent from that baseline.The ports retain upstream module names, session subscription APIs, and non-HarmonyOS test behavior. HarmonyOS provisioning, Node compatibility, unrelated downstream browser-tab behavior, packaging, and device changes are excluded.
Verification
pnpm --dir src/web-ui run gen:types: passed (39 binding-export tests).pnpm --dir src/web-ui run test:run src/app/scenes/session/AuxPane.workspace-switch.test.tsx src/flow_chat/components/btw/BtwSessionPanel.review-action.test.tsx src/flow_chat/components/btw/DeepReviewActionBar.test.tsx src/flow_chat/store/deepReviewActionBarStore.test.ts src/flow_chat/deep-review/action-bar/RemediationSelectionPanel.test.tsx 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, 139 tests across 9 files.pnpm run check:web: passed, including TypeScript, canvas SDK, typography, Appearance, theme color, and theme visual contract checks.cargo test --locked -p openbitfun-acp --no-default-features --features client,openbitfun-core/git --lib client::prompt::tests: passed, 7 tests on Windows x64.service::worktree, which requires Coregit. The focused command explicitly selects that feature; no dependency manifests or unrelated Core code are changed.pnpm run fmt:rsandgit diff origin/main --check: passed.Reviewer Notes
AI-assisted; testing level: automated unit/component and static checks, without application or device end-to-end validation. The UI changes affect behavior rather than visual styling; component tests cover their interactions.
No persisted-data shape or ACP wire protocol changes. The transport-closure marker is local to the client incoming queue and is never sent to an agent. Remote workspace, remote control, Peer Device Mode, and Detached Dispatch were not exercised end to end.
Checklist