Skip to content

fix: chat header status dot reflects the stop phase - #21501

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/20397-stop-status-dot
Oct 17, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/20397-stop-status-dot

Conversation

@dodgeblaster

@dodgeblaster dodgeblaster commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Make the chat header's status dot turn red while a stop is under way, so it agrees with the "Stopping…" text instead of staying green as if the turn were working normally.

While a stop is in flight, the chat header's status dot stayed green — the same colour it shows for a turn that is working normally — so the dot and the "Stopping…" caption beside it disagreed. UX review on #19898 flagged it. The main chat header (the shared ChatPane header used by split-view panes and Crew Member DM panes) and the app-sdk ChatEmbed header both followed the same rule, so the mismatch was shared, not embed-only.

Why it matters

The status dot is the one glanceable signal of what a session is doing. A green dot means "working"; leaving it green through a stop tells the user the opposite of what the header text, the footer and the composer all say, so a stop in progress reads as a healthy running turn. One session can only be in one state, and the dot must say which.

Not a goal

  • No change to the stop MACHINE or its phases — this is a display fix over the signals the surfaces already read.
  • No new status string or colour token — the dot reuses the existing --ok / --danger tokens the footer caption already uses.
  • No change to the single-chat top overlay (ChatTitleOverlay), which has no status dot.

What changed (motivation → approach → change)

The two chat-header surfaces coloured their dot bg-ok (green) whenever the turn was running, with no branch for the stop phase — so a stop in flight kept the working colour. Each surface already computed the stop-under-way signal for the text beside the dot; the dot simply did not read it.

The fix routes the dot through that same signal. In ChatPane.tsx a single stopUnderWay is derived from exactly what its footer reads (streamState === 'stopping' || slots-frame stopping) and now feeds the dot, the header caption, the footer stopping prop and the composer isQueued prop — one copy where three inline copies stood. In ChatEmbed.tsx the dot reuses the existing stopUnderWay (stop_state !== 'idle' || slots-frame stopping). When it holds, the dot is bg-danger animate-pulse; otherwise the prior green-while-running / accent-while-idle (and muted-while-stalled, embed only) behaviour is unchanged. ChatPane.tsx's header caption also follows: while a stop is under way it reads a localized "Stopping…" in text-danger instead of the green run-state token, so the dot and the caption right beside it no longer contradict each other. Header, caption, footer and composer now describe one moment.

Backwards compatibility

Compatible: a className-only change on two existing header dots, gated on signals already in the store/poll; no contract, prop, API or data shape changes.

Removes nothing: no path, record, validator, key or function is hidden, removed or tightened.

Tests

website/src/test/chatHeaderStopDot.test.tsx (new): renders the REAL ChatPane (non-frameless, so the header dot renders) and the REAL ChatEmbed, and asserts the dot is bg-ok (not bg-danger) while a turn works normally and bg-danger (not bg-ok) while a stop is under way — for ChatPane both via the stopping stream state and via the slots-frame stopping flag, and for ChatEmbed via the polled stop_state. It also asserts the ChatPane header caption reads the green run-state token while working and a danger "Stopping…" while stopping. Proven: the "turns danger" cases fail on the parent commit (dot stays bg-ok) and pass on the fix; the "is green" cases pass on both.

Manual verification

Captured with the committed Playwright harness website/scripts/capture-20397-chat-header-stop-dot.mjs, which asserts the dot's computed background equals --ok while working and --danger while stopping (and that the two differ) before writing each PNG. See Screenshots.

Screenshots / video

Both header surfaces, dark and light, across all three states: working (green dot, run-state caption), a soft stop ("Stopping…"), and a force kill ("Killing…"). The dot uses the SAME --danger the footer and composer already use for the stop phase, and the caption reads the SAME localized "Stopping…"/"Killing…" the footer and ChatEmbed show — so the header reads as the stop phase the user asked for, in step with the rest of the surface, not as a new error state.

ChatPane header (split view / Crew Member DM) — working, stopping, killing (dark):

ChatPane header, working, dark — green dot, run-state caption
ChatPane header, stopping, dark — red dot + red Stopping…
ChatPane header, killing, dark — red dot + red Killing…

ChatEmbed header (app-sdk) — working, stopping, killing (dark):

