fix(notify): default every notification category to Silent - #1825
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The phone app and Stim Desktop alerted by default for the
machineandcontrolcategories, with every other category defaulting to Silent. The server's own fallback delivery — used when a registered phone'slevelsdo not cover a category — matched that split: loud for everything butstarted. 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) andOversightCategory.defaultLevel(Desktop) now return Silent for every category. The sharedoversight.ts/Oversight.swiftnotification builders (duplicated identically acrossapps/mobile/src/lib/oversight.ts,packages/server/src/oversight.tsandapps/desktop/Sources/StimKit/Oversight.swift, per the file's own "holds the same code" comment) built eachOversightNotificationwithquiet: category === 'started', so themachinebuilder and thecontrolconflict push inpackages/server/src/push.tsalso had their own hardcodedquiet: false; all of these now default toquiet: true. Thatquietfield only matters as the fallback inpush.ts'slevelOfwhen a phone'slevelsomits a category — a real phone always sends the full map fromDEFAULT_LEVELS, so this only affects an older/partial registration.Users' saved level choices are untouched:
parsePrefs(phone) andNotificationSettings.level(Desktop) only fall back to the default for a category with no stored value.Test plan
pnpm test(root) andapps/mobile: full suites pass, including updated expectations innotifications.test.ts,oversight.test.tsandpush.test.tsfor the new default (e.g. a control conflict or a category missing from a registration'slevelsnow delivers silently; two tests that were exercising the hourly-budget/loud-vs-silent behavior now pin an explicitalertlevel so they still exercise that path).swift testinapps/desktop: 281 tests across all three targets pass, includingNotificationSettingsTests.defaultsEveryCategoryToSilentAndRunsEveryCategoryand theOversightTestscross-check against the regeneratedoversight-vectors.jsonfixture (only itsquietfields changed).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.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, sinceAppPreferencesView.swift's picker binds directly to the now-testedcategory.defaultLevel.Fixes #1813