fix(chat): show cold-boot feedback instead of a silent placeholder - #11739
Conversation
A dedicated agent's container takes 30-120s+ to warm. During that window
the composer showed only a static placeholder ('Ask X — waking up…') + an
sr-only hint — a sighted user got no spinner, no progress, no timeout escape
for minutes (found in the staging e2e). The open-sheet spinner is gated on
conversationLoading and the turn-status on responding, both false during a
fresh pre-send cold boot.
Add a resting-state BootStatusIndicator banner (sibling of the model-download
banner, same glass pill + text-accent spinner + aria-live + reduced-motion):
an indeterminate 'Waking {agent}…' while booting, escalating after 90s to
'taking longer than usual' with an Open-settings escape so a stuck boot never
reads as a silent hang. The post-send path (optimistic bubble + inline
'Waking the agent' turn-status) is untouched.
Two review points folded in: the banner is gated on a 600ms grace delay so a
warm agent — where phase is momentarily 'booting' on first paint before the
status fetch resolves — never flashes it; and the escape is labelled 'Open
settings' (its handler opens settings) rather than implying a retry it
doesn't do.
Test: BootStatusIndicator states (waking → slow escalation via fake timers),
the settings-escape callback, no-handler omission, reduced-motion. 5/5.
Sibling suites: 3 pre-existing draft-parity failures on clean develop too
(unrelated); +5 new pass. typecheck + biome clean.
…y exports Folds the 3 WARNs from the /review pass: - Tests: add parent-level grace-gate tests (the load-bearing anti-flash was untested — only the isolated BootStatusIndicator was). Uses the existing makeController harness: warm agent that leaves booting <600ms never shows the banner; a cold boot past 600ms does; readiness hides it immediately. - Slop: the cold-boot rationale was restated 4x — collapse to one authoritative spot (the parent effect for the invariant, a short JSDoc for the component), drop the PR-narration + the duplicated render-site block. - Dead code: BootStatusIndicator/BOOT_SLOW_AFTER_MS are exported only for the test — note them as a test-only seam (cf __renderThreadLineForParity) so they don't read as public API. 3 grace-gate + 5 component tests green; the 3 failing draft-parity tests in the sibling suite are pre-existing on develop (#9148), unrelated.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Post-merge verification (this PR was merged mid-review; reviewed + verified the develop tip
Code review: gating on One nit, not a defect: since |
What
A dedicated agent's container takes 30–120s+ to warm. During that window the chat composer showed only a static placeholder (
Ask X — waking up…) + an sr-only hint — a sighted user got no spinner, no progress, no timeout escape for minutes. Found in the staging e2e: the composer just sat there, silent, while the agent booted. The open-sheet spinner is gated onconversationLoadingand the turn-status onresponding, both false during a fresh pre-send cold boot, so nothing filled the gap.Fix
A resting-state
BootStatusIndicatorbanner — the structural twin of the existing model-download banner (same centered glass pill,text-accentspinner,aria-live="polite", reduced-motion aware):The post-send path (optimistic user bubble + inline "Waking the agent" turn-status) is untouched — this only fills the silent pre-send window.
Design-review points folded in (workflow + /review)
phase === "booting"is true on first paint before the status fetch resolves, even for a warm agent — so the banner is gated on a 600ms grace window; a warm agent flips ready within a frame and never crosses it. This anti-flash gate is the load-bearing part and is now tested end-to-end via the overlay harness.__renderThreadLineForParity).Scope
This is the only real code bug of the 4 UX issues the e2e surfaced — the other three (
/"lands on settings", "Loading billing" hang, "no Send button") were confirmed to be guest/first-run session artifacts of the e2e, not defects for a normal signed-in user (the workflow root-caused each against HEAD:/resolves to chat, a labelled Send button already exists and enables on text, and "Loading billing" only persists while unauthenticated). No speculative PRs for those.Test
ContinuousChatOverlay.boot-status.test.tsx(5): waking → 90s slow escalation (fake timers) → Open-settings callback → no-handler omission → reduced-motion.ContinuousChatOverlay.test.tsxgrace-gate (3): warm-flip never shows, cold boot past 600ms shows, readiness hides.