Repository navigation
Conversation
Use the existing initial connection grace for the chat header and show observed failures immediately. Retain desktop actions and float outage feedback without moving header geometry. Cached history and route resolution no longer produce reconnect state.
|
🦞👀 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 changes before merge. What this changesThis PR delays initial connection feedback for two seconds and retains desktop header controls while displaying outage feedback below them. Example: A cached conversation reconnects successfully 800 ms after reload.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-authored experiment open and honor its do-not-merge instruction; the focused change addresses a source-confirmed presentation defect but introduces duplicate connection announcements. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Gateway store publishes connection lifecycle facts, a shared resolver derives presentation status, and the shell and chat header render that status alongside cached conversation content. flowchart LR
A[Gateway client] --> B[Gateway store]
B --> C[Shared status resolver]
C --> D[Shell status and announcements]
C --> E[Chat header]
F[Cached conversation] --> E
E --> G[Retained session controls]
Technical reviewBest possible solution: Keep the shared connection grace and retained controls, while leaving connection announcements with the existing shell owner. Do we have a high-confidence way to reproduce the issue? The base header explicitly infers reconnecting from cached messages during initial connection, independently of the store's grace period; source establishes the path, but this review ran no reproduction. Is this the best way to solve the issue? Reusing the existing store timer and status resolver is the smallest complete approach; retaining the controls avoids their removal and remounting, but the new presentation must preserve the shell's single-announcement contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e8621deb4a63. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests +148, Docs +7, Other +12. Total +169 across 13 files. Added test files: 1. View PR surface stats
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 Reviewed October 31, 2026, 1:54 PM ET / 17:54 UTC. |
Superseded by #189645 after approval to scope the fix to indicator timing. The results below describe the earlier experiment head.
What Problem This Solves
A signed-in reload of a dashboard deep link briefly shows saved-conversation connection feedback during the normal initial handshake. The original measured sequence had header shifts around 501 and 798 ms. Cached history and pending route resolution independently manufactured a reconnect indicator, bypassing the shared status grace.
Outcome: experiment stopped; do not merge
The presentation change removes the normal-boot indicator in all 22 candidate reloads, but the predeclared compound gate fails: 0/11 qualifying reloads on each route, versus the required 10/11. Two header-trailing shifts remain in every candidate reload. This draft is being closed as an experiment; no landing is requested.
Why This Change Was Made
Reuse the existing two-second connection presentation grace. The desktop header consumes the shared Gateway status instead of deriving status from cached history or unresolved routes. A real socket close atomically ends the grace, and feedback remains through retries until hello succeeds. Session controls stay mounted, and connection feedback is positioned below the header to avoid inserting width into the trailing controls.
Two seconds reuses the existing owner and timer and covers the observed normal sub-second boot. No new option, timer, protocol field, reconnect/backoff/liveness policy, or durable record is introduced. Recovery work on the related recovery branch merged in #186325; it is unchanged here.
User Impact
Ordinary warm reloads lose the connection-status flash. Slow and failed connection feedback remains visible in native lifecycle tests. The remaining header identity/action hydration prevents the complete no-shift experience, so this is not presented as a finished fix.
Evidence
Final candidate:
4f792e0727f5dbe7a96262540c78d85f21425d21, based on main5353794239ba. Baseline is that checkout with only the six UI runtime files reversed; candidate and baseline use the same built Gateway, diagnostics, fixture and browser. Measurements ran on one AWSc7a.4xlargelease, 16 CPUs / 31,378 MiB RAM, headless repository Playwright Chromium. Leasecbx_0b04095f08e5, runrun_f6e218e099a48948e8edb3d4c961baa0. The lease is released and has no host.The Team-scale bench used 11 interleaved pairs per route, warm archived sessions,
live-fastlatency, no trace/profile, 390 sessions and 240 transcript messages. Sidebar settings: involving-me, category grouping, created sort, 97 groups / 102 section-order entries, five collapsed groups, empty groups always, preview disabled, pins present. The pane probe samples indicator visibility and header geometry. All 44 bench runs had one connect and zero socket closes.The separate real-Gateway warm-reload rig used 11 interleaved pairs per route, 3,000 synthetic sessions and the rig's 80 ms RTT setting on the same lease and bundles. Its first/final row timings use different boundaries: first painted rows is Element Timing; final rows is DOM readiness, which can precede paint. No local-Mac timings are used as performance results.
Tables show median [Q1, Q3]. Paired deltas are candidate minus baseline in run order.
Team-scale bench
chat
All per-pair deltas
-9, -8, -9, -9, -8, -9, -11, -10, -9, -11, -90, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1-0.5, -3.6, 19.1, 0.3, -12.6, 22.2, 5.4, 1, -9.9, -8.1, 2.54, -12, -8, -4, 0, 12, 4, 0, -20, -12, 022, -79, -34, -4, 7, 1, 0, -7, -17, -6, -62-0.0138, -0.0146, -0.0146, -0.0146, -0.0138, -0.0146, -0.0146, -0.0146, -0.0146, -0.0146, -0.0146dashboard
All per-pair deltas
-10, -9, -8, -9, -9, -10, -9, -10, -9, -11, -11-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1110.9, 12.5, 9.7, 2.9, 1.2, -83, 106, 100.8, 99.8, -12.4, 122.1-4, -32, -12, -36, 0, -8, 24, 12, 20, 28, -86, 8, 44, 15, 4, -10, 78, 49, 53, -6, 53-0.0107, -0.0107, -0.0107, -0.0107, -0.0107, -0.0107, -0.0107, -0.0107, -0.0107, -0.0107, -0.0107Real Gateway
chat
All per-pair deltas
-12.2629, -84.5009, 3.5167, -31.1189, 14.3068, 21.0912, -3.833, -71.4551, 45.4719, -83.168, 28.907794.323, 127.323, -29.443, -1.016, 5.633, -40.534, -85.434, 88.942, -52.602, 23.339, -16.54896.0371, 128.0991, -32.0833, 0.0811, 4.0068, -39.8088, -84.033, 88.0449, -52.0281, 20.032, -16.0923-11.2629, 32.6991, -5.5833, -26.7189, 7.3068, -98.7088, -20.633, 49.9449, 43.3719, 45.032, 7.7077-20.1, -62, 35, -56.5, 10.3, -53, 47.8, -38.5, 63.1, -44.2, 66.1-0.0034, -0.0038, -0.003, -0.0034, -0.003, -0.003, -0.003, -0.0037, -0.0035, -0.0038, -0.003dashboard
All per-pair deltas
95.4541, -100.4213, 13.3792, -32.1889, 28.9961, -52.3743, 50.626, -47.0757, 20.31, -36.3026, 47.7239-66.487, -106.165, -2.049, 164.979, -31.131, -89.722, 33.005, -20.866, -137.854, 59.637, 46.514-63.8459, -103.8213, -4.1208, 164.1111, -32.2039, -92.1743, 35.926, -20.0757, -139.99, 60.0974, 48.0239-36.4459, -74.7213, 6.2792, 83.4111, 29.3961, -50.1743, 53.526, -34.4757, -68.59, -7.3026, 16.1239-66.9, -103.9, 26.9, -33.8, 41.2, -41.4, 51.1, -35.7, 57.4, -52, 35.4-0.0019, -0.0021, -0.0021, -0.0021, -0.0021, -0.0021, -0.0019, -0.0021, -0.0021, -0.0019, -0.0019Attribution and secondary limits
Indicator frames fall from median 9 to 0 on both routes, 11/11 pairs better each. Header movements fall from median 3 to 2, but never reach zero. The candidate still moves the trailing region 144.22 px during workspace/session-identity hydration (chat 379–442 ms; dashboard 394–470 ms), then 32 px as session actions arrive (chat 737–873 ms; dashboard 678–809 ms). The first movement coincides with the title moving right and the archived footer contracting 26 px; the second coincides with the header identity subtree growing from one to seven nodes. These observations point to separate identity/action hydration; they do not establish a complete causal fix for those paths.
The baseline adds a 231.05 px indicator insertion/removal to those movements. Removing it reduces real-Gateway median CLS by 87.4% on chat and 93.7% on dashboard, with separated IQRs and all 11 pairs better on each route. This is a consistent indicator-only benefit, not a pass of the compound gate.
Real-Gateway hello-handled, FCP, first painted rows, final rows and LoAF all have overlapping IQRs and mixed pair signs. There is no supported timing improvement from those results. Instrumented Team-scale dashboard LoAF is worse in 9/11 pairs, with median paired delta +15 ms (marginal medians 200→204 ms); that raises a secondary regression concern under the paired rule. The separate real-Gateway dashboard LoAF is 247.5→225.4 ms with mixed signs. No A/A control was run to resolve the discrepancy because the primary gate had already failed. Team-scale dashboard hello arrival is worse in 9/11 pairs, paired median +12.5 ms, below its 3% threshold (~18.9 ms).
Tests and review
pnpm test <file> --maxWorkers=1; 124 assertions/tests passed across the files.check-changedwas interrupted during its run when the lease was stopped after gate failure; completed checks are partial evidence only. Full UI e2e was not started. Actual browser airplane-mode proof was not completed; native observed-close/offline and slow-connect coverage are not substitutes for that missing proof.Production LOC and scope
UI runtime delta is +2 lines. Keeping explicit close feedback and stable session controls while removing competing fallback policy accounts for that small growth. Benchmark diagnostics add 10 lines for indicator-frame counting and identity-region attribution. The requested non-test/non-doc diff-stat command reports 54 insertions / 40 deletions, net +14, including the two-line test allocation record; executable production/diagnostic net is +12. The exact 148-line allocation covers the added native lifecycle/geometry and owner regressions, with no shared scalar budget increase.
Touched runtime:
gateway-store.ts,gateway-status.ts,chat-pane-header.ts,components/chat-pane-header.tsx,components/chat-pane-mobile-composition.tsx,startup-layout.css. Also touched the pane-chrome probe, three test files plus the new native e2e file, offline/reconnect docs, and the exact test allocation record. No changelog edits.Synthetic visual states
All images were inspected and contain synthetic fixture data only. Baseline images come from the exact remote baseline native regression. Candidate images illustrate the same runtime patch before its final rebase; other UI files changed on main during that rebase, so these are illustrative lifecycle states, not exact-final-head pixel comparisons. Quantitative final-head evidence is in the tables above.
Candidate slow connection after grace:
Candidate observed-close/offline feedback:
Lead decision
The open question is whether the indicator-only improvement should be accepted under a separately scoped gate, or whether workspace/session-identity and header-action hydration should first remove the remaining 144.22 px and 32 px movements. This experiment makes neither decision and is stopped before merge.