Repository navigation
fix(members): show the roster patrol badge only while a loop is active - #9525
satyam-thakur wants to merge 2 commits into
Conversation
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
23f8c5c to
dcee7ee
Compare
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
|
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsAll i18n keys exist across every locale, No findings. [OPUS-REVIEWED] bcbbfc8 |
GPT 5.6 Review (fork) — 🔴 changes requested (blocking)Reviewed Adjudication upheld 1 of 1 blocking finding(s); those must be resolved before merging. BLOCKING -- website/src/pages/members/MembersPage.tsx:706 -- Feature map no longer matches roster badge behavior
Adjudication (Opus 4.8) — is blocking on each finding proportionate?F1 is anchored to HARM: n/a — decided by the blocking-rule flag, not the harm ladder. |
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of Reconciliation complete. The diff changes one user-visible element — the roster patrol badge on member avatars: benign stops ( UX-Verdict: CONCERNS The warn badge now exclusively means "stopped waiting on you," but its label still says only "Patrol stopped" — the incident's cause and cure stay hidden in the drawer. Watch
Evidence gaps
Suggestions
[UX-REVIEWED] bcbbfc8 |
First Principles Review (Fable 5, fork) — 🔴 BLOCKPremise-level review of All verification is done. The findings: (1) the loosened presence-dot test pin rests on a claim the base code contradicts — only one fixture row runs, and the dot renders solely for running members, so the strict exactly-1 assertion still passes; (2) the benign-stop list omits First-Principles-Verdict: BLOCK The presence-dot pin is loosened on a false premise — only one fixture row runs, so the exactly-1 assertion still passes; restore it. Not justified as shipped
What this change shipsInventory (5 items) — 2 justifiedIntent: stop marking benignly-idle members with a permanent warn badge while keeping an approval-stalled patrol visible on the roster — a FIX (issue #9420; base
BlockersLoosened presence-dot pin, justified by a claim the base contradicts. The description says it was "loosened from exactly-1 to at-least-1 because the fixture now has multiple members with presence dots" — but the dot's single render site is guarded by WatchThe reported defect survives for Subtractions
[FIRST-PRINCIPLES-REVIEWED] bcbbfc8 |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The benign-list is incomplete: Watch
SuggestionsDerive both the roster severity and the drawer sentence from one table keyed by stop code (extend [DESIGN-REVIEWED] bcbbfc8 |
…for approval_stalled Fixes kirodotdev#9420. A standing warn badge sat on every member whose auto-patrol loop had stopped, even when the stop was a normal resting state, so the roster was noisy with marks that signalled nothing actionable. **Scoped, not blanket.** `patrolBadgeOf` is now three-state: - `active` -> accent badge (unchanged). - stopped `manual` / `cycle_cap` / `runtime_budget` -> no badge. These are benign resting states; the stop reason lives in the drawer's Auto patrol block. - stopped `approval_stalled` (or any unknown/future code) -> `warn` badge. A patrol that died waiting on a tool approval is an INCIDENT, revived only by operator action; on a surface whose failure mode is silence it must show at the roster, not only once the drawer is opened. **patrol_badge_stopped** i18n key kept (all 13 catalogs) — it is the warn badge's label. **Test** rewritten to pin all three states: active shows an accent badge, a cycle_cap stop shows none, an approval_stalled stop shows a warn badge. tsc clean; 76/76 MembersPage tests pass.
dcee7ee to
36aa025
Compare
|
Addressed the Design Review block (and the UX / First-Principles concerns) — pushed What changed: the badge suppression is now keyed off
This is the fix all three lanes prescribed: it delivers #9420's intent (drop the standing warn mark on normally-idle members) without hiding the incident case the original pin existed to surface. Unknown codes fail visible, not silent, matching the monitoring surface's failure mode. Notes: |
Problem / Motivation
On the Crew Members roster, a member with a stopped auto-patrol (monitor loop) kept a warn-yellow pause badge on its avatar. Most loops stop for normal reasons — cycle cap reached, runtime budget spent, or stopped by hand — so nearly every idle member wore a permanent yellow mark. At a glance that reads as "something is wrong with this member," an error rather than a resting state.
Why it matters
Idle-for-a-benign-reason is the common case, so the yellow badge was on-screen almost all the time. A standing warning colour on a normal end state trains the eye to ignore it. But one stop reason is not benign:
approval_stalledmeans a patrol stopped because a tool approval went unanswered, and it comes back only when the operator acts. Removing the badge for every stop reason — the naive fix — would silence that incident too, so a dead-waiting-on-you patrol would look identical to no patrol and be discoverable only by opening its drawer. On a monitoring surface, silence is the wrong failure mode.What changed (motivation → approach → change)
Symptom: idle members show a yellow "patrol stopped" badge forever. Root cause:
patrolBadgeOfrendered a badge for bothactiveandstopped, regardless of why it stopped. Approach: split stops into benign vs incident rather than dropping the stopped badge wholesale.Change:
patrolBadgeOfnow returns'active' | 'warn' | null, keyed offstopped_reason. An active loop returns'active'(accent badge, unchanged). A loop stopped formanual/cycle_cap/runtime_budgetreturnsnull— no badge; the reason stays in the drawer's Auto patrol block. A loop stopped forapproval_stalled— plus any unknown or future terminal code — returns'warn', keeping a warn-colour pause badge at the roster so the incident stays visible. The badge'sdata-statefor a stopped-incident iswarn(wasstopped); thepatrol_badge_stoppedi18n label is retained in all 13 catalogs (it is the warn badge's text), so the net i18n diff versus base is zero.flowchart LR L[loop record]:::ctx --> A{active?}:::ctx A -->|yes| ACT[accent badge]:::ctx A -->|no| R{stopped_reason}:::changed R -->|manual / cycle_cap / runtime_budget| NONE[no badge]:::added R -->|approval_stalled / unknown| WARN[warn badge]:::ctx classDef added fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:2px classDef changed fill:#FEF3C7,stroke:#D97706,color:#78350F,stroke-width:2px classDef removed fill:#FEE2E2,stroke:#DC2626,color:#7F1D1D,stroke-dasharray:4 3 classDef ctx fill:#E0F2FE,stroke:#0284C7,color:#0C4A6E linkStyle 3 stroke:#16A34A,stroke-width:2px🟩 added · 🟨 changed · 🟥 removed · 🟦 unchanged
A stopped loop's badge now depends on why it stopped: benign reasons show nothing, an approval-stalled (or unknown) stop keeps a warn badge so the operator sees the incident on the roster.
Tests
Rewrote the roster-badge test in
MembersPage.test.tsxto pin all three states: an active loop shows the accent badge with its wake-count label, acycle_capstop shows no badge, and anapproval_stalledstop shows adata-state="warn"badge labelled "Patrol stopped". The presence-dot assertion is loosened from exactly-1 to at-least-1 because the fixture now has multiple members with presence dots. All 76MembersPagetests pass;tsc -bis clean.Manual verification
N/A — unit coverage sufficient. The change is a verdict function plus its render branch, both covered by the three-state roster-badge test; the drawer block is untouched.
Screenshots / video
Why no screenshot: the only new rendered state is the warn badge for
approval_stalled, which reuses the pre-existing warn colour, pause glyph, and "Patrol stopped" label that already shipped for the old stopped badge — no new visual vocabulary is introduced, and the three-state behavior is asserted by the unit test.Related Issues
Fixes #9420
Pattern harvest
Rule candidate: review-prompt
Pattern: a fix that removes a signal for a whole category should check whether the category contains an incident sub-case that must stay visible — "no badge for stopped" hid
approval_stalled; the scoped fix keeps it.Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)