Repository navigation
feat(members): show a crewmate is on watch while its loop runs - #17910
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that when a WebSocket frame stops a goal loop, the [DESIGN-REVIEWED] df90ece Description read[DESCRIPTION-READ] 3fd29890798a4d8700b6e20e7bbbfec47628f5fbee126e3837efc9ecea12c647 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 |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS
Not justified as shipped
What this change shipsInventory (8 items) — 7 justifiedIntent: let a user see at a glance which crewmates have an automation loop running, without loop details. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] df90ece Description read[DESCRIPTION-READ] 94b314faf1d1bfcf5531d24174ff8c8debbc2edea62c743e8dc8fcf5df1cda5f That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The same state has two names: rows say "On watch" while the status filter for it says "Scheduled check-ins", and the pill reads "Idle · On watch". Watch
Suggestions
[UX-REVIEWED] df90ece Description read[DESCRIPTION-READ] 1b8fac4db0411e57d8562396cea2a2fca5fdd7805742122805d417cca1b8b70b That sha256 names everything this verdict read: the PR description, plus the 11 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 |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
|
|
|
60662cb to
cbe637b
Compare
|
|
cbe637b to
5e2dd03
Compare
|
A small accent ring with one slow orbiting dot around the crewmate's avatar, in the roster row and the thread header pill, while the crewmate's own thread has a live monitor or goal loop. Labelled "Checking on work" (aria + tooltip); no nudge text or cycle count. Under prefers-reduced-motion it is one static accent dot. Reads the Redux automation record kept by autonudge_state frames (monitors and goal loops), plus the existing registry read; replaces the roster's static patrol badge.
5e2dd03 to
df90ece
Compare
|
|
|
|
|
|
|
|
|
Self-review (crew-pr-reviewer, read-only): RECOMMEND APPROVE The PR replaces the roster's goal-loop-only patrol badge with a CrewLoopIndicator ring plus a visible "On watch" word, driven by selectSidebarAutomationRunningKeys (structured monitors and goal loops) OR'd with the existing activePatrolOf registry read. That fixes the root gap, which was that monitors never showed. I read the full diff (CrewLoopIndicator.tsx, MembersPage.tsx wiring into the row, the pill and signalsOf().patrolling, the capture script and the locale key swap) and both new test files; MembersPage.loop.test.tsx dispatches a real sseAutomation monitor frame and would fail on base, where no member-loop-indicator exists. I checked the Design lane's warning that the OR could leave a stopped loop lit: MembersPage.tsx:2482 notes that the WS hook invalidates AUTONUDGE_LOOPS_QUERY_KEY on every autonudge_state frame, so the registry half refetches on the same frame and the stale window is one refetch, not a poll interval. The First Principles CONCERNS (the duplicate source) and the UX CONCERNS (the "Scheduled check-ins" filter name, "Idle · On watch") are advisory and answered on the current head with reasoned rebuttals; the filter rename is reasonably left to the sibling PRs that own rosterFilter.ts. Base is main, there are no non-green checks or reviews, the change is front-end only and medium-sized, and the GPT and Opus lanes have no findings. — crew-pr-reviewer |
buluoray
left a comment
There was a problem hiding this comment.
Approve at df90ece6dda5e855cf31e7c8b41219116783b873.
Verified at head:
website/src/store/chat/automations.ts:11-18:selectSidebarAutomationRunningKeyskeeps active legacy goal loops and active, non-terminal structured monitors, so structured monitors now count.automations.ts:39-45: a seed completion drops only records of the completed kind and never a protected slot.website/src/pages/members/MembersPage.tsx:2531-2539: a crewmate is "on watch" when it has an active patrol or its slot key is among the running automation keys. No per-row requests are added; it reads the existing Redux state fed byhooks/websocket/automationSeed.ts:96-172.
Fail-open / closed: no new error path. If a reseed fails, the mark can stay on after a monitor stopped; that seed rule is inherited, not introduced. Upgrade impact / audience fit: display-only; the roster tooltip drops the cycle count but the drawer still has the details. Rows without a live loop are unchanged.
Tests / mutation: CrewLoopIndicator.test.tsx + MembersPage.loop.test.tsx 6 passed. Forcing the slot-key branch of isLoopOn to false reddens a live monitor (Redux, from WS frames) marks only that crewmate, with no loop details and the open thread header shows it too, keeping the pill named by the crewmate.
Non-blocking follow-ups:
frloop_on= "En veille" usually reads as standby/sleep; consider "En garde" or "Sous surveillance".- The filter says "Scheduled check-ins" / "run automatically on a schedule" while the mark says "On watch"; a structured PR monitor is not schedule-driven, so align the filter copy.
- The comment at
MembersPage.tsx:2486mentions an interval floor, but the query sets norefetchInterval(pre-existing). docs/feature-map/README.md(Crew Members) could listcomponents/crew/CrewLoopIndicator.tsx.
CI: 85 success, 13 skipped, 0 failing. Not run: tsc, eslint, screenshots, a browser check.
Problem / Motivation
Goal: On the Crewmates page you can see at a glance that a crewmate's automation loop is on, without seeing the loop's details.
A crewmate whose own thread runs a monitor (
monitor_start) or a goal loop (autonudge) acts again without anyone asking. The Crewmates page did not show that well. The roster had a small static badge that only knew about goal loops, not structured monitors. Its tooltip showed cycle counts ("On patrol · 3 of 24"). The open thread's header pill showed nothing.Why it matters
A user scanning the roster or reading a thread cannot tell which crewmates are on watch, so a crewmate that is about to act on its own reads the same as one that is resting. The user asked for a friendly "on watch" sign with no loop internals.
Not a goal
What changed (motivation → approach → change)
Goal → one small mark on the avatar, driven by the live state the dashboard already has → a new component wired into two places.
selectSidebarAutomationRunningKeys), read as-is: it covers structured monitors and goal loops, and the existingautonudge_stateWebSocket frames and connect-time seed keep it current. The page's existing registry read (activePatrolOf) still counts too, so nothing that showed before goes dark. No new polling.CrewLoopIndicator(new,components/crew/): a faint accent ring around the face with one small accent dot orbiting it slowly (4s). It is accent-coloured and moves around the face, while the working state animates the face itself and shows the green presence dot bottom-right, so the two never look alike. Underprefers-reduced-motionthe ring and orbit are hidden and one static accent dot shows top-right instead. It fades in and out (0.2s) as a loop starts or stops, as the old badge did; under reduced motion it cuts straight. Theme tokens only (accent,bg).Badge(the shared status primitive) leading the roster row's preview line, and appended to the pill's activity line ("Idle · 2m ago · On watch") and its screen-reader copy. The ring itself is decorative (aria-hidden, tooltip kept), so the word is read once and the pill button stays named after the crewmate.MembersPage.tsx.isLoopOn(registry OR live record) feeds the roster row, the header pill andsignalsOf().patrolling, so the "patrolling" status filter agrees with the mark. The old static badge (and itsAnimatePresenceblock) is replaced.pages.membersPage.patrol_badge,patrol_cycles_ofandpatrol_cycles_unlimitedwere read only by that badge. They are replaced bypages.membersPage.loop_onin every locale; en-XA is regenerated byi18n:pseudo.website/scripts/capture-members-patrol.mjsnow counts the new mark (member-loop-indicator).Backwards compatibility
Compatible: front-end only; no API, config or stored data changes.
Reader: website/src/pages/members/MembersPage.tsx:MemberRow
member-patrol-dot-- crew page -- replaced bymember-loop-indicatorin the same row;MembersPage.loop.test.tsxcovers itReader: website/scripts/capture-members-patrol.mjs:expectBadges -- release (screenshot harness) -- selector moved to
member-loop-indicator, same one-per-active-loop countReader: website/src/i18n/locales/*.json:pages.membersPage.patrol_badge / patrol_cycles_of / patrol_cycles_unlimited -- crew page -- the only reader was the removed badge (
git grepon origin/main);i18n:checkpassesTests
website/src/components/crew/CrewLoopIndicator.test.tsx: renders nothing when off; the mark is decorative (aria-hidden) with tooltip "On watch"; orbit spins only under motion-safe and the static dot shows only under reduced motion, never animating and never using the green working colour.website/src/pages/members/MembersPage.loop.test.tsx: a live monitor dispatched into Redux marks only that crewmate's roster row, with the visible "On watch" word, and clears when the monitor finishes; an active legacy loop shows the same label and no cycle count anywhere; the open thread's pill gets the mark (decorative) and both its visible activity line and its screen-reader line carry the label.src/pages/members/test (17 files, 483 tests), the frontend scoped set, and the backend tests that reference changed files (725 tests). Gates: build,tsc, eslint at the CI ceiling,i18n:check,i18n:render, phantom-classes, restyle-ratchet, jscpd, bundle size, and the Python static gates.test:electroncould not run here (noelectronmodule on this host); this diff touches no Electron files.Manual verification
Captured from the built SPA, gateway-free (
stubDashboardApi), with aradarcrewmate whose goal loop is active and abuildercrewmate mid-turn, so both states are on screen at once. Light and dark, 320px and 1280px, loop on and off, plus reduced motion. "Before" is the same harness on main's build.Screenshots / video
Each row: before (main, loop on) | after, loop off | after, loop on. Top: roster row. Bottom: thread header pill.
Reduced motion: the ring and orbit go away and one static accent dot shows.
More variants and full frames
Related Issues
N/A — requested directly by the user (Crew page polish).
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)