Skip to content

Preserve deferred alerts when terminal output resumes - #886

Merged
nedtwigg merged 5 commits into
mainfrom
alert-fixup
Oct 2, 2026
Merged

nedtwigg merged 5 commits into
mainfrom
alert-fixup

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Oct 1, 2026

Copy link
Copy Markdown
Member

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 current main.

nedtwigg and others added 3 commits October 1, 2026 14:38
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>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 20b13fd
Status: ✅  Deploy successful!
Preview URL: https://9bfcbe45.mouseterm.pages.dev
Branch Preview URL: https://alert-fixup.mouseterm.pages.dev

View logs

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

nedtwigg and others added 2 commits October 1, 2026 16:00
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 dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/specs/alert.md Outdated
Comment thread docs/specs/alert.md Outdated
dormouse-bot
dormouse-bot previously approved these changes Oct 2, 2026

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dormouse-bot
dormouse-bot dismissed their stale review October 2, 2026 00:32

Argos visual diffs await a decision

@nedtwigg
nedtwigg merged commit da95e02 into main Oct 2, 2026
13 checks passed
@nedtwigg
nedtwigg deleted the alert-fixup branch October 2, 2026 01:09
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.

2 participants