ChatEmbed header, working, dark — green dot
ChatEmbed header, stopping, dark — red dot + red Stopping…
ChatEmbed header, killing, dark — red dot + red Killing…

Light theme (same three states, both surfaces)

ChatPane — working, stopping, killing:

ChatPane header, working, light
ChatPane header, stopping, light
ChatPane header, killing, light

ChatEmbed — working, stopping, killing:

ChatEmbed header, working, light
ChatEmbed header, stopping, light
ChatEmbed header, killing, light

Related Issues

Closes #20397

Pattern harvest

Not generalizable: a two-site display fix where the status indicator read a narrower signal (running) than the sibling text it sits with (stop phase); the fix points both at the one signal. No broader class to ratchet.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@dodgeblaster
dodgeblaster requested review from a team and KiroCrewCaptain as code owners October 17, 2026 06:26
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 17, 2026
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of c4e35aed62fa1fe0ef4394c730d21b8d468952a1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that the two headers agree when no turn is running: the ChatPane dot needs running && stopUnderWay, but the ChatEmbed dot only needs stopUnderWay.

[DESIGN-REVIEWED] c4e35ae

Description read

[DESCRIPTION-READ] b74ac36a7a09f0c6ee8cb6aea6868c69941f3a0c328b6f41fbe3c08bd1ce17f5

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of c4e35aed62fa1fe0ef4394c730d21b8d468952a1 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Check one thing: the ChatPane header caption now shows a localized "Stopping…"/"Killing…" in place of the raw run-state token, and the Goal names only the dot.

What this change ships

Inventory (6 items) — 6 justified

Intent: A user watching a chat header sees one consistent signal that their stop is under way, not a green "working" dot. This is a FIX.

  1. ChatPane header dot (split view and Crew Member DM panes) turns red and pulses while a stop is under way — justified
  2. ChatEmbed (app-sdk) header dot turns red and pulses while a stop is under way — justified
  3. ChatPane header caption reads "Stopping…"/"Killing…" in red during a stop, in place of the green run-state token — justified
  4. The footer and composer read one shared stopUnderWay value in place of two inline copies, with no behaviour change — justified
  5. Committed Playwright capture harness (website/capture/chat-header-stop-dot.*, scripts/capture-20397-*.mjs) — justified
  6. New tests pinning the dot and caption colours for both surfaces — justified

[FIRST-PRINCIPLES-REVIEWED] c4e35ae

Description read

[DESCRIPTION-READ] e71af3ba7069899b0818bb6e2b41d91dc87af9790a332162e05853be06b1ea41

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of c4e35aed62fa1fe0ef4394c730d21b8d468952a1 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Check whether a pulsing red dot for a stop the user started themselves reads as an error. The blind reader called it "a warning or 'shutting down' light."

[UX-REVIEWED] c4e35ae

Description read

[DESCRIPTION-READ] 7e4ec059c8849eda3211a5027ead8aa1b0f62b1ea777d48d87e4acb04fcd72b9

That sha256 names everything this verdict read: the PR description, plus the 15 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of c4e35aed62fa1fe0ef4394c730d21b8d468952a1 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c4e35ae

False positive or not applicable? A repository writer can comment:
/ai-review override gpt c4e35aed62fa1fe0ef4394c730d21b8d468952a1: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed c4e35aed62fa1fe0ef4394c730d21b8d468952a1 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] c4e35ae

Verdict parsed from the review's SHA-scoped output markers for commit c4e35aed62fa1fe0ef4394c730d21b8d468952a1.

False positive or not applicable? A repository writer can comment:
/ai-review override fable c4e35aed62fa1fe0ef4394c730d21b8d468952a1: <one-sentence reason>

@dodgeblaster
dodgeblaster force-pushed the fix/20397-stop-status-dot branch from 7a71f88 to c7a9aff Compare October 17, 2026 06:38
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Regenerated screenshots (red "Stopping…" caption):
sd
rd
sl
rl

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 17, 2026
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Screenshot assets (pane + embed, dark+light, working vs stopping):
pane-rd pane-sd pane-rl pane-sl
embed-rd embed-sd embed-rl embed-sl

p1

p2

p3

p4

e1

e2

e3

e4

