Skip to content

fix(members): show the roster patrol badge only while a loop is active - #9422

Merged
chenmingwei23 merged 1 commit into
mainfrom
fix/members-patrol-badge-active-only
Sep 9, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
fix/members-patrol-badge-active-only

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #9420. Follow-up to #8936 (which added the badge for the #8931 incident).

Why

Since #8936 the roster put a badge on a member's avatar whenever an auto-patrol record existed: accent goal glyph while active, warn-yellow pause glyph once stopped. Stopped is the resting state of most members — every cycle-capped, budget-expired or hand-stopped loop leaves a record — so most idle avatars wore a permanent yellow mark that read as "this member is broken". PM review of the shipped page: 做成如果有自动巡检才加一个标,不然有一个这个标很 confusing ("only add a mark when there IS an auto patrol; otherwise the mark is confusing").

Stopped is not an incident, and the roster already has the idiom for this: the presence dot (#6859) and the unread dot render only while there is something to say. The stop reason has a home — the drawer's Auto patrol block — and it stays there.

What

  • website/src/pages/members/MembersPage.tsx — roster badge is two-state. patrolBadgeOf (three-way verdict) becomes activePatrolOf, returning the loop record only while active; the render drops the stopped branch, the bg-warn fill, the Pause glyph and the colour-flip transition. Tooltip / aria-label keep the drawer's spelling ("On patrol · 3 of 24" / "61 · no limit"). data-state="active" is kept on the element so the harness and tests still address the badge by state.
  • Transition (ci(ux-review): blind-read pass + state-transition continuity lens #8718 lens): mount/unmount stays animated through the existing AnimatePresence — when a loop stops the badge fades out rather than vanishing, and no intermediate yellow state appears. New useReducedMotion() read: under prefers-reduced-motion the tween is skipped (initial: false, duration: 0) and the badge cuts straight to its new state.
  • Drawer block unchanged — active / stopped with reason + last wake / nothing scheduled, plus loading and failed states. Wake sources unchanged. The needs_you pill (feat(members): chat-profile projection and escalation cards in the DM thread #8614), presence dot and unread dot keep their positions; the badge's corner is unchanged.
  • i18n: pages.membersPage.patrol_badge_stopped removed from all 13 catalogs (line-anchored delete, no re-sort) and en-XA regenerated (i18n:pseudo, 13016 keys). Zero remaining references. lint:i18n and i18n:check green.
  • docs/feature-map/README.md — Crew Members row now says the badge shows only while a loop is active.
  • Scope: only the badge block and its verdict helper are touched — the drag-handle / surface-parity work (chat-703) and the React Query migration (chat-705) in the same file are not overlapped; base is current origin/main.

Tests

MembersPage.test.tsx:

  • the mixed roster case (radar active + running, scout stopped at cap, scribe never armed) now asserts exactly one badge, on radar, data-state="active", aria-label 3 of 24, beside the single presence dot, and no element titled "Patrol stopped".
  • new: a loop that stops in place (registry re-read flips active to false, what the websocket hook triggers) drops the badge after the exit tween with no "stopped" badge in between.
  • the drawer's stopped-with-reason case is untouched and still pins the reason line.

Local: tsc -b, eslint on both files, lint:i18n, i18n:check green. vitest left to CI per the lane rules.

Screenshot Evidence

Capture harness website/scripts/capture-members-patrol.mjs (real built SPA over stubDashboardApi, no gateway), updated to assert exactly one badge per active loop and none otherwise before every frame — a frame can only be written from the state it claims. Five-member roster: radar (active 3/24, running) and ledger (active, unlimited) beside scout (stopped at wake limit), scribe (stopped, approval stalled) and fixer (never armed).

Active and stopped members side by side, dark — radar and ledger carry the accent badge; scout / scribe / fixer show nothing. radar's drawer open:

active dark

Same roster, light:

active light

scout's drawer: the stop reason ("Patrol stopped. Reached its wake limit. Last wake 4h ago") lives here — and scout's avatar in the roster has no badge:

stopped dark

scribe stopped on a stalled approval — same: reason in the drawer, no roster mark:

stalled dark

fixer, nothing scheduled:

none dark

Unlimited cap tooltip spelling preserved on ledger:

unlimited dark

Registry read in flight / failed (unchanged behaviour, re-captured on this head):

loading

error

Transition recording — fixer's badge fades in when a loop arms, then fades out when the loop stops (real autonudge_state frames pushed over the page's own /api/ws); there is no yellow intermediate state:

Drawer block none → active → stopped (unchanged, re-recorded):

Pattern harvest

Rule candidate: design-lane / AUTOSDE — a per-item status mark on an avatar or row (dot, badge, pill) renders only while its positive state holds; a standing placeholder for the "off" state is a finding. Pattern: condition ? <on-mark/> : <off-mark/> where the off branch renders a persistent glyph.

  • Appearance is the signal. A roster marker for a per-member state should render only while the state is on; a standing "off" placeholder competes with the on marker and reads as an error. Third instance on this page (fix(members): render the presence dot only while a member is working #6859 presence dot, unread dot, now patrol). Candidate for a design-lane rule: an avatar/row status mark needs a positive state to exist.
  • Detail keeps the reason, roster keeps the presence. When a state has a reason string (stopped_reason), the roster shows presence only and the drawer shows the reason — one place for each, not both.
  • Removing a state still needs the transition. Dropping a rendered state is itself a state change the user sees (badge disappears); keep the exit tween and add the reduced-motion cut rather than deleting the animation along with the branch.

@CrysisDeu
CrysisDeu requested review from a team and smeyffret September 8, 2026 08:48
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — 🟡 CONCERNS

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

Design-Verdict: CONCERNS

Fixing the badge-noise problem by deleting the entire stopped state re-opens the #8931 blind spot for anomalous stops, which the PM quote never addressed.

Watch

The removed pin was written for an incident, not as a gap: the old test said "the dead patrol must show at the roster, not only in the drawer," and the old comment called a dead patrol "the thing this page exists to make visible at a glance." The PM directive quoted ("otherwise the mark is confusing") targets the resting stops — cycle-capped, budget-expired, hand-stopped — but the PR collapses the anomalous class into the same invisibility: scribe's approval-stalled patrol (the #8931 case) now shows nothing on the roster, so a silently dead patrol is again discoverable only by opening each member's drawer. The roster row's other marks (presence dot, unread dot) don't carry this signal.
Clears when: evidence that an anomalous stop already surfaces at roster level through another mark (e.g. the pending approval flags the row), or an explicit human product decision accepting drawer-only visibility for the stalled class.

Suggestions

[DESIGN-REVIEWED] 06f4b36

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 06f4b36

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

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

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 06f4b36a00b04150459cca9642607a58ccb200e7 — 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.

All evidence gathered. The fix has a linked issue (#9420) and PM-report provenance; the deleted pin ("a dead patrol must show at the roster") is reversed with that evidence quoted; patrol_badge_stopped has zero remaining references; temp-screenshots/ and useReducedMotion are both established repo conventions (30+ sibling directories, 20+ component usages, and the reduced-motion rule is documented in website/AGENTS.md); the only leftover surface is the now-constant data-state="active" whose consumers outside tests/harness count zero.

First-Principles-Verdict: PASS

Verify #9420 records the product decision to give up roster-level dead-patrol visibility — this PR reverses the pin #8936 shipped for incident #8931.

Not justified as shipped

  1. Reduced-motion cut for the badge tween — rides along: declared, derived from the prefers-reduced-motion rule in website/AGENTS.md and the repo-wide useReducedMotion idiom (20+ components); harm-free rider, inventory only.

What this change ships

Intent: stop idle members from wearing a permanent yellow "patrol stopped" mark that reads as broken — a FIX.

  1. Stopped loops no longer show any badge on roster avatars — justified
  2. A stopping loop fades its badge out with no yellow intermediate state — justified
  3. Reduced-motion users get an instant cut instead of the fade — rides along
  4. "Patrol stopped" string deleted from all 13 catalogs — justified
  5. Feature-map row updated to the new badge rule — justified
  6. Capture harness re-asserts one-badge-per-active-loop; screenshots re-baselined — justified

Subtractions

  • Drop data-state="active" on the badge — one variant is ever rendered, and consumers outside tests/harness count zero (grepped member-patrol-dot: 3 files — component, test, capture script); the testid alone addresses it.

[FIRST-PRINCIPLES-REVIEWED] 06f4b36

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 06f4b36a00b04150459cca9642607a58ccb200e7 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 06f4b36

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

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

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

All evidence reconciles cleanly. The changed element — the roster patrol badge, now active-only — was correctly identified by the blind reader ("the purple badge I think matches the 'Patrolling' status"); its absence for stopped/stalled/never-armed members is shown in shots 04–06; loading and error states are re-captured; and both animated transitions (badge arm/fade-out, drawer block crossfade) ship as committed recordings, with the exit being an animated fade of the same element plus a reduced-motion path — no hard swap. The "tiny dark badge" the reader saw on scout persists even in the error shot where real badges vanish, so it's avatar artwork, not a phantom stopped indicator. The stalled-approval discoverability question is neutralized by the fact that the old warn badge was wallpaper (every idle member wore it), and pending approvals keep the existing needs_you pill.

UX-Verdict: PASS

Blind reader correctly identified the active-only badge, every state is screenshotted in both themes, and both transitions ship as recordings with reduced-motion handled.

[UX-REVIEWED] 06f4b36

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

Copy link
Copy Markdown
Contributor Author

@CrysisDeu

Copy link
Copy Markdown
Contributor Author
  • Dropping the warn badge also silences the one stop that needs the user: an approval-stalled patrol now dies invisibly at the roster — Rebut (accept as designed). The premise "dead until the user acts" does not hold for this stop reason: autonudge.notify_approval_stalled is only called when the approval prompt has ALREADY timed out with no decision, and the loop is stopped by _timer on the next wake — there is no approval waiting to be answered once the roster sees the record. The only remedy is a re-arm, identical to a cap / budget / manual stop, and the drawer has no restart control yet (deferred to fix/autonudge-member-self-loop, per feat(members): show each member's auto-patrol (monitor loop) status #8936 rounds 4–7) — the blind reader's "I'd want a 'review the approval' button" is that deferred gap, not something a roster mark can satisfy. A warn mark scoped to this reason would be a standing placeholder pointing at nothing actionable, which is the PM's [insider] Members roster shows a yellow "patrol stopped" badge that reads as an error; show a badge only while a loop is active #9420 complaint restated. The two-state badge is the PM's explicit directive for this page; the stop reason remains spelled in the drawer block (frame 05). When the re-arm control exists, a roster mark for user-actionable stops is the right follow-up and belongs with that PR.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Sep 8, 2026
@CrysisDeu
CrysisDeu force-pushed the fix/members-patrol-badge-active-only branch from b9950c2 to 68b19a8 Compare September 8, 2026 19:00
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Sep 8, 2026
Since #8936 a member's avatar carried a badge whenever an auto-patrol
record existed for its thread: accent while active, warn-yellow with a
pause glyph once the loop had stopped. Stopped is the resting state of
most members (every cycle-capped or hand-stopped loop leaves a record),
so most idle avatars wore a permanent yellow mark that read as "this
member is broken" rather than "nothing is scheduled".

The roster badge is now two-state: the accent goal glyph with its
"On patrol · 3 of 24" tooltip while the loop is ACTIVE, and no badge at
all otherwise — a stopped loop and a never-armed member look the same
at the roster, the way the presence dot (#6859) and unread dot already
work: appearance is the signal. The drawer's Auto patrol block keeps
its full three verdicts (active / stopped with reason and last wake /
none); the stop reason lives there.

Fade-out on stop stays through AnimatePresence (no hard vanish, #8718);
`useReducedMotion` cuts the tween under prefers-reduced-motion. The
`patrol_badge_stopped` key is removed from all 13 catalogs and en-XA
is regenerated. Tests pin one badge on a mixed active/stopped/never
roster and no intermediate "stopped" badge when a loop stops in place.
The capture harness asserts exactly one badge per active loop.

Closes #9420
@CrysisDeu
CrysisDeu force-pushed the fix/members-patrol-badge-active-only branch from 68b19a8 to 06f4b36 Compare September 8, 2026 20:33
@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 Sep 8, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Sep 8, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) September 9, 2026 07:23
@chenmingwei23
chenmingwei23 merged commit 20ae6d4 into main Sep 9, 2026
65 checks passed
@chenmingwei23
chenmingwei23 deleted the fix/members-patrol-badge-active-only branch September 9, 2026 08:15
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 9, 2026
amadsalmon pushed a commit to amadsalmon/KiroCrew that referenced this pull request Sep 22, 2026
kirodotdev#9422)

Since kirodotdev#8936 a member's avatar carried a badge whenever an auto-patrol
record existed for its thread: accent while active, warn-yellow with a
pause glyph once the loop had stopped. Stopped is the resting state of
most members (every cycle-capped or hand-stopped loop leaves a record),
so most idle avatars wore a permanent yellow mark that read as "this
member is broken" rather than "nothing is scheduled".

The roster badge is now two-state: the accent goal glyph with its
"On patrol · 3 of 24" tooltip while the loop is ACTIVE, and no badge at
all otherwise — a stopped loop and a never-armed member look the same
at the roster, the way the presence dot (kirodotdev#6859) and unread dot already
work: appearance is the signal. The drawer's Auto patrol block keeps
its full three verdicts (active / stopped with reason and last wake /
none); the stop reason lives there.

Fade-out on stop stays through AnimatePresence (no hard vanish, kirodotdev#8718);
`useReducedMotion` cuts the tween under prefers-reduced-motion. The
`patrol_badge_stopped` key is removed from all 13 catalogs and en-XA
is regenerated. Tests pin one badge on a mixed active/stopped/never
roster and no intermediate "stopped" badge when a loop stops in place.
The capture harness asserts exactly one badge per active loop.

Closes kirodotdev#9420
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.

[insider] Members roster shows a yellow "patrol stopped" badge that reads as an error; show a badge only while a loop is active

2 participants