Repository navigation
fix(ui): reload projects after startup identity resolves - #133817
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 1:40 AM ET / 05:40 UTC. ClawSweeper reviewWhat this changesThe PR refreshes the New Session project catalog after startup identity resolution resets the project-picker owner, with a regression test and matching Control UI documentation. Merge readinessThe focused repair is correct: it invalidates the unchanged catalog task so startup identity resolution fetches projects again and rejects the prior response. This maintainer-labeled PR should remain open for normal maintainer handling while its exact-head CI completes. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI New Session page discovers registered Gateway projects before a user chooses a workspace or worktree. Identity resolution can reset that browser-side catalog owner without reconnecting, so the picker must obtain a new authoritative project list. flowchart LR
A[Gateway connection] --> B[Startup identity resolution]
B --> C[New Session state reset]
C --> D[Project catalog task]
D --> E[Gateway project discovery]
E --> F[Project picker]
F --> G[Workspace or worktree session]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests +24, Docs 0. Total +25 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one catalog lifecycle owner: retire the stale task at reset, let its normal reactive inputs refetch the authoritative catalog, and merge after the exact reviewed head is green. Do we have a high-confidence way to reproduce the issue? No current-main run was performed in this read-only review, but the source establishes the reset path and the supplied exact-head evidence describes the production-browser reproduction. The package source for the directly used Lit task was not present locally, so confidence remains medium. Is this the best way to solve the issue? Yes. The patch repairs the lifecycle owner that clears the catalog and uses its existing discovery task, while the regression test covers stale results rather than introducing a second fetch mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f7f38bcc88a3. 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
|
|
Ready to land The changed owner and its caller were inspected directly, including the installed Lit Task implementation: Exact-head production Gateway/Chromium proof passed in Blacksmith Testbox The focused command was |
|
Merged via squash.
|
Related: #133744 (workspace and worktree selection recovery).
What Problem This Solves
Fixes an issue where users opening New Session during sign-in could see registered projects disappear from the project picker and stay missing until reload or reconnect.
Why This Change Was Made
Late recovery-scope initialization clears the project catalogue without changing the connection. The catalogue owner now retires its existing Lit task when it resets, so the normal task lifecycle fetches the current catalogue and rejects old in-flight responses. This uses the existing discovery path and removes an obsolete comment about error-driven selection clearing.
User Impact
Registered projects remain available after sign-in completes. Ordinary reconnect failures still retain the last successful project selection, and existing workspace/worktree behavior is preserved.
Evidence
f3607b1963dbc56fac01fe16eb6040fdbe62d653: a production Gateway and Chromium UI loaded the project catalogue, then lost it when a deliberately delayed recovery-scope digest completed. The registered project remained absent for the full assertion window.cd ui && node ../scripts/run-vitest.mjs run --config vitest.config.ts src/pages/new-session/draft-place-browser.test.ts src/pages/new-session/draft-place-state.test.ts src/pages/new-session/draft-persistence.test.ts.git diff --check, and independent Codex autoreview passed.abc8535bde44c844a8df1caa269b7508c8d95c27, using Blacksmith Testboxtbx_01m1b4m2jyemex936z8epkge2x(environment run): the same delayed-recovery-scope reproduction passes, plus seven production-UI sessions using a real OpenAI API key andopenai/gpt-5.6-lunathrough the OpenClaw runtime. Each model read a unique filesystem fixture and wrote its marker in the correct workspace; provider calls went tohttps://api.openai.com/v1, with no mock provider or model fallback.Proof scope: this exercises a real Gateway, production browser UI, local filesystem/Git, and real OpenAI requests. It does not claim live cloud-worker or Codex-runtime execution.
Before: registered projects disappear after startup identity resolution.
After: the same project catalogue is available after startup identity resolution.