Repository navigation
fix: keep new-session checkout choices stable while loading - #201179
Conversation
Co-authored-by: jesse-merhi <[email protected]>
Keep confirmed project checkouts usable during independent branch discovery and restore saved isolation before revealing the control. Co-authored-by: jesse-merhi <[email protected]>
Skeleton only the unknown label and show picker chevrons only when ready. Co-authored-by: jesse-merhi <[email protected]>
Remove the unrelated command-palette loading condition and duplicate mobile skeleton dimensions. Announce the unknown checkout state as loading rather than checking a device. Co-authored-by: jesse-merhi <[email protected]>
Worked on by: - @jesse-merhi Co-authored-by: jesse-merhi <[email protected]> OpenClaw-Publication: 384b59ba-7a2d-4e14-802b-adeac15d45cb
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR hides provisional checkout choices and reserves their mobile row until eligibility resolves. Example: At 400 px, Sample Project returns current=false and worktree=true after a delayed eligibility lookup.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this focused fix addresses a current checkout-loading defect using the existing state owner, with no actionable code findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe New Session repository owner combines project eligibility, saved checkout intent, and branch discovery; Solid controls present its state and existing submission gates enforce availability. flowchart LR
A[Project selection and saved preference] --> B[Draft repository owner]
C[Gateway checkout eligibility] --> B
D[Gateway branch suggestions] --> B
B --> E[Solid checkout control]
B --> F[Session submission gates]
Technical reviewBest possible solution: Retain this focused owner-derived readiness change and its responsive checkout placeholder. Do we have a high-confidence way to reproduce the issue? Current main exposes the checkout control before eligibility resolves, while its label derives from the provisional current-checkout choice; supplied before screenshots show that state, and the PR reports the focused regression red on pinned main. Is this the best way to solve the issue? The patch repairs the existing repository owner's readiness distinction and keeps presentation in Solid, preserving confirmed choices and saved worktree intent without adding requests, timers, caches, or another loading store. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 392506102468. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +57, Tests +184. Total +241 across 7 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 18, 2026, 8:13 AM ET / 13:13 UTC (Revision 2). |
Reuse the existing picker row styles instead of growing the CSS bundle. Co-authored-by: jesse-merhi <[email protected]>
Worked on by: - @jesse-merhi Co-authored-by: jesse-merhi <[email protected]> OpenClaw-Publication: 5a53bd35-d2af-4a21-9de3-616f6c8f9cd9
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
New Session can show Current checkout while project eligibility is still loading, then flash to New worktree. Simply hiding the unknown choice also makes the vertically stacked mobile controls jump when it appears.
User Impact
The checkout control appears with its resolved choice. Mobile reserves the row with the known branch icon and a label-only skeleton; the picker arrows appear only when it is usable. Desktop stays quiet until the choice is ready. Confirmed checkouts remain usable while optional branch suggestions refresh or fail.
No configuration, data migration, or user action is required.
Why This Change Was Made
Checkout eligibility and branch suggestions have different readiness contracts. The existing repository-state owner now decides whether the checkout choice is pending, while the view presents that state without inventing another loading store or request.
Simplification and code removal
Evidence
The complete comparison uses actual Chromium recordings of pinned main
93ec0fe3567fand this branch at74947ba9a216, with identical synthetic Gateway data and deliberately delayed responses. One video covers desktop/mobile, light/dark, loading → ready, and background refresh → unavailable branch suggestions. The refresh/failure chapters show preserved behavior, not a newly introduced error.Clean comparison
Annotated comparison
Side-by-side video (17 seconds)
checkout-main-vs-pr-all-changes-compact.mp4
Mobile first, followed by desktop. Both themes use the same delayed mock Gateway fixture. The final chapters verify that branch and name fields remain editable when a background lookup fails.
e25ad96fb3d6..74947ba9a216, priorities P0–P2: no actionable findings. This was a static diff review; the browser and unit checks ran separately.Follow-up validation on
168aba6aa98693ec0fe3567f: the provisional trigger renders at all three widths) and green on the revised tree (all four cases pass). The separate catalog/reconnect suite also passed with the reconnect repair.layout-shiftobserver. No inference or external provider request was needed.The complete route is not zero-CLS. On both builds the largest shifts come from the shell or lazy route placeholder; the shared desktop workspace/composer update is slightly smaller on the revised head. The focused controlled-delay cases record zero shift during checkout resolution itself. The existing video and screenshots show the original fix, whose visual design is unchanged by the stylesheet reuse. Revised-head CI run.
Commands, timing, and scope
Browser:
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner --maxWorkers=1with checkout-loading, places, workspace-validation, and the retained capture-only matrix scenario. Result: 33 passed, 80.07 s Vitest duration. Capture-only source and generated media are not committed.State/picker:
node scripts/run-vitest.mjs ui/src/pages/new-session/draft-place-state.test.ts ui/src/pages/new-session/checkout-chip.test.ts ui/src/pages/new-session/palette-session-draft.test.tsx --maxWorkers=1. Result: 95 passed, 7.33 s Vitest duration.Types:
node scripts/run-tsgo.mjs -p tsconfig.ui.json --incremental.Browser fixtures exercise the real built UI with a mock Gateway, not a live Git/provider deployment. Hosted CI runtime is not yet available. Main was pinned when recording; the source was not rebased merely because main advanced.
Requested and design-reviewed by Jesse.
Work sessions
Linked for team reference; these sessions aren’t public.
🦞 Made with OpenClaw
Worked on by