Repository navigation
fix(ui): show chat before startup metadata finishes - #128652
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Visual proof from the deterministic Control UI/Gateway harness:
Real isolated-Gateway proof on this exact head also completed with five browser reloads: four warm |
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 7:41 AM ET / 11:41 UTC. ClawSweeper reviewWhat this changesThe PR lets Control UI render chat history before optional model metadata and the agent roster complete, while moving roster hydration to Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review: the patch cleanly separates transcript rendering from roster hydration, but retiring the startup roster payload needs an explicit compatibility decision and exact-head CI completion. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherControl UI starts a chat through Gateway history RPCs, then hydrates model controls and agent selection. The change keeps transcript history on the fast path and moves roster ownership to the dedicated roster RPC. flowchart LR
UI[Control UI chat] --> Startup[Chat startup]
Startup --> History[Transcript history]
History --> Render[Visible transcript]
UI --> Roster[Agent roster request]
Startup --> Metadata[Optional model metadata]
Roster --> Controls[Agent controls]
Metadata --> Controls
Decision needed
Why: The checked-in first-party clients use Before merge
Agent review detailsSecurityNone. PR surfaceSource -105, Tests +217. Total +112 across 28 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Confirm that ordinary Do we have a high-confidence way to reproduce the issue? Yes, at source level: the focused Control UI E2E holds Is this the best way to solve the issue? Unclear: the UI/Gateway split is the clean owner-boundary solution, but whether the removed startup roster is an external protocol contract requires maintainer direction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0d840c0fce11. 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 (3 earlier review cycles) |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Land-ready verification for exact head
Known boundary: sessions with an explicit auth-profile override intentionally still wait for the authoritative session-specific model projection. Removing that wait requires a separate session-scoped metadata contract; this PR does not weaken those model/context/thinking semantics. Production LOC: +105/-189 (net -84). Tests/test support: +454/-258. |
|
Merged via squash.
|
* fix(ui): show chat before startup metadata finishes * test(ui): wait for config save requests * fix(ui): coalesce dashboard session queries


Related: #114693
What Problem This Solves
Fixes an issue where users opening or refreshing a chat could remain behind the loading skeleton even after the transcript was available, because optional model metadata and the agent roster still had to finish first.
A live team-session baseline showed
chat.startuptaking 1.53–3.68s and the transcript becoming visible 4.26–7.59s after navigation. The startup response also owned agent-roster data that already has a canonicalagents.listowner.Why This Change Was Made
Chat startup now keeps transcript/session state on the critical path while treating neutral model metadata as optional prepared data. Sessions with an explicit auth-profile override still wait for their authoritative session-specific projection so model context and thinking controls remain correct.
Agent-roster hydration moves back to
agents.list, which now preserves per-agent model/thinking projections and reuses one successful roster per connection. The obsolete bundled-roster/adoption path and startup all-agent projection are removed.The short session-URL resolution waterfall and the independently reproduced Control UI asset-preparation 503 are separate owner boundaries and are intentionally not hidden in this patch.
User Impact
For ordinary sessions, chat history can render as soon as it is available even while optional model controls and agent metadata continue hydrating. Users no longer stare at a transcript skeleton because unrelated startup metadata is refreshing.
Auth-profile-overridden sessions retain their existing authoritative behavior. Agent switchers also retain agent-specific thinking capabilities rather than inheriting one shared catalog.
Production LOC: +105/-189 (net -84). Tests/test support: +454/-258 (net +196).
Evidence
chat.startupruns: 286–384ms; one cold outlier: 1.15shistory_page: 0.30–0.92msstartup_projection: 0.09–0.17msagents.listand one message subscription per empty dev sessionagents.listandchat.metadataunresolved while the transcript appears and the loading skeleton disappears.node scripts/check-changed.mjspnpm buildgit diff --check