Skip to content

fix(notify): default every notification category to Silent - #1825

Merged
janicduplessis merged 2 commits into
mainfrom
fix/1813-silent-notification-defaults
Sep 28, 2026
Merged

janicduplessis merged 2 commits into
mainfrom
fix/1813-silent-notification-defaults

Conversation

@janicduplessis

Copy link
Copy Markdown
Collaborator

Description

The phone app and Stim Desktop alerted by default for the machine and control categories, with every other category defaulting to Silent. The server's own fallback delivery — used when a registered phone's levels do not cover a category — matched that split: loud for everything but started. The maintainer decided on 2026-09-28 that every category should start Silent instead, so a fresh phone or Mac never alerts until the person turns a category on.

Solution

DEFAULT_LEVELS (phone) and OversightCategory.defaultLevel (Desktop) now return Silent for every category. The shared oversight.ts/Oversight.swift notification builders (duplicated identically across apps/mobile/src/lib/oversight.ts, packages/server/src/oversight.ts and apps/desktop/Sources/StimKit/Oversight.swift, per the file's own "holds the same code" comment) built each OversightNotification with quiet: category === 'started', so the machine builder and the control conflict push in packages/server/src/push.ts also had their own hardcoded quiet: false; all of these now default to quiet: true. That quiet field only matters as the fallback in push.ts's levelOf when a phone's levels omits a category — a real phone always sends the full map from DEFAULT_LEVELS, so this only affects an older/partial registration.

Users' saved level choices are untouched: parsePrefs (phone) and NotificationSettings.level (Desktop) only fall back to the default for a category with no stored value.

Test plan

  • pnpm test (root) and apps/mobile: full suites pass, including updated expectations in notifications.test.ts, oversight.test.ts and push.test.ts for the new default (e.g. a control conflict or a category missing from a registration's levels now delivers silently; two tests that were exercising the hourly-budget/loud-vs-silent behavior now pin an explicit alert level so they still exercise that path).
  • swift test in apps/desktop: 281 tests across all three targets pass, including NotificationSettingsTests.defaultsEveryCategoryToSilentAndRunsEveryCategory and the OversightTests cross-check against the regenerated oversight-vectors.json fixture (only its quiet fields changed).
  • Phone: built and installed on a Stim-owned iOS Simulator, paired to pnpm run mock-server, and enabled notifications in Settings — every category (Work started, Agent looks stuck, Agent repeats the same failure, Work finished or PR ready, Machine in trouble, Someone takes over your device) now shows Silent.
  • Desktop: tried to confirm the same on a Mac mini test copy via mini-desktop.sh, but couldn't get a clean screenshot of the Settings window on the shared, heavily-loaded mini (other agents' windows and dialogs kept occluding it); relying on the Swift test coverage above instead, since AppPreferencesView.swift's picker binds directly to the now-tested category.defaultLevel.

Fixes #1813

The phone and Stim Desktop alerted for the machine and control categories
by default, with every other category defaulting to Silent. The server's
own fallback delivery for a category a registered phone's levels do not
cover matched that split (loud for everything but started). The maintainer
decided every category should start Silent instead, so notifications are
opt-in.
packages/server/README.md still described the old per-category fallback
(alert for everything but started). The mock server's notification samples
defaulted an omitted quiet field to false, so its stuck/looping/finished/
machine/control fixtures still simulated the old loud-by-default delivery.
@janicduplessis
janicduplessis marked this pull request as ready for review September 28, 2026 21:31
@janicduplessis
janicduplessis merged commit b0a2e5c into main Sep 28, 2026
14 of 15 checks passed
@janicduplessis
janicduplessis deleted the fix/1813-silent-notification-defaults branch September 28, 2026 21:31
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.

Default every notification category to Silent, on phone and Desktop

1 participant