Repository navigation
fix(ui): wait for presented sidebar session before clearing draft - #130747
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 5:00 AM ET / 09:00 UTC. ClawSweeper reviewWhat this changesThe branch makes the sidebar draft-indicator E2E test wait for both router settlement and the sole presented Home chat pane before clearing the composer. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open: this maintainer-authored, protected draft is a focused test-race repair, but it still needs a non-skipped exact-head Control UI E2E result before landing. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Control UI sidebar navigates between retained chat panes while the router updates the URL and page state. This test verifies that a browser-local draft is cleared only after the pane a user can interact with is presented. flowchart LR
A[Sidebar session click] --> B[Control UI router]
B --> C[Route settles]
C --> D[Home chat pane is presented]
D --> E[Composer draft is cleared]
E --> F[Sidebar draft indicator assertion]
Decision needed
Why: The patch is test-only and appears coherent, but the repository policy requires an exact-head validation result before landing and member-authored protected work is not eligible for automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceTests +13. Total +13 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the focused assertion, mark the draft ready when appropriate, and land after a non-skipped exact-head Control UI E2E run confirms the retained-pane transition. Do we have a high-confidence way to reproduce the issue? Yes, source reproducibly exposes the race: current main clears the composer after the URL changes without first proving that the Home pane is presented; the PR body also records the observed CI failure. Is this the best way to solve the issue? Yes. Reusing the established router readiness check and then asserting the renderer’s presented-pane contract is narrower and more maintainable than adding retries or changing production timing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1847e9ac9945. LabelsLabel 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 (2 earlier review cycles)
|
58566fb to
2b6a492
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
2b6a492 to
3b309cc
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
Related: #130688
What Problem This Solves
Resolves a flaky Control UI sidebar E2E failure where returning Home could clear the composer from the previously presented retained pane. The browser URL could commit to the Home session before that session's chat pane became the single presented pane, leaving the draft indicator behind and failing the assertion.
Why This Change Was Made
The test now waits for the existing router readiness contract, then requires exactly one presented chat pane with the Home session key before clearing the composer. Production code, shared helpers, retry counts, and timeout budgets are unchanged.
User Impact
No product behavior changes. CI now verifies draft clearing against the pane users can actually interact with instead of racing the retained-pane transition.
Evidence
802af31b14e5f50d85988e584a6001cede3b2820; exact head3b309cc4aca137f3f18610593c087f062fd10ccc.session-management.sidebar.e2e.test.ts: 11/11 passed.oxfmt,git diff --check, and privacy scan passed.AI-assisted: yes. The maintainer reviewed the implementation and evidence.