Repository navigation
fix(ui): collapse chat side panel after final tab closes - #130102
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 26, 2026, 11:28 AM ET / 15:28 UTC. ClawSweeper reviewWhat this changesThe PR changes Control UI side-panel state so closing the final tab collapses the panel and updates browser coverage for persistence after reload. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep this member-authored PR open for maintainer product confirmation: current tests explicitly supported the empty type picker, while this patch intentionally replaces it with final-tab collapse. The repair is otherwise focused, but it includes a removable no-op projection block. Priority: P2 Review scores
Verification
Live VerificationEntry: Result: FAIL (partial) — step 2 Steps:
How this fits togetherThe Control UI chat page persists each session’s side-panel layout, projects board-chat visibility into that layout, and renders the resulting panel beside the conversation. Closing a tab updates the layout before persistence and rendering consume it. flowchart LR
A[User closes a side-panel tab] --> B[Sidebar layout owner]
B --> C[Persisted session layout]
B --> D[Board chat projection]
C --> E[Chat panel renderer]
D --> E
E --> F[Collapsed or visible side panel]
Decision needed
Why: Current test coverage and an inline type definition documented the empty-picker behavior, so accepting this UX change requires maintainer intent rather than treating it as an unambiguous regression repair. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +28. Total +34 across 7 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Confirm that final-tab collapse is the desired Control UI interaction, then retain the minimal Do we have a high-confidence way to reproduce the issue? Yes: the PR body supplies a deterministic Control UI mock flow, and the layout-owner and browser assertions directly encode the final-tab state transition. Is this the best way to solve the issue? Unclear: the owner-boundary implementation is appropriate, but current tests show the removed empty-picker behavior was deliberate, so maintainers must confirm the UX direction first. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 20eef858aafb. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
Merged via squash.
|
…0102) * fix(ui): collapse side panel after final tab closes * fix(ui): preserve side panel owner state * fix(ui): preserve projected panel closure * fix(ui): align projected panel close contract
Closes #130100
What Problem This Solves
Fixes an issue where users closing the final tab in the Control UI chat side panel would be left with an empty panel occupying part of the chat.
Why This Change Was Made
In this PR, the canonical side-panel layout owner collapses the panel when closing a tab removes the final panel column. Closing one tab while others remain continues to select the nearest remaining tab; no rendering-layer guard or fallback path was added.
User Impact
Closing the last side-panel tab now returns the full width to the chat immediately, without requiring a second close action.
Evidence
node --import tsx scripts/control-ui-mock-dev.ts --host 127.0.0.1 --port 5208 --fixture workboardonorigin/main.{ columns: [], open: true }and expected{ columns: [], open: false }.OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs ui/src/pages/chat/sidebar-layout.test.ts ui/src/pages/chat/chat-pane.test.ts— 10/10 and 42/42 passed.oxfmt --checkandgit diff --check origin/main...HEADpassed.Before/after recording from the real
workboardmock at 1280×800. The first segment shows the empty panel remaining open; after the black divider, the second segment shows the panel collapsing. The final MP4 and extracted before/after frames were inspected before upload.panel-collapse-before-after.mp4