Skip to content

fix: keep new-session checkout choices stable while loading - #201179

Merged
roboclaw-bot merged 7 commits into
mainfrom
openclaw/checkout-loading-pr-27ef38a0
Nov 18, 2026
Merged

roboclaw-bot merged 7 commits into
mainfrom
openclaw/checkout-loading-pr-27ef38a0

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Removed the path that treated any repository refresh as a ready checkout label.
  • Moved the project/direct-folder visibility conditions out of the caller and into the repository owner instead of duplicating them.
  • Removed an unnecessary command-palette loading change: that surface already has a stable New worktree label, so its original behavior is preserved.
  • Reused the existing branch icon, placeholder pulse, and loaded-row sizing rules. The skeleton has no separate mobile height/padding or icon geometry to drift out of alignment.
  • Kept saved isolation preferences, unavailable-Git guidance, and editable branch/name fields. No new timers, RPCs, caches, or compatibility path.

Evidence

The complete comparison uses actual Chromium recordings of pinned main 93ec0fe3567f and this branch at 74947ba9a216, 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

Main This PR
Main: Current checkout appears while the lookup is pending This PR: the branch icon remains and only the label shows a skeleton

Annotated comparison

Main This PR
Main: provisional checkout label highlighted This PR: label-only skeleton highlighted

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.

  • No loading layout shift at 400, 820, and 1280 px. The branch icon retains the same bounds and the label begins at the same position; arrows are absent until ready.
  • 33 focused browser scenarios passed, including the four exact-head recording cases and existing selection, reconnect, failure, and submission coverage.
  • 95 focused state/picker tests passed, including restoration of the saved worktree choice before branch suggestions finish.
  • Control UI production build, full UI typecheck, focused lint, stylesheet lint, formatting, and diff checks passed. The earlier shared-dependency typecheck blocker was resolved using task-local dependency files.
  • Local autoreview of the complete committed range 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 168aba6aa986

  • Reconnect keeps an already-selected worktree editable while Git rechecks it. The mobile placeholder now reuses the existing picker row styles, with no added CSS.
  • The same focused delayed-checkout regression is red on pinned main (93ec0fe3567f: 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.
  • Real HTTP and WebSocket Gateway, isolated state, production UI builds, 75 synthetic sessions and 100 Git branches. Measured Overview → New Session using Chromium’s layout-shift observer. No inference or external provider request was needed.
Viewport Main route-entry CLS Revised route-entry CLS
400 px 0.034939 0.034939
820 px 0.068288 0.068197
1280 px 0.036344 0.036303

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=1 with 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

roboclaw-bot and others added 5 commits November 18, 2026 11:30
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
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: Current checkout appears provisionally, then changes to New worktree.
  • After: The branch icon and label skeleton reserve the row until New worktree is ready.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, focused repair supported by inspected visual evidence and reported production-browser validation; broad exact-head CI is still pending.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected Chromium before/after screenshots show the production checkout view replacing its provisional label with a stable mobile skeleton. The PR additionally records revised-head real-Gateway route measurements at 400, 820, and 1280 px and focused delayed-response regressions; video playback was unavailable in this review environment.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: New Session briefly shows a checkout the selected project cannot use, and hiding that provisional choice can move stacked mobile controls.
Reason: The maintainer-authored direction addresses a visible loading defect while preserving checkout selection, recovery guidance, and independent background refresh.

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
Reviewed head: 168aba6aa986458a01cbe4f4de024572c57100d1

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Checkout readiness and refresh visibility keeps the original intent (6babda5: Keep recorded checkout choices responsive during slow Git discovery and retain recovery on cold failure.)
  • Eligible checkout selection and saved worktree intent keeps the original intent (da65be6: Select a permitted checkout for the chosen project and agent while preserving valid saved choices.)
  • Solid checkout presentation keeps the original intent (74c7b3d: Render New Session through Solid while preserving existing domain ownership, controls, and routes.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 6babda5 adds ui/src/pages/new-session/draft-repository-state.ts:515 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6babda5f8b27; files: ui/src/pages/new-session/draft-repository-state.ts)
  • Shakker: Raw commit da65be6 adds ui/src/pages/new-session/draft-repository-state.ts:425 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: da65be64a321; files: ui/src/pages/new-session/draft-repository-state.ts)
  • Dallin Romney: Raw commit bcafd72 adds ui/src/pages/new-session/draft-repository-state.ts:58 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: bcafd72f610e; files: ui/src/pages/new-session/draft-repository-state.ts)

PR surface

Source +57, Tests +184. Total +241 across 7 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 3 62 5 +57
Tests 4 208 24 +184
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 270 29 +241

Preflight source

Source 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

Metric Value Why it matters
Production versus test changes Production +62/-5 lines; tests +208/-24 lines Growth supplies derived readiness and responsive presentation, with distinct browser geometry, branch-refresh, and saved-preference coverage.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: The demonstrated impact is a misleading transient label and layout movement, without changing checkout authorization or session creation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-18T12:47:12.370Z sha b1082ec :: needs maintainer review before merge. :: none

Reviewed November 18, 2026, 8:13 AM ET / 13:13 UTC (Revision 2).

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 18, 2026 12:51
roboclaw-bot and others added 2 commits November 18, 2026 13:04
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
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Nov 18, 2026
@roboclaw-bot
roboclaw-bot merged commit dbdf64f into main Nov 18, 2026
99 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/checkout-loading-pr-27ef38a0 branch November 18, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant