Repository navigation
fix(ui): keep unsent draft indicators visible - #125649
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 3:02 AM ET / 07:02 UTC. ClawSweeper reviewWhat this changesThe branch keeps unsent draft pencils visible beside active-run indicators in the Control UI sidebar and stabilizes two related UI timing tests. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. Current main still hides browser-local draft indicators on active Home and session rows; this maintainer-owned PR directly removes those presentation-only gates and has focused coverage. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) Assertions:
How this fits togetherThe Control UI projects browser-local composer drafts into sidebar Home and session rows. Those rows combine persistent draft state with Gateway session activity to render separate trailing indicators. flowchart LR
A[Composer draft in browser storage] --> B[Application shell draft projection]
C[Gateway session activity] --> D[Sidebar row state]
B --> D
D --> E[Home row]
D --> F[Recent session row]
E --> G[Draft and activity indicators]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +16. Total +18 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Render the persistent draft fact independently from transient active-run state, then land after routine maintainer review and exact-head CI complete. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s two active-row conditions source-prove the missing indicators, and the branch adds a focused mocked-Gateway browser flow for the affected path. Is this the best way to solve the issue? Yes. Removing the two presentation-layer suppression conditions preserves the existing browser-local draft owner and keeps run activity separate. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6afaf82e1ecb. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready on exact head Local proof:
The two unrelated CI flakes were repaired: Markdown-table copy now verifies synchronous clipboard dispatch before advancing the pending promise (focused pass plus 5 bounded stress runs), and attachment restart now waits for asynchronously hydrated attachments (focused pass plus 3 bounded stress runs). Visual proof is attached in the PR body. Source-blind behavior validation passed all four clauses; autoreview clean. No known proof gaps. |
|
Merged via squash.
|
* fix(ui): keep unsent draft indicators visible * test(ui): make markdown table copy assertion deterministic * test(ui): await restored draft attachments
What Problem This Solves
Fixes an issue where users with browser-local unsent composer text would lose the draft pencil while the owning Home or session row was active. When an active run was present, the activity indicator could occupy the only visible trailing state, making the retained draft undiscoverable.
Why This Change Was Made
Draft presence is persistent row state, not an inactive-session notification. The sidebar now renders it for active and inactive rows alike, while keeping run activity and the pencil as separate trailing indicators. The draft remains browser-local: the durable payload lives in IndexedDB and its live presence projection is held in session storage; no Gateway or server persistence contract changes.
User Impact
The unsent-draft pencil remains visible while users are in the session, after they switch away and back, and alongside active-run activity. Clearing the composer removes it as before.
Evidence
Before typing — active run only:

After typing — active run and draft are both visible without overlap:

node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts— 268 passed.node scripts/check-changed.mjs -- <five changed paths>— passed.AI-assisted: yes. The implementation and behavior were independently reviewed and validated.