feat(ui): blue 'Agent activity' card status, drop the ugly body caption#271
Merged
Conversation
The spontaneous between-turn card was leading every body with an italic `Agent activity between turns (background task return, teammate ping, or /goal evaluator):` caption. Users called it out as visual clutter — and the underlying signal (this is a between-turn burst, not a regular turn) should come from card chrome anyway, not from a long preamble. Drop the caption; carry the signal in the card header instead. - New `CardStatus = 'agent_activity'` — rendered as a blue header with the title "Agent activity" + 🔵 icon. Distinct from `running` / `thinking` (also blue but titled "Running…"/"Thinking…") and from `complete` (green) so users can tell at a glance whether the card is a live turn, a finished reply, or a between-turn burst. - `flushSpontaneous` now uses the new status; `formatSpontaneousCardBody` returns just the latest snippet (and the coalesced-count footer for N>1 bursts) — no italic caption. - Add a guard in `flushSpontaneous`: if the buffer somehow has zero snippets (e.g. tool-only burst that got fully filtered by the text-only extractor in #269), skip the card entirely. The empty card case is now unreachable but the guard is cheap insurance. - Mirror the new status into v1 + v2 card builders, the Telegram sender's STATUS_EMOJI/STATUS_LABEL maps, and the web frontend CardStatus union. Drop the now-unused SPONTANEOUS_CARD_HEADER export and the regression tests that pinned its phrasing. Tests - card-builder + card-builder-v2: add an agent_activity render test asserting blue header + "Agent activity" title + no body caption. - message-bridge: rewrite formatSpontaneousCardBody tests to assert the body is exactly the latest snippet, with no italic caption and no "between turns" / "long-running" substrings. 291 / 291 vitest pass. Build + lint clean (2 pre-existing warnings). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SimonYeyi
pushed a commit
to SimonYeyi/metabot
that referenced
this pull request
May 26, 2026
…on (xvirobotics#271) The spontaneous between-turn card was leading every body with an italic `Agent activity between turns (background task return, teammate ping, or /goal evaluator):` caption. Users called it out as visual clutter — and the underlying signal (this is a between-turn burst, not a regular turn) should come from card chrome anyway, not from a long preamble. Drop the caption; carry the signal in the card header instead. - New `CardStatus = 'agent_activity'` — rendered as a blue header with the title "Agent activity" + 🔵 icon. Distinct from `running` / `thinking` (also blue but titled "Running…"/"Thinking…") and from `complete` (green) so users can tell at a glance whether the card is a live turn, a finished reply, or a between-turn burst. - `flushSpontaneous` now uses the new status; `formatSpontaneousCardBody` returns just the latest snippet (and the coalesced-count footer for N>1 bursts) — no italic caption. - Add a guard in `flushSpontaneous`: if the buffer somehow has zero snippets (e.g. tool-only burst that got fully filtered by the text-only extractor in xvirobotics#269), skip the card entirely. The empty card case is now unreachable but the guard is cheap insurance. - Mirror the new status into v1 + v2 card builders, the Telegram sender's STATUS_EMOJI/STATUS_LABEL maps, and the web frontend CardStatus union. Drop the now-unused SPONTANEOUS_CARD_HEADER export and the regression tests that pinned its phrasing. Tests - card-builder + card-builder-v2: add an agent_activity render test asserting blue header + "Agent activity" title + no body caption. - message-bridge: rewrite formatSpontaneousCardBody tests to assert the body is exactly the latest snippet, with no italic caption and no "between turns" / "long-running" substrings. 291 / 291 vitest pass. Build + lint clean (2 pre-existing warnings). Co-authored-by: Flood Sung <floodsung@xvirobotics.ai> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The spontaneous between-turn card was prepending an italic `Agent activity between turns (background task return, teammate ping, or /goal evaluator):` caption to every body. Users said it was visual clutter, and the underlying signal ("this is a between-turn burst, not a normal turn") should come from card chrome anyway.
This PR moves the signal into the card header:
Before / After (v2 card)
/goalevaluator):Test plan
🤖 Generated with Claude Code