8000 feat: notification levels, per-thread mute, and kg notify test by aorumbayev · Pull Request #115 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

feat: notification levels, per-thread mute, and kg notify test - #115

Merged
aorumbayev merged 14 commits into
mainfrom
feat/notify-levels
Nov 10, 2026
Merged

aorumbayev merged 14 commits into
mainfrom
feat/notify-levels

Conversation

@aorumbayev
Copy link
Copy Markdown
Member

What changed

  • Global level. Settings → General → Notifications: All, Only when it asks me, or Off. The notify preference takes all, asks or off. A migration maps the old true to all and false to off.
  • Per-thread level. The thread menu (title bar and sidebar row) has a Notifications submenu: Default, All, Only when it asks me, Muted. Also kg thread notify <id> default|all|asks|muted. A thread's own level replaces the global one, so All posts even when the global level is Off.
  • Muted mark. A muted thread shows a small bell beside its title and in its sidebar row, both with the tooltip "Notifications muted". The pin mark now uses the same function and gets a "Pinned" tooltip.
  • Clear on open. Opening a thread clears its system notification (dismiss_system_notification with the same tag the post uses).
  • kg notify test. Posts one test notification, even when notifications are off.
  • Reasons. A thread that needs the person reports why: a turn ended, a question or approval waits, or a program failed or exited on its own. A stop the person asked for stays quiet.

Decisions 212 to 215 record the choices (211 is the agent rules on main).

Checked

  • Full gate on the merged branch: cargo fmt --check, cargo clippy --workspace --all-targets --locked -- -D warnings (exit 0), cargo t --workspace --locked (1917 passed, 0 failed).
  • Scripts: size-budget, crate-boundaries, glossary-check, view-colors, decisions-check, test-env-check (all pass).
  • Each behaviour has a test that was shown to fail with the behaviour broken once: the question notice, the failed-program notice at all, the muted rule, the title-bar mark.
  • Paired controls: each "posts nothing" test also checks a neighbour thread that does post, so a quiet result cannot come from a script that never ended a turn.
  • Screenshots (isolated app, own data and socket folders): Settings General light and dark, sidebar muted mark light and dark, title bar muted mark light and dark.
  • kg ui snapshot and the CLI reference are regenerated (book/src/cli.md).
  • Size ceiling: 72243 product lines, the merged count. Cost line in decision 212.

Not proven

  • Real macOS delivery. A cargo run binary cannot post a system notification on macOS, so posting is proven only with the test platform. A bundled build is needed to see a real notice appear and clear.
  • Submenu row id. The "Notifications" row in the thread menu has no id in kg ui snapshot. Its items do (thread-notify-*). gpui-kit draws the submenu row and its PopupMenuItem::Submenu has no id field, so this needs a gpui-kit change. Not done here.
  • Linux cannot retract a notice (adapter limit, decision 215).
  • Possible double notice at All. A question can emit Asked and then TurnEnded for the same thread, with the same tag. The OS may replace the first. Not proven in a bundled build.

…ch becomes a level

A thread gets its own level (default, all, asks, muted). The notify preference
becomes all, asks or off; a migration maps the old true and false.
A thread that needs the person reports why it needs them: a turn ended, a
question waits, or a program failed or exited. kg notify test asks the window
to post one test notification. kg thread notify sets one thread's level.
… mark

Settings → General has All, Only when it asks me, and Off. The thread menu
has a Notifications submenu. A muted thread shows a mark in its sidebar row.
Opening a thread clears its system notification.
…LI reference

Decisions 211 to 214 record the level change, the per-thread level, the notice
reasons and clearing on open. The product-line ceiling rises by 321, approved
per PR.
… tests have a control

Both 'posts nothing' tests now also check a neighbour thread that does post,
so they cannot pass because the script never ended a turn.
Pinned gets its name as its tooltip, like muted already had.
Same mark and tooltip as the sidebar row, with its own id so both can show.
…e, to 71826

Cost: the product-line ceiling rises by 21, from 71805 to 71826 (approved per PR).
Keeps the agent rules (decision 211 on main) and the notification levels
(decisions 212 to 215). The size ceiling is the merged count, and the CLI
reference is regenerated.
@aorumbayev
aorumbayev merged commit 71fe3a0 into main Nov 10, 2026
19 checks passed
@aorumbayev
aorumbayev deleted the feat/notify-levels branch November 10, 2026 13:03
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

0