Skip to content

feat: debounce burst notifications and add quiet mode - #9

Merged
Lee-W merged 2 commits into
mainfrom
feat/notify-debounce-quiet
Jul 21, 2026
Merged

feat: debounce burst notifications and add quiet mode#9
Lee-W merged 2 commits into
mainfrom
feat/notify-debounce-quiet

Conversation

@Lee-W

@Lee-W Lee-W commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Add two config-gated notification throttles that share one cross-process
file-backed queue (notify_queue), since there is no resident daemon:

  • notify_debounce_seconds: when several sessions turn 🔴 at once, the
    leading edge fires immediately and the rest are merged into a single
    summary, lazily flushed by the next hook event, TUI poll, or quiet-off.
  • ring quiet [on | off | DURATION]: temporary global mute; waiting
    notifications accumulate in the queue and a summary is flushed on release.

Both default to off (0 / no quiet file) for backward compatibility. The
queue's check-then-act is guarded by fcntl.flock so concurrent hook
subprocesses cannot both claim the leading edge. Headless watch also
triggers the lazy flush each poll so users with no TUI aren't stuck.

Lee-W added 2 commits July 20, 2026 22:28
Add two config-gated notification throttles that share one cross-process
file-backed queue (notify_queue), since there is no resident daemon:

- notify_debounce_seconds: when several sessions turn 🔴 at once, the
  leading edge fires immediately and the rest are merged into a single
  summary, lazily flushed by the next hook event, TUI poll, or quiet-off.
- ring quiet [on | off | DURATION]: temporary global mute; waiting
  notifications accumulate in the queue and a summary is flushed on release.

Both default to off (0 / no quiet file) for backward compatibility. The
queue's check-then-act is guarded by fcntl.flock so concurrent hook
subprocesses cannot both claim the leading edge. Headless watch also
triggers the lazy flush each poll so users with no TUI aren't stuck.
Claude Code emits a Notification with notification_type=agent_needs_input when
a background agent stops to ask the user for input. RiNG treated it as idle
because the type was not in the action-required set, so the board never flagged
it red. Add it (waiting_kind=question) so the session surfaces as waiting-for-you.

Also document a known limitation in _promote_codex_permission_wait: some
undocumented Claude Code UI guardrails (e.g. the multiple-cd Bash approval) block
without firing any hook, so RiNG cannot detect them. The silence-timeout
heuristic is deliberately not extended to claude-code because such a state is
indistinguishable from normal post-turn idle.
@Lee-W
Lee-W merged commit e6adeee into main Jul 21, 2026
4 checks passed
@Lee-W
Lee-W deleted the feat/notify-debounce-quiet branch July 21, 2026 00:14
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.

1 participant