Repository navigation
fix(ui): stabilize worktree picker inputs - #150426
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 18, 2026, 10:42 PM ET / September 19, 2026, 02:42 UTC (Revision 11). ClawSweeper reviewWhat this changesStabilizes worktree picker editing and clears accepted sessions’ custom names while preserving newer saved checkout and model choices. Merge readiness⛔ Blocked before merge - 2 items remain This PR remains useful on current main. Earlier correctness findings are resolved, and the new live evidence addresses the previous behavior-proof gap. No additional code defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI’s New Session picker turns repository, branch, and name selections into session requests. Its preference owner saves reusable choices through the Gateway and retires a consumed name after session acceptance. flowchart TD
A[Picker choices] --> B[Captured session request]
B --> C[Gateway admission]
C -->|Rejected| D[Keep name for retry]
C -->|Accepted| E[Conditional preference cleanup]
H[Concurrent browser edits] --> E
E --> F[Profile preference transaction]
F --> G[Next draft defaults]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +809, Tests +2013, Docs +13. Total +2835 across 42 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep acceptance-driven name retirement in the existing preference owner, with atomic conflict handling and visible warnings that never undo accepted sessions. Do we have a high-confidence way to reproduce the issue? Yes: consecutive named-worktree starts and picker keyboard editing provide concrete reproduction paths, supported by inspected baseline evidence and current-main source; this read-only review did not execute them. Is this the best way to solve the issue? Yes: the patch extends the existing preference transaction and submission lifecycle, preserving concurrent choices without introducing another storage owner or changing the persisted format. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 43cd359b3c3c. 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 (10 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review Addressed both findings on
Validation: focused unit tests, 16/16 workspace browser E2E tests, UI typecheck, style/policy checks, line/max-lines ratchets, assertion-safety, and startup performance check all pass. Browser proof was captured as |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Worktree picker before/afterBefore: nested dropdown interaction was unstable and the helper rendered the literal After: the suggestion surface remains anchored to the free-text input while typing/caret navigation retains focus. The browser test also verifies Tab moves to Name without dismissing the checkout picker; entering a valid name renders its exact branch preview. |
|
@clawsweeper re-review Addressed the remaining keyboard-selection finding on
Validation: checkout-chip unit tests 16/16, workspace-validation browser E2E 16/16, all six locator-affected browser files 42/43 in a combined run with the sole Escape regression then fixed and the affected cloud-dispatch file re-run 2/2; UI typecheck, formatting, Stylelint, line/max-lines ratchets, assertion safety, and Control UI performance all pass. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ad7cbb2 to
2708094
Compare
|
@clawsweeper re-review Rebased the completed keyboard-selection fix onto current Post-rebase validation passes: checkout-chip unit tests 16/16, workspace-validation browser E2E 16/16, UI typecheck, line/max-lines ratchets, |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Integrated head is Validation: 229 owner/sibling cases, four selected maintained Chromium flows, production/UI test type graphs, scoped lint/guards, and the exact full local build passed. The PR body records the partial-success warning and cross-client persistence limitation. The original contributor screenshots were inspected and visibly delivered in the originating QA conversation, and both rendered on GitHub. Fresh integrated two-session live proof and its before/after images remain pending; hosted CI is running. This is a review request only, not an automerge request. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Compare expected preference values in the existing state transaction before retiring an accepted custom worktree name or rebasing another draft edit. Fence browser migration batches and recovered input provenance so delayed writes cannot overwrite newer choices or restore a consumed name. Keep accepted session creation intact on unconfirmed preference cleanup, with a visible warning and bounded contention handling.
|
Merged via squash.
|
* fix(ui): stabilize worktree picker inputs * fix(ui): satisfy worktree picker CI gates * fix(ui): avoid unchecked picker assertions * fix(ui): close worktree picker on escape * test(ui): locate hidden worktree base input * fix(ui): preserve worktree branch input focus * fix(ui): support keyboard branch selection * test(ui): approve worktree branch combobox * test(ui): await group preference persistence before assertions * fix(ui): preserve concurrent new-session preferences Compare expected preference values in the existing state transaction before retiring an accepted custom worktree name or rebasing another draft edit. Fence browser migration batches and recovered input provenance so delayed writes cannot overwrite newer choices or restore a consumed name. Keep accepted session creation intact on unconfirmed preference cleanup, with a visible warning and bounded contention handling. * test(ui): await attachment readiness and assert migration guards --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Dallin Romney <[email protected]>


What Problem This Solves
Fixes worktree picker editing and prevents New Session from silently reusing a custom name that an earlier accepted session already owns.
User Impact
Branch suggestions stay visible and keyboard-accessible, selecting text keeps the picker open, and Enter returns focus to the composer. After an accepted foreground, background, or terminal start, the next draft keeps its checkout defaults but clears the consumed custom name. Failed admission keeps the name available for retry.
If clearing the saved preference cannot be confirmed, a warning asks the user to check Name before starting another worktree. The accepted session continues. A separate warning reports an unconfirmed new-draft preference save. Session creation is never retried by preference cleanup.
Why This Change Was Made
The picker preserves in-progress text and shows the actual branch name. Name retirement now follows the submitted selection and accepted session ownership, including placement recovery, instead of clearing whatever a mutable draft happens to display later. The existing Gateway preference owner serializes local writes and updates replacement drafts. Cross-browser writes use optional expected values checked atomically in the existing preference transaction. A conflict rereads and reapplies only the intended patch, up to three attempts, so a concurrent model edit cannot restore a consumed name and cleanup cannot overwrite a newer checkout choice. The existing first-connection browser import also guards its migration marker and missing entries, so a delayed import cannot restore a name cleared by another browser. Other preference callers retain their existing behavior; no database schema, stored representation, permission, or version changes are required.
Fresh submissions retain the distinction between an explicit branch and a discovered default. Restored requests only contain the effective branch: if the original default cannot be distinguished from a later cleared branch, cleanup preserves the saved preference and warns rather than guessing. The original session and recovery request remain intact.
Preserves @RomneyDa's picker implementation and original commit ancestry, and preserves existing accepted-session retention behavior.
Evidence
Current conditional-write follow-up: 23 real store/protocol/Gateway-to-worker cases pass after original failures, and 61 draft-flow and migration cases pass, including both independent-client write orders, first-load migration, explicit branch clearing, recovery, bounded contention, identity replacement, and partial-success warnings. All 20 core test graphs, production core/UI types, typed lint, styles, export scans, formatting and selected guards passed. Fresh full staged-source review was scoped-clean at P2. The current head is
390f7c97a68c27e6b34c6b1574b562676e105107. Its only changes from the reviewed production candidatee8a0a82are two test corrections: await visible attachment readiness before the second Enter, and assert migration conditional-write guards. Six focused Chromium cases and selected type/lint/format/guard checks pass; the test-only follow-up review is scoped-clean at P2. Exact-head CI 35415533024 passed: 161 jobs succeeded, 10 were skipped. The exacte8a0a82local build has identical production code; two-session cross-tab live proof passes. A subsequent draft shows Name empty while preserving the main base and original repository. A third session then succeeded with an automatically generated, distinct clean worktree branch. The before/after images were visibly delivered in the originating conversation and verified fully rendered in the PR.Published predecessor
2bb3045completed 115 successful jobs; its real-Gateway lane was cancelled by the job’s 20-minute execution limit while cases were still progressing, so the aggregate failed. No failed test assertion was reported. Thee8a0a82real-Gateway lane subsequently passed in 11 minutes. That run completed 156 successful jobs but failed on the two now-corrected test cases, an unexplained pre-existing widget-font mismatch, and a transcript-test worker teardown timeout. The unchanged widget case passes locally; neither unexplained failure is claimed fixed. Both unchanged cases passed on the current head alongside the two repaired tests. Their earlier failure causes remain unproved; the current exact-head CI is green.Accepted-name regression: before
The second draft inherited the first accepted session’s custom name and failed its ownership check. This synthetic baseline was inspected and delivered in the originating QA conversation.
Accepted-name regression: after
On the exact reviewed production build, the older browser submitted its original custom name while another browser had saved a newer name. Reloading the newer browser preserved its new choice. Both sessions then completed successfully in distinct clean worktrees. This capture shows the newer session’s synthetic response. The build is
e8a0a82; current head390f7c9changes only the two CI tests described above.The before and after captures were inspected and visibly delivered in the originating QA conversation. The next draft was opened through the real UI and verified to have an empty Name, with its main base and original repository preserved. A third session successfully used a new automatic worktree name. Both images were verified complete at their natural 2832 × 1414 dimensions and personally inspected inline in the PR. Exact-head CI is green.