Preserve the review action-bar collapse/expand state while a review is streaming. Keep the restore effect tied to stable review and location identity instead of the entire child-session object, while reading the latest session through a ref for recovery paths. Add regression coverage for user toggles during streaming updates.
Type and Areas
Type: Bug fix, regression fix, UI/UX, test
Areas: Web UI, code review, session state, streaming updates
Motivation / Impact
During review streaming, child-session updates retriggered the persisted layout restore effect. A user's action-bar expand/collapse choice could be overwritten by the persisted minimized state.
The restore trigger now changes only when the review and location identity changes, while asynchronous recovery reads the latest child session. This keeps the user's action-bar choice effective during streaming without changing the persisted data shape.
Verification
pnpm --dir src/web-ui run test:run BtwSessionPanel.review-action.test.tsx — passed (34 tests) on the main, release/1.0.6, and release/1.0.5-based branches.
pnpm run type-check:web — passed on all three branches.
git diff HEAD^ HEAD --check — passed.
Reviewer Notes
No backend, protocol, or persisted-data shape changes. The focused regression coverage verifies that a local action-bar toggle remains effective after streaming session updates and that recovery uses the latest session data. HarmonyOS device behavior and remote workspace, remote control, Peer Device Mode, and Detached Dispatch scenarios were not exercised end to end.
Summary
Fixes OpenBitFun/bitfun_ade#131.
Preserve the review action-bar collapse/expand state while a review is streaming. Keep the restore effect tied to stable review and location identity instead of the entire child-session object, while reading the latest session through a ref for recovery paths. Add regression coverage for user toggles during streaming updates.
Type and Areas
Type: Bug fix, regression fix, UI/UX, test
Areas: Web UI, code review, session state, streaming updates
Motivation / Impact
During review streaming, child-session updates retriggered the persisted layout restore effect. A user's action-bar expand/collapse choice could be overwritten by the persisted minimized state.
The restore trigger now changes only when the review and location identity changes, while asynchronous recovery reads the latest child session. This keeps the user's action-bar choice effective during streaming without changing the persisted data shape.
Verification
pnpm --dir src/web-ui run test:run BtwSessionPanel.review-action.test.tsx— passed (34 tests) on the main, release/1.0.6, and release/1.0.5-based branches.pnpm run type-check:web— passed on all three branches.git diff HEAD^ HEAD --check— passed.Reviewer Notes
No backend, protocol, or persisted-data shape changes. The focused regression coverage verifies that a local action-bar toggle remains effective after streaming session updates and that recovery uses the latest session data. HarmonyOS device behavior and remote workspace, remote control, Peer Device Mode, and Detached Dispatch scenarios were not exercised end to end.
Checklist