Preserve deferred alerts when terminal output resumes - #886
Conversation
pauseRingUntilQuiet reports a pause transition instead of publishing, so per-chunk output no longer rebuilds state while a ring is already paused. The settle path owns its quiet check, dropping flushDeferredNotification's commandFinished flag. The delivery scheduler disarms through one helper, the speech queue picks its next job in one pass, and a paused preparation returns to the queue past the bound instead of reserving a slot. Specs drop the removed resumed-work withdrawal row and the deferral-ceiling wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
20b13fd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9bfcbe45.mouseterm.pages.dev |
| Branch Preview URL: | https://alert-fixup.mouseterm.pages.dev |
dormouse-bot
left a comment
There was a problem hiding this comment.
I found nothing to change in the code or the spec. The one blocker is Argos: argos/storybook-chromium and argos/storybook-webkit report 26 changed snapshots and are waiting for a decision. The only renderer change is the explanation text under Defer alerts until animation stops, and that text appears in most of the SettingsDialog stories. So these are probably expected diffs, but someone needs to look at them in Argos before this can be approved.
A ring is paused whenever the deferral setting is on, output is recent, and it carries no exit source; the manager computes that in one place instead of setting Ring.paused from five call sites. Publishing a pause arms the wake that publishes its end. Consumers (delivery scheduler, speech, persistence) share isAlertPaused rather than each testing status and episode. An exit held while engaged now leaves the ring paused until it escalates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
left a comment
There was a problem hiding this comment.
Build & Test fails at spec-lint: docs/specs/alert.md: 8907 words exceeds its 8900-word budget. The two inline suggestions cut it to fit (checked locally with node scripts/spec-lint.mjs). The derived pause itself looks right to me.
dormouse-bot
left a comment
There was a problem hiding this comment.
Withdrawing my approval until Argos is decided: argos/storybook-chromium and argos/storybook-webkit report 29 changed snapshots waiting for a decision on this head. The spec-lint fix is in and every other check is green.
Recent output could leave program-sent alerts ringing, while resumed WATCHING activity discarded the alert and restarted delivery delays. With deferral enabled, accepted output now pauses the unresolved alert until five seconds of quiet, preserving its episode, detail, and original unsent alarm deadlines. Queued or preparing speech stays owed; alarms already delivered never replay.
Idle notifications and command exits remain immediate. Continuous output can defer an alert indefinitely; the old 30-second cap is removed. Updated the alert spec and settings explanation.
Validation: repository-wide
pnpm test; after Claude simplification, independently reran the full lib suite (5,062 passed, five skipped), VS Code suite (171 passed), both typechecks, and spec lint. A live innerdogfood PTY probe showed ring → resumed-output pause → same-episode restoration after quiet. The branch merges cleanly with currentmain.