Repository navigation
fix(monitor): guard the legacy goal's clear like the monitor's - #9845
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Real hazard (unguarded irreversible erase on one of two surfaces), closed by reusing the sibling surface's existing guard rather than inventing a new pattern. Suggestions
[DESIGN-REVIEWED] da0d40d |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsNo findings. The sole candidate is a transient one-frame flicker: an already-stopped loop with a primed clear-confirm that another client restarts renders, for one post-paint frame, "Stop loop" without the Save button before the reset [OPUS-REVIEWED] da0d40d Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The guard reads correctly cold — every confirm label and question was understood — but the press-to-confirm row swap ships with no recording, only assertions. Watch
Evidence gaps
Suggestions
[UX-REVIEWED] da0d40d |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of All claims verified: First-Principles-Verdict: PASS The 12 non-English confirm strings are new in this PR; only Korean style is machine-gated (koStyle.test.ts) — a human should spot-check the rest. What this change shipsInventory (10 items) — 10 justifiedIntent: make the legacy goal view's irreversible erase ask first and look dangerous, as the monitor surface's identical erase already does — a FIX (UX review of #9788; the new tests fail on base).
Notes a human can audit: item 3 is mandated by the blocking [FIRST-PRINCIPLES-REVIEWED] da0d40d |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 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: |
f3caad5 to
9dfe9fb
Compare
Follow-through on the UX review of #9788, which merged with the finding open. Both surfaces now erase a stopped automation for good, but only the monitor's was guarded: the legacy goal view's "Clear stopped goal" fired the DELETE on one plain grey click. A blind reader named it: "this delete button is plain grey with no warning colour, which makes it easier to hit by mistake" and "I cannot tell whether it deletes instantly with no are-you-sure". The legacy control is now danger-coloured unconditionally (not on :hover, which a touch viewport never produces) and asks first, reusing the monitor surface's two-step. The confirmation replaces the primary CTA rather than sitting beside it, so the row keeps its two-control cap. Both confirm labels now restate the action and its object, because neither confirm row renders a question: "Yes, clear it" answered one that was never asked. They read "Clear goal for good" and "Clear monitor for good".
9dfe9fb to
da0d40d
Compare
Reverts #5185 and its three follow-ups (#9788, #9845, #10190), which replaced the composer's generic monitor/auto-nudge popover with a pull-request-only "Bounded pull request monitor" form. The composer trigger opens AutoNudgePopover again, so a session can arm a goal loop for any target from the dashboard instead of being asked for a GitHub pull request URL. The frontend automation-record layer #5185 introduced goes with it: SessionAutomationPopover, MonitorRadar, the monitoring/automation normalizer and its contract.json, the per-slot REST automation snapshots in ChatPage / ChatSidebar / chatSlice / useWebSocket, and the sessionAutomationPopover catalog block in all 13 i18n catalogs. The follow-ups' clear-a-stopped-record path goes with it too, since both surfaces it guarded were part of that layer. The monitor_watch MCP tool and the src/kiro_crew/monitoring structured-monitor engine are untouched: agents can still arm, inspect and stop a bounded monitor. Only the fields and routes #5185 itself added for the dashboard surface are removed with it. Conflict resolutions worth naming, all preserving post-#5185 unrelated work: - The 13 i18n catalogs plus en.manual.json keep every key intervening commits added; only the sessionAutomation / bounded-monitor keys are removed. - ChatSidebar keeps its pending_decision status row and ChatPage its extended dependency list; ChatSliceCoverage keeps the fetchSlots import a later commit started using. - learn-cron-dashboard.md keeps the provider-evidence and legacy-cap paragraphs that landed after #5185, and drops the AutomationRecord SPA spec block. - The babysit skill no longer points at the removed Clear stopped monitor control. - The throwaway temp-screenshots evidence files from #9845 and #10190 are deleted rather than restored.
Reverts the dashboard layer of #5185 and its follow-ups (#9788, #9845, with a pull-request-only "Bounded pull request monitor" form. The composer trigger opens AutoNudgePopover again, so a session can arm a goal loop for any target from the dashboard instead of being asked for a GitHub pull request URL. The frontend automation-record layer #5185 introduced goes with it: SessionAutomationPopover, MonitorRadar, the monitoring/automation normalizer and its contract.json, the per-slot REST automation snapshots in ChatPage / ChatSidebar / chatSlice / useWebSocket, and the sessionAutomationPopover catalog block in all 13 i18n catalogs. The generic popover keeps the clear-stopped-record control #9788 and #9845 added: a stopped record is cleared with a confirm two-step that sends DELETE ?intent=clear, so an agent-armed monitor that was stopped by a session close or user stop still has an exit from the dashboard. Nothing under src/kiro_crew/ or test/ changes. The monitor_watch MCP tool, the src/kiro_crew/monitoring engine, the backend clear route and the retention refusal are all as on main. A committed capture harness, website/scripts/capture-goal-popover-generic.mjs, opens the built SPA, clicks "Set a goal" and fails if the popover carries a pull request URL field or a "legacy goal loop" call to action.
Reverts the dashboard layer of #5185 and its follow-ups (#9788, #9845, with a pull-request-only "Bounded pull request monitor" form. The composer trigger opens AutoNudgePopover again, so a session can arm a goal loop for any target from the dashboard instead of being asked for a GitHub pull request URL. The frontend automation-record layer #5185 introduced goes with it: SessionAutomationPopover, MonitorRadar, the monitoring/automation normalizer and its contract.json, the per-slot REST automation snapshots in ChatPage / ChatSidebar / chatSlice / useWebSocket, and the sessionAutomationPopover catalog block in all 13 i18n catalogs. The generic popover keeps the clear-stopped-record control #9788 and #9845 added: a stopped record is cleared with a confirm two-step that sends DELETE ?intent=clear, so an agent-armed monitor that was stopped by a session close or user stop still has an exit from the dashboard. Nothing under src/kiro_crew/ or test/ changes. The monitor_watch MCP tool, the src/kiro_crew/monitoring engine, the backend clear route and the retention refusal are all as on main. A committed capture harness, website/scripts/capture-goal-popover-generic.mjs, opens the built SPA, clicks "Set a goal" and fails if the popover carries a pull request URL field or a "legacy goal loop" call to action.
Reverts the dashboard layer of #5185 and its follow-ups (#9788, #9845, #10190), which replaced the generic goal-loop popover with a pull-request-only "Bounded pull request monitor" form. The composer trigger opens AutoNudgePopover again, so a session can arm a goal loop for any target from the dashboard instead of being asked for a GitHub pull request URL. The frontend automation-record layer #5185 introduced goes with it: SessionAutomationPopover, MonitorRadar, the monitoring/automation normalizer, the per-slot REST automation snapshots in ChatPage / ChatSidebar / chatSlice / useWebSocket, the dead api.monitorClear client method, and the sessionAutomationPopover catalog block in all 13 i18n catalogs. website/src/monitoring/contract.json stays: test/test_monitor_persistence.py reads it as the backend parity artifact. Two fixes #5185 carried incidentally stay in the restored wiring. The goal-loop seed and the autonudge_state frame fold channel slot keys (slack:<ts>) to the dashboard filename form (slack_<ts>) through website/src/utils/dashboardSlotKey.ts, matching _normalize_slot_key on the backend, so a channel-bound loop lights its sidebar row. Every seed takes its own generation, so two overlapping reconnect seeds cannot let the older snapshot overwrite the newer one, and ChatPage's per-slot loop fetch is dropped when a live autonudge_state frame for that slot lands first. The popover keeps the viewport-fit classes (max-h / overflow-y-auto, stacked number fields on narrow widths). The generic popover keeps the clear-stopped-record control #9788 and #9845 added: a stopped record is cleared with a confirm two-step that sends DELETE ?intent=clear, so an agent-armed monitor that was stopped by a session close or user stop still has an exit from the dashboard. The popover's fresh-state defaults change in two small ways: Max cycles starts at 24 (0 still means no cap, and an existing loop's 0 is shown as 0), and the helper text says a Stop loop button appears while the loop runs and that the stop-file name in the goal is filled in at start (components.autoNudgePopover.stop_loop_hint, all 14 catalogs). Nothing under src/kiro_crew/ or test/ changes. The monitor_watch MCP tool, the src/kiro_crew/monitoring engine, the backend clear route and the retention refusal are all as on main. A committed capture harness, website/scripts/capture-goal-popover-generic.mjs, opens the built SPA, clicks the composer trigger in three stubbed states (no loop, active loop, stopped record plus its confirm row) and fails if the popover carries a pull request URL field or a "legacy goal loop" call to action. Its frames are committed under temp-screenshots/goal-popover-generic/.
Reverts the dashboard layer of #5185 and its follow-ups (#9788, #9845, #10190), which replaced the generic goal-loop popover with a pull-request-only "Bounded pull request monitor" form. The composer trigger opens AutoNudgePopover again, so a session can arm a goal loop for any target from the dashboard instead of being asked for a GitHub pull request URL. The frontend automation-record layer #5185 introduced goes with it: SessionAutomationPopover, MonitorRadar, the monitoring/automation normalizer, the per-slot REST automation snapshots in ChatPage / ChatSidebar / chatSlice / useWebSocket, the dead api.monitorClear client method and its stale test mock, and the sessionAutomationPopover catalog block in all 13 i18n catalogs. website/src/monitoring/contract.json stays: test/test_monitor_persistence.py reads it as the backend parity artifact. Three behaviours #5185 carried incidentally stay in the restored wiring. The goal-loop seed, the autonudge_state frame and ChatPage's per-slot listener fold channel slot keys (slack:<ts>) to the dashboard filename form (slack_<ts>) through website/src/utils/dashboardSlotKey.ts, matching _normalize_slot_key on the backend, so a channel-bound loop lights its sidebar row and its live frames reach the open popover, and a monitor's frame feeds the sidebar the same agent-turn accounting the REST seed does. Every seed takes its own generation, so two overlapping reconnect seeds cannot let the older snapshot overwrite the newer one, and ChatPage's per-slot loop fetch is dropped when a live autonudge_state frame for that slot lands first. When that fetch fails, the popover says so and withholds Save / Start / Trigger behind a Retry loading button instead of offering an empty editor whose Start the existing loop would refuse. The popover keeps the viewport-fit classes (max-h / overflow-y-auto, stacked number fields on narrow widths). A structured monitor armed through the MCP monitor tools reaches the legacy slot read as a reduced row with no message, banner or stop-file path. The popover recognises both transports of that row (the REST read withholds message; the live autonudge_state frame carries a monitor object, so isReducedMonitorRow keys on either) and shows only what the backend will honour: a notice that an agent armed a bounded monitor, the schedule line, Stop loop while it runs, and the clear-stopped-record two-step once it stops. Save, Start and Trigger, which the backend refuses for that row with structured_monitor_requires_monitor_api, are not rendered for it. AutoNudgeLoop.message is optional to say so; the one other reader (MembersPage's patrol row) falls back to an empty string. The generic popover keeps the clear-stopped-record control #9788 and #9845 added: a stopped record is cleared with a confirm two-step that sends DELETE ?intent=clear, so an agent-armed monitor that was stopped by a session close or user stop still has an exit from the dashboard. The popover's fresh-state defaults change in two small ways: Max cycles starts at 24 (0 still means no cap, and an existing loop's 0 is shown as 0), and the helper text says a Stop loop button appears while the loop runs and that {{STOP_FILE}} in the goal is replaced with a real file path at start (components.autoNudgePopover.stop_loop_hint; the moustache is passed as an interpolation value so i18next renders it literally). The three new strings and the reworded hint are translated in all 11 human catalogs; en-XA is regenerated. Nothing under src/kiro_crew/ or test/ changes. The monitor_watch MCP tool, the src/kiro_crew/monitoring engine, the backend clear route and the retention refusal are all as on main. A committed capture harness, website/scripts/capture-goal-popover-generic.mjs, opens the built SPA, clicks the composer trigger in five stubbed states (no loop, active loop, stopped record plus its confirm row, reduced monitor row, failed slot snapshot), fails if the popover carries a pull request URL field or a "legacy goal loop" call to action, and clips each frame under 2000px. Its frames are attached to the pull request, not committed. The two harnesses that photographed the removed surface, capture-goal-clear-record.mjs and capture-monitor-trigger-centering.mjs, go with it; the clear-record flow is state 03 of the generic harness.
…otdev#9845) Follow-through on the UX review of kirodotdev#9788, which merged with the finding open. Both surfaces now erase a stopped automation for good, but only the monitor's was guarded: the legacy goal view's "Clear stopped goal" fired the DELETE on one plain grey click. A blind reader named it: "this delete button is plain grey with no warning colour, which makes it easier to hit by mistake" and "I cannot tell whether it deletes instantly with no are-you-sure". The legacy control is now danger-coloured unconditionally (not on :hover, which a touch viewport never produces) and asks first, reusing the monitor surface's two-step. The confirmation replaces the primary CTA rather than sitting beside it, so the row keeps its two-control cap. Both confirm labels now restate the action and its object, because neither confirm row renders a question: "Yes, clear it" answered one that was never asked. They read "Clear goal for good" and "Clear monitor for good".
Problem / Motivation
PR #9788 merged with its UX review still at CONCERNS, and the finding is a real hazard rather than a style nit.
That PR gave a stopped automation an exit on both surfaces. Only one of them is guarded. On the monitor surface the erase is red, carries a trash icon, and asks first. In the legacy goal view the identical erase is one plain grey click that fires the DELETE immediately.
Blind reader, verbatim: "this delete button is plain grey with no warning colour, which makes it easier to hit by mistake" and "I cannot tell whether 'Clear stopped goal' deletes instantly with no 'are you sure?'".
Second finding, same review: neither confirmation row renders a question, so "Yes, clear it" answers one that was never asked. The reader: "If I hadn't seen shot-01 first, I wouldn't know what 'clear it' refers to."
Why it matters
The thing being erased is the goal text a user wrote, and there is no undo and no rebuild path. The control sits one slot left of the purple primary CTA, in the state a user is already frustrated in. A mis-click costs the whole goal.
What changed (motivation -> approach -> change)
Two surfaces, one operation, so they get one guard. The legacy control now:
:hover. A touch viewport never produces hover, so a hover-only colour renders an irreversible erase identically to the buttons beside it (the same class of defect theBtn dangerdocstring records for Btn danger variant is hover-only, so destructive buttons look ordinary on touch #3937).website/AUTOSDE.yaml:230), and the choice being confirmed is the whole row.Both confirm labels now restate the action and its object: Clear goal for good and Clear monitor for good, across 12 locales plus the pseudolocale.
Tests
website/src/test/AutoNudgePopover.test.tsx:text-dangerunconditionally.DELETE ?intent=clear.website/src/test/SessionAutomationPopover.test.tsx: updated for the relabelled confirm.The capture harness gained a fifth frame and two assertions: that the first press sends nothing, and that the primary CTA is gone while confirming. It exits non-zero if either regresses.
Local: 90 tests across both popover suites,
tsc -b, andnpm run i18n:checkall green.Manual verification
N/A -- the capture harness drives the real built SPA and presses the control, so the two-step is exercised rather than described.
Screenshots / video
Stopped legacy goal -- the clear is red, and it asks:
The monitor surface's relabelled confirm
Related Issues
Follows PR #9788, which merged before this review round landed.
Pattern harvest
Rule candidate: review-prompt
Pattern: two surfaces reach the same irreversible operation and only one is guarded. When a PR adds a destructive action to a second surface, the guard (confirm, danger styling, undo copy) is part of the operation, not part of the surface -- ask which surfaces can reach it and whether every one of them guards it the same way.
Checklist
Round 1 review fixes (
da0d40d13)max_cycles=1stop) left the press aimed at a goal the confirmation never described, with no 409 to catch itauto-nudge-clearandauto-nudge-confirm-clearhad zero consumersBtn's danger class string, whichwebsite/AGENTS.mdforbids<Btn>/<Btn danger>The primary CTA beside them stays a raw button: it is pre-existing, no defect sits behind it, and swapping it to
SendBtnwould visibly change a control this PR has no reason to touch.Negative control for the GPT fix: with the reset effect removed, the new test fails; restored, it passes. Full suite re-run after the change: 1979 files, 31305 tests, zero failures.
Round 2 review fixes (
da0d40d13)SessionAutomationPopoverholds two primed confirms (confirmStop,confirmClear) reset only on the open rising edge, and its press readsmonitor.idat press timecancelstring, andkeep_goalis goneThe Korean strings for the two new questions use 하십시오체, which
src/i18n/style/koStyle.test.tspins for a destructive confirmation; the first draft used~할까요?and that gate caught it.Full suite after the change: 1979 files, 31306 tests, zero failures. The capture harness gained four assertions covering the question swap and the shared back-out word.
The one remaining evidence gap the UX lane named is a recording of the press-to-confirm swap. The transition is asserted instead, in two places that fail if it regresses: the vitest cases above, and the capture harness, which performs the press and checks that the first one sends nothing.