@dodgeblaster
dodgeblaster force-pushed the fix/20397-stop-status-dot branch from c7a9aff to c657601 Compare October 17, 2026 06:54
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 17, 2026
@dodgeblaster
dodgeblaster force-pushed the fix/20397-stop-status-dot branch 3 times, most recently from afc0c67 to 04518c3 Compare October 17, 2026 07:15
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Screenshot assets v3 (pane+embed, running/stopping/killing, dark+light).

pane-running-dark

pane-stopping-dark

pane-killing-dark

pane-running-light

pane-stopping-light

pane-killing-light

embed-running-dark

embed-stopping-dark

embed-killing-dark

embed-running-light

embed-stopping-light

embed-killing-light

@dodgeblaster
dodgeblaster force-pushed the fix/20397-stop-status-dot branch 2 times, most recently from fa2ac04 to b12c359 Compare October 17, 2026 07:29
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/components (same-dir as this PR's files) since this head went green; CI re-running.

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: ChatPane header caption reads localized Stopping…/Killing… in danger while a stop is under way, instead of the raw run-state token.

  • ChatPane caption relabel during a stop (rebutted, in-goal): the caption change is not scope beyond the dot — it is what makes the header read one way, which is the issue's own ask.

#20397 says: "Make the header status indicator reflect the stop phase ... so header, composer and footer read one way." The dot alone cannot satisfy that: this PR's round-1 UX review BLOCKed precisely because a red dot sat beside a GREEN tool_running caption in the same header — the dot and its own caption disagreed. Relabeling the caption to the same localized Stopping…/Killing… the footer and ChatEmbed already show is the minimal fix for that BLOCK, not new scope.
It changes no run-state copy: the working-state caption is untouched (still the existing token), so only the stop phase — the subject of the issue — is relabeled. The decision is therefore review-mandated and on-goal; a maintainer who wants a narrower surface can say so on review.

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Frontend Tests (2) red is inherited base breakage, not this PR. The only failing test is MarkdownRenderer.domGolden.test.tsx > renders the prose document; this PR touches only ChatPane.tsx, ChatEmbed.tsx, their header test and the capture tooling — nothing near MarkdownRenderer, and that test passes locally on this branch. The same Frontend Tests (2) shard fails identically on backend-only PRs #21479 and #21482, which cannot affect frontend code — so the cause is shared, on main.

Root cause and fix are already tracked: #21535 (domGolden katex snapshot stale after katex 0.18.2 class rename) and PR #21536. This PR will rebase onto that fix once it lands and re-run to green; no change here is warranted.

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Update: the red checks have grown to Backend Tests (Windows) (4), Backend Tests (3.12, 4) and Frontend Coverage Merge alongside Frontend Tests (2) — all inherited, none ours. This PR is frontend-only (every changed file is under website/, zero Python), yet those backend shards fail identically on the backend-only PRs #21479 and #21482, which share none of this PR's code. Frontend Coverage Merge is downstream of the failed Frontend Tests (2) shard (it cannot merge a report a failed shard never produced). So every red here is shared base breakage; the domGolden one is tracked by #21535 / #21536. No change on this branch is warranted — it will rebase and go green once the base is fixed.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 17, 2026
@dodgeblaster
dodgeblaster force-pushed the fix/20397-stop-status-dot branch from b12c359 to c4e35ae Compare October 17, 2026 16:27
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Rebased onto current origin/main (includes #21581 / 5682590: PyJWT extras pin, katex 0.18.2 golden-snapshot update, codex-acp re-measure), which repaired the inherited base breakage that had blocked this PR. New head c4e35aed62. The previously-failing MarkdownRenderer.domGolden test now passes locally after a clean npm ci picks up katex 0.18.2 (the version the lockfile pins and the updated golden matches). No code change in this rebase — a pure replay of the single header-dot commit onto the repaired base.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 17, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 17, 2026 18:02

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tier 1 auto-approve: fix (6 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: display-only fix that routes the chat header status dot (ChatPane and ChatEmbed) through the existing stop-under-way signal so it turns red during a stop, with a regression test and a capture harness.

@KiroCrewCaptain
KiroCrewCaptain merged commit 4be3332 into main Oct 17, 2026
104 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/20397-stop-status-dot branch October 17, 2026 18:03
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat header status dot stays green while a stop is under way

2 participants