From d3065277926f6b2aecb0d7f8a9cc3adb308dd4a6 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Sun, 22 Nov 2026 02:30:24 +0100 Subject: [PATCH] feat(web/claw): a working line until the turn speaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The web surface drops a turn's tool rows and thinking trace (only consent and attachment cards render), so the span between a turn's first event and its first text delta showed a bare name over empty space. Now a small ring plus ` is working…` sits below where the reply will land, on screen exactly while `live.reply` is empty. The first delta takes the line away and the streaming cursor takes over from there; the two never show together. Text already streamed keeps the line gone for the rest of the turn, and a consent card waiting on the human does not stop it, the turn still being live. The gap between send and the turn's first event stays bare: no live block exists there yet, and that is the POST round-trip, not the model. The ring is a tokened CSS spinner, muted under the accent name, with role=status and a prefers-reduced-motion fallback to a static ring. Verified against a scripted claw (thinking_delta, tool_start, then a text_delta): the line shows through the tool phase and is gone with the cursor on the reply. --- web/claw/app/components/ChatPanel.vue | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/web/claw/app/components/ChatPanel.vue b/web/claw/app/components/ChatPanel.vue index cdbe8c2..9994d68 100644 --- a/web/claw/app/components/ChatPanel.vue +++ b/web/claw/app/components/ChatPanel.vue @@ -519,6 +519,10 @@ function streamTone(status: StreamStatus): 'ok' | 'warn' | 'error' { @download-attachment="(id, name) => emit('downloadAttachment', id, name)" /> +

+

@@ -755,6 +759,42 @@ function streamTone(status: StreamStatus): 'ok' | 'warn' | 'error' { color: var(--accent-text); } +/* While the turn runs but no reply text has landed yet. Tool rows and + the thinking trace never render on this surface, so this line is the + turn's only pulse between its first event and its first delta — the + streaming cursor takes over once text arrives, and the line goes. + Reduced motion gets the static ring. */ +.working { + display: flex; + align-items: center; + gap: 8px; + margin: 4px 0 0; + color: var(--text3); + font-size: 12.5px; +} + +.spinner { + flex: none; + width: 12px; + height: 12px; + border: 2px solid var(--border-strong); + border-top-color: var(--accent); + border-radius: 50%; + animation: spin 0.8s linear infinite; +} + +@keyframes spin { + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: reduce) { + .spinner { + animation: none; + } +} + /* A consent card: the agent asking its human something — distinct from a tool row, toned by its resolution. */ .consent-card {