Shell 14: core-notification-settings-inactive (#806) #860
Closed
charles
wants to merge 0 commits from
shell-14-core-notification-settings-inactive into shell
pull from: shell-14-core-notification-settings-inactive
merge into: charles:shell
charles:main
charles:camera
charles:dailyuse
charles:textchat
charles:fix-1008-idle-in-voice
charles:camera-21-acceptance
charles:feat-1000-app-sounds-output
charles:fix-1001-local-time
charles:camera-20-parity-list-for-the
charles:fix-931-silent-voices
charles:camera-15-ui-settings-voice-video
charles:camera-14-ui-camera-buttons-camera
charles:camera-16-ui-layout-with-cameras
charles:camera-17-core-toggle-camera-shortcut
charles:camera-13-ui-mirrored-video-and
charles:camera-12-appsfluxer-camera-runtime-and
charles:camera-10-capture-camera-on-linux
charles:camera-11-capture-camera-on-windows
charles:camera-9-voice-the-camera-track
charles:camera-7-core-the-own-camera
charles:camera-6-capture-camera-trait-mode
charles:camera-8-core-remote-cameras-tile
charles:camera-3-spike-a-camera-track
charles:camera-4-video-camera-formats-and
charles:camera-18-devserver-camera-scenario
charles:camera-1-spike-capture-linux
charles:camera-5-core-camera-ports-commands
charles:camera-2-spike-capture-windows
charles:camera-plan
charles:shell
charles:fix-925-keybinds-persist
charles:feat-934-935-stream-view
charles:feat-933-stream-output-device
charles:shell-44-acceptance
charles:feat-946-select-message-text
charles:shell-43-parity-list-for-the
charles:fix-589-black-band-linux-sender
charles:shell-37-ui-system-wide-shortcuts
charles:shell-ship
charles:fix-931-voices-silent-after-long-uptime
charles:shell-39-ui-settings-notifications
charles:shell-36-ui-settings-keybinds
charles:shell-16-core-autostart
charles:fix-923-late-publication-next-share
charles:fix-921-share-teardown-publish-race
charles:shell-1-spike-iced-daemon-hide
charles:shell-10-core-instance-messages-tasks
charles:shell-11-core-keybinds-actions-combos
charles:shell-13-core-badge-attention-sound
charles:shell-18-platform-desktop-entry-and
charles:shell-2-spike-tray-on-linux
charles:shell-3-spike-wayland-global-shortcuts
charles:shell-41-devserver-shell-scenario
charles:shell-5-spike-overlay-technique-for
charles:shell-6-core-shell-ports-settings
charles:shell-7-platform-settings-shell-keybinds
charles:shell-8-core-tray-model-and
charles:shell-9-core-window-rules-close
charles:fix-913-keep-awake-retry
charles:shell-35-ui-in-window-voice
charles:shell-sync-textchat
charles:shell-34-app-shortcuts-runtime
charles:fix-913-keep-screen-awake
charles:fix-910-deepfilter-windows-timing
charles:shell-33-app-shell-runtime
charles:shell-28-platform-shortcuts-on-wayland
charles:fix-910-deepfilter-late-frame
charles:shell-29-platform-shortcuts-by-direct
charles:shell-27-platform-shortcuts-on-x11
charles:shell-17-platform-single-instance
charles:shell-24-platform-badge-displays-and-24
charles:shell-26-platform-shortcuts-on-windows
charles:shell-21-platform-tray-on-linux
charles:shell-22-platform-tray-on-windows
charles:fix-908-flaky-stream-end-test
charles:shell-30-platform-wayland-activation
charles:shell-38-ui-settings-desktop
charles:shell-19-platform-autostart
charles:shell-25-platform-shortcut-back-end
charles:shell-23-platform-badge-displays-and
charles:shell-40-ui-companion-apps-control
charles:shell-31-statusapi-default-avatars
charles:shell-12-core-system-wide-shortcut
charles:shell-20-platform-tray-trait-icons
charles:shell-32-ui-daemon-window-lifecycle
charles:shell-4-spike-raising-a-wayland
charles:shell-15-core-status-payload-gaps
charles:fix-876-share-resolution-and-bars
charles:shell-42-packaging-windows-shortcuts-and
charles:fix-874-tests-must-not-notify
charles:fix-868-deepfilternet-start
charles:gamenight-plan
charles:fix-867-869-stream-end-soundboard-limits
charles:feat-229-windows-hardware-encoding
charles:fix-857-vaapi-hardware-encoding
charles:fix-849-inert-cards
charles:fix-848-pinned-messages-clickable
charles:shell-plan
charles:fix-764-nvenc-above-720p30
charles:serveradmin
charles:feat-780-forum-archived-filter
charles:serveradmin-35-acceptance
charles:feat-781-no-join-chime-with-entrance-sound
charles:feat-784-rejoin-voice-after-update
charles:fix-779-782-search-dropdown-paste-preview
charles:fix-783-781-dm-rail-entrance-sound
charles:serveradmin-34-parity-screenshots
charles:serveradmin-31-ui-channel-permissions
charles:fix-773-cargo-deny-advisories
charles:serveradmin-33-ui-sudo-delete-transfer
charles:serveradmin-28-ui-members-page
charles:serveradmin-26-ui-role-permissions
charles:serveradmin-30-ui-voice-overview-channel-invites
charles:serveradmin-fix-27-29
charles:serveradmin-25-ui-roles-tab
charles:serveradmin-27-ui-menus-moderation-modals
charles:serveradmin-29-ui-channel-settings
charles:fix-589-stream-top-strip-encode
charles:serveradmin-24-ui-moderation-invites-bans
charles:feat-760-version-in-title
charles:fix-751-stream-audio-pipewire
charles:serveradmin-20-core-menu-rows
charles:fix-752-linux-notification-panic
charles:serveradmin-17-core-overrides
charles:fix-740-updater-always-latest
charles:serveradmin-23-ui-community-settings-overview
charles:serveradmin-12-core-roles
charles:serveradmin-19-core-sudo-delete-transfer
charles:serveradmin-32-ui-sidebar-drag
charles:serveradmin-15-core-members-page
charles:serveradmin-16-core-channel-settings
charles:serveradmin-14-core-bans-invites
charles:fix-615-restore-on-stored-session-start
charles:serveradmin-22-runtime
charles:serveradmin-13-core-member-moderation
charles:serveradmin-18-core-channel-reorder
charles:fix-732-status-api-speaking
charles:serveradmin-10-core-permission-lists
charles:serveradmin-11-core-forms-community
charles:serveradmin-21b-devserver-channels-members-sudo
charles:serveradmin-4-api-community-roles-sudo
charles:serveradmin-9b-core-hierarchy-bulk-events
charles:serveradmin-21a-devserver-community-roles
charles:serveradmin-9a-core-ports
charles:serveradmin-8-form-widgets
charles:serveradmin-5-api-channels-members-bans
charles:serveradmin-7-settings-shell
charles:serveradmin-1-proto-community-roles
charles:serveradmin-3-proto-members-bans-invites
charles:serveradmin-6-reorder-widget
charles:serveradmin-2-proto-channel-admin
charles:fix-706-presence-after-reconnect
charles:fix-615-start-on-last-view
charles:feat-663-create-channel
charles:serveradmin-plan
charles:fix-662-long-text-wrap
charles:fix-660-661-menu-toolbar-paste-focus
charles:fix-620-forum-list-reactions
charles:fix-657-windows-console
charles:fix-622-emoji-in-names
charles:fix-smoke-645-648
charles:fix-614-install-location
charles:dailyuse-41-acceptance
charles:fix/597-copy-id
charles:dailyuse-40-parity-screenshots
charles:dailyuse-35-ui-quick-switcher-keybinds
charles:dailyuse-38-ui-profile-modal
charles:fix/voice-view
charles:fix/side-panel-composer
charles:dailyuse-37b-ui-composer-barriers-blocked
charles:fix/image-viewer
charles:fix/619-picker-flicker
charles:fix/editor-forum-edit
charles:dailyuse-32-ui-status-picker
charles:dailyuse-34b-ui-add-guild-invite-modal
charles:dailyuse-28-app-dailyuse-runtime
charles:dailyuse-36-ui-voice-badge-refusals
charles:fix/594-menu-placement-textchat
charles:fix/589-stream-top-strip
charles:fix/594-menu-placement
charles:dailyuse-39-ui-report-modal
charles:dailyuse-37a-ui-attachment-audio-group-icon
charles:dailyuse-24-core-notification-icon-passive
charles:fix/587-quiet-voice
charles:dailyuse-30-ui-notification-settings-modal
charles:dailyuse-31-ui-user-dm-menus
charles:dailyuse-22b-core-composer-barriers-blocked
charles:dailyuse-22a-core-mark-unread-attachments
charles:dailyuse-29-ui-channel-guild-menus
charles:dailyuse-18-core-user-dm-menus
charles:dailyuse-33-ui-confirm-friends-page
charles:dailyuse-22c-core-trusted-domains-hide-muted
charles:dailyuse-20-core-keyboard-navigation
charles:dailyuse-15-core-friends-blocking
charles:dailyuse-23-core-profile-report-flow
charles:dailyuse-19-core-quick-switcher
charles:dailyuse-14-core-status-idle-presence
charles:dailyuse-17-core-channel-guild-menus
charles:ci/27-linux-cache
charles:dailyuse-37c-ui-trust-links-hide-muted
charles:dailyuse-13-core-honour-mutes
charles:dailyuse-34a-ui-invite-cards-accept
charles:dailyuse-16b-core-create-invites-guilds
charles:dailyuse-12-core-notification-settings-mutes
charles:dailyuse-16a-core-invite-links
charles:dailyuse-25-audio-attachments
charles:dailyuse-21-core-voice-refusals
charles:dailyuse-11b-core-state-skeleton
charles:dailyuse-11a-core-dailyuse-ports
charles:dailyuse-26b-devserver-dailyuse-b
charles:dailyuse-26a-devserver-dailyuse-a
charles:dailyuse-4-api-settings-acks-reports
charles:dailyuse-5-api-relationships-invites-guilds
charles:dailyuse-27-platform-notification-idle
charles:dailyuse-10-highlight-languages
charles:fix-search-focus-hover-emoji
charles:dailyuse-8-context-menu-widget
charles:dailyuse-9-image-load-retry
charles:dailyuse-7-chat-navigation-persistence
charles:dailyuse-2-proto-relationships-invites-reports
charles:dailyuse-1-proto-notification-presence
charles:dailyuse-6-gateway-op12-presence
charles:textchat-next
charles:fix-stream-black
charles:fix-reactions-hover
charles:textchat-68-app-video-playback-runtime
charles:textchat-35-acceptance
charles:textchat-34-parity-screenshots
charles:textchat-74-app-updater-runtime
charles:textchat-67-ui-video-player
charles:textchat-stage-46-47
charles:textchat-47-ui-media-channel
charles:textchat-75-promote-stable-workflow
charles:textchat-46-ui-forum-composer
charles:textchat-73-ui-update-button
charles:textchat-64-media-playback-crate
charles:textchat-stage-43-48
charles:textchat-72-platform-updater
charles:textchat-44-ui-thread-view
charles:textchat-70-release-update-feed
charles:textchat-48-ui-announcements
charles:textchat-45-ui-forum-view
charles:textchat-71-core-updater
charles:textchat-43-ui-sidebar-links-notes
charles:textchat-stage-40
charles:textchat-42-app-channel-types-runtime
charles:textchat-39-core-forums
charles:textchat-40-core-announcements-thread-admin
charles:textchat-60-ui-entrance-sounds
charles:textchat-63-ffmpeg-lgpl-packaging
charles:textchat-stage-batch6
charles:textchat-69-proto-update-manifest
charles:textchat-61-app-soundboard-entrance-runtime
charles:textchat-52-app-audio-devices-runtime
charles:textchat-38-core-channel-routing
charles:soundboard-effect-emoji
charles:status-api-rebind
charles:textchat-28-ui-gif-picker
charles:textchat-41-devserver-channel-types
charles:voice-panel-soundboard
charles:textchat-29-ui-message-actions
charles:textchat-37-api-channel-types
charles:textchat-66-core-video-players
charles:autoupdate-plan
charles:textchat-33-ui-message-list-settings
charles:textchat-32-ui-dms
charles:textchat-62-rename-flaxative
charles:fix-chatcolumn-tree
charles:textchat-65-audio-media-source
charles:textchat-31-ui-threads
charles:textchat-stage-27
charles:textchat-30-ui-search-pins-inbox
charles:textchat-53-ui-audio-sources-menu
charles:textchat-27-ui-expression-picker
charles:textchat-57-core-entrance-library
charles:textchat-36-proto-channel-types
charles:textchat-26-ui-upload-tray
charles:textchat-59-ui-soundboard-popout-parity
charles:textchat-58-audio-sound-edit
charles:textchat-55-proto-api-entrance-library
charles:textchat-25-ui-composer
charles:textchat-56-core-soundboard-parity
charles:rename-video-plan
charles:textchat-stage-25
charles:textchat-stage-23-24
charles:soundboard-plan
charles:textchat-24-ui-message-row
charles:textchat-22-ui-attachments-media
charles:textchat-23-ui-embeds
charles:textchat-14-core-expressions
charles:textchat-21-app-textchat-runtime
charles:textchat-16-core-navigation-read
charles:textchat-17-core-search
charles:textchat-19-core-dms-settings
charles:textchat-stage-13-15-18
charles:textchat-54-livekit-stereo-audio
charles:textchat-50-core-stream-audio-sources
charles:textchat-12-core-uploads
charles:textchat-15-core-message-actions
charles:textchat-11-core-composer
charles:textchat-18-core-threads
charles:textchat-13-core-reactions
charles:textchat-51-audio-pipewire-devices
charles:textchat-49-capture-audio-targets
charles:audio-plan
charles:textchat-plan2
charles:textchat-20-devserver-textchat
charles:textchat-6-api-chat-endpoints
charles:textchat-10-core-chat-ports
charles:textchat-9-ui-code-highlighting
charles:textchat-3-proto-expressions-threads-prefs
charles:textchat-5-api-messages-uploads
charles:textchat-2-proto-chat-requests-events
charles:textchat-8-ui-inline-flow-emoji
charles:screenshare
charles:textchat-7-platform-files-clipboard
charles:textchat-1-proto-message-content
charles:textchat-4-emoji-crate
charles:screenshare-31-acceptance
charles:screenshare-29-parity-screenshots
charles:textchat-plan
charles:screenshare-24-ui-focus-layout
charles:screenshare-27-ui-stream-menu
charles:screenshare-30-packaging-ci
charles:screenshare-21-app-screenshare-runtime
charles:screenshare-22-ui-sidebar-live
charles:screenshare-23-ui-stream-tile
charles:screenshare-26-ui-source-picker
charles:screenshare-28-ui-screenshare-settings
charles:screenshare-13-core-previews
charles:screenshare-12-core-codec-negotiation
charles:screenshare-25-ui-share-controls
charles:screenshare-18-hw-encode-linux
charles:screenshare-19-spike-hw-encode-windows
charles:screenshare-11-core-stream-params
charles:screenshare-20-devserver-screenshare
charles:screenshare-10-core-go-live
charles:screenshare-17-voice-livekit-video
charles:screenshare-14-audio-capture-linux
charles:wip/screenshare-17
charles:screenshare-integration
charles:feat-user-profile
charles:fix-voice-join
charles:feat-entity-images
charles:screenshare-16-voice-video-session
charles:screenshare-9-core-watching
charles:screenshare-5-capture-windows
charles:fix-wire-livekit
charles:screenshare-4-capture-linux
charles:screenshare-15-audio-capture-windows
charles:fix-member-list
charles:screenshare-8-core-stream-ports
charles:fix-live-protocol
charles:screenshare-6-ui-video-widget
charles:screenshare-3-capture-crate
charles:fix-altcha-captcha
charles:screenshare-1-video-frames
charles:screenshare-7-proto-api-streams
charles:screenshare-2-spike-livekit-video
charles:voice
charles:voice-26-acceptance
charles:voice-23-voice-e2ee
charles:voice-25-packaging-ci
charles:voice-13-voice-livekit-interop
charles:voice-24-parity-screenshots
charles:voice-19-ui-soundboard
charles:voice-20-ui-participant-menu
charles:voice-22-ui-dm-calls
charles:voice-21-ui-voice-settings
charles:voice-18-ui-call-view
charles:voice-14-app-voice-runtime
charles:voice-10-core-soundboard
charles:voice-17-ui-voice-panel
charles:voice-9-core-voice-settings-advert
charles:voice-5-audio-clips-chimes
charles:voice-15-devserver-voice
charles:voice-8-core-live-room-volumes
charles:voice-11-core-calls-status
charles:voice-12-voice-session
charles:voice-4-audio-devices-mixer
charles:voice-16-ui-voice-sidebar
charles:voice-7-core-voice-connection
charles:foundation
charles:voice-2-proto-api-soundboard-rtc
charles:voice-6-core-voice-states
charles:voice-3-audio-dsp
charles:voice-1-proto-voice-gateway
charles:task/26-acceptance
charles:task/25-packaging-release
charles:task/24-screenshot-tests
charles:task/20-ui-message-list-composer
charles:task/22-ui-settings-parity
charles:task/18-ui-main-layout
charles:task/23-notifications
charles:task/17-ui-shell-login
charles:task/14-app-runtime
charles:ci/51-windows-disk-space
charles:task/12-platform-persistence
charles:task/13-devserver
charles:task/21-ui-avatar-image-cache
charles:task/10-core-messages-readstate
charles:task/9-core-guilds-channels
charles:task/7-gateway-machine-transport
charles:task/11-core-presence-ui
charles:task/19-ui-rich-text
charles:task/8-core-store-session
charles:task/16-ui-theme-fonts-icons
charles:task/15-status-api
charles:task/4-proto-gateway-events
charles:task/5-openapi-vendor-contract
charles:task/6-api-client
charles:task/3-proto-rest-models
charles:task/2-proto-primitives
charles:task/1-workspace-scaffold
No reviewers
Labels
Clear labels
bug
A bug found while working on something else; steps to reproduce and the commit seen on
ci
Build, CI runners and workflows
follow-up
Deferred reviewer finding, linked from the PR it came from
good-first-task
Small, well-scoped, no cross-crate knowledge needed
parity
Settings/behaviour parity with the Electron client
question
Design question that needs Charles; blocks its task until answered
ready-to-merge
Reviewer approved, foundation merged in, CI green on both runners; waiting for the orchestrator to merge
task
A plan task (one per Foundation plan task)
No labels
bug
ci
follow-up
good-first-task
parity
question
ready-to-merge
task
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
charles/fluxer-native!860
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "shell-14-core-notification-settings-inactive"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on: origin/shell-6-core-shell-ports-settings (already merged into
shell; the merge was a no-op)What this builds (plan Task 14, spec §9, §3 rows 57-59)
fluxer-core::shell::notif_prefs:NotificationPrefs { master_volume: u8 (0-200, 100), all_disabled, disabled: BTreeSet<NotificationSound> }withapply,stored/apply_stored(value by value, out-of-range volume clamped asclampVolume). Not stored itself (since the join with Shell 7, below): a view of Shell 7'sLocalSettings::notification_sounds: StoredNotificationSounds, the only stored form, read withNotificationPrefs::from_storedand changed withNotificationPrefsAction::apply_to, saved bypersiston every sound change.sound_volume(app, sound) -> Option<f32>:Nonewhen the sound is off, all sounds are off, orShellState::sound_allowedis false; else the master gain.notif_prefs::followruns once after the reducers (app.rs) and passes everyAudioCommand::PlayChimethrough it: dropped, kept at 100 %, or rewritten to the newAudioCommand::PlayChimeAt { chime, gain }(the runtime multiplies it into the output volume).PreviewSoundplays at the master volume, even with its own switch off, not while all sounds are off (as the original disables the button).ShellAction::NotificationPrefs(NotificationPrefsAction)(appended):SetMasterVolume,SetAllSoundsDisabled,SetSoundEnabled,PreviewSound,SetAfkTimeout(seconds),SetMentionPreference(MentionPreference).SetAfkTimeout: clamped to 60-600 s, an optimisticPATCH /users/@me/settings {afk_timeout}inside the presence's existing write list (shown at once,afkfollows it, reverted onEffectFailed);PresenceState::afk_timeout().SetMentionPreference: optimisticApiRequest::PatchMe {mention_flags}answered with the existingApiResult::Me(the session takes the user), reverted on failure;mention_preference(app).notifications_page(app) -> NotificationsPageModel: General (desktop notifications, unread badge, inactive timeout 1-10 minutes), Mention preference (three radios), Sounds (master volume 0-200 with markers and reset, "Disable all notification sounds", a row per sound with "Preview sound" and the common/"Show more sound effects" split).Step 0: the sounds the client plays today
All go through
AudioCommand::PlayChime(Chime); their volume was decided only by the runtime (audio_rt.rs: output volume setting). Emitted byvoice/connection.rs(mute, unmute, deafen, undeafen, user move, voice disconnect, own join),voice/live.rs(user join/leave),voice/stream/golive.rs(screen share start/stop),voice/stream/watch.rs(viewer join/leave),voice/calls.rs(incoming call). Soundboard and entrance clips (PlayClip) have their own volumes and are not notification sounds in the original either. No message sound is played by the client yet. HenceNotificationSound::ALL= Mute, Unmute, Deafen, Undeafen, UserJoin, UserLeave, UserMove, ViewerJoin, ViewerLeave, VoiceDisconnect, IncomingCall, ScreenShareStart, ScreenShareStop (one perChime, mapping exhaustive both ways). The original's Message / DirectMessage / SameChannelMessage / CameraOn / CameraOff have no switch because nothing plays them.Strings copied (fork
ba98441b4)Notifications.tsx: "Enable desktop notifications", "Uses the OS notification center. For per-channel/per-community controls, right-click a community icon and open notification settings.";UserMessageDescriptors.ts: "Enable unread message badge", "Push notification inactive timeout", "Preview sound";PushSettings.tsx: "{productName} avoids sending push notifications ... before you receive push notifications." (productName = core'sPRODUCT_NAME), "1 minute", "{n} minutes";MentionPreferenceTab.tsx: "Reply mention preference", "No preference", "Prefer @mention", "Prefer no @mention" and their three descriptions;NotificationsTabSounds.tsx: "Master volume", "Sets the level for every sound effect. Per-sound overrides ignore this.", "Reset to default volume", "Disable all notification sounds", "Your existing notification sound settings will be preserved.", "Show more sound effects", "Show fewer sound effects"; section titles "General", "Mention preference", "Sounds"; sound labels fromSoundLabels.ts.Deviations from the plan (reviewer, please look)
SetMentionPreferenceis an optimisticPatchUserSettings; the server hasmention_flagsonly on the user (UserRequestSchemas.ts:108-111,PATCH /users/@me,UserAccountController.ts:134-160; the original callsUserCommands.update({mention_flags})). So this task touches, minimally:fluxer-proto(UserSettingsPatch::afk_timeout,UserPrivate::mention_flags, newUserPatch,AFK_TIMEOUT_MIN/MAXexported; spec contract and theuser_me.jsonfixture gainmention_flags),fluxer-api(patch_me, wiremock test),fluxer-core::effect(ApiRequest::PatchMe, appended) and one routing arm inapps/fluxer/src/runtime.rs.AudioCommand::PlayChimeAt { chime, gain }appended (and one arm inapps/fluxer/src/audio_rt.rs, the chime playback moved into a helper) so the master volume reaches the engine without changing the shape ofPlayChime, which ~20 existing voice tests assert.PlayChimeis kept when the master volume is 100 %.app.rs: one call toshell::notif_prefs::followright aftereffects.finish()(placed away from the line Shell 13 adds for its badge/sound gate).sound_volumealso readsShellState::sound_allowed, so Shell 13's gate and this one agree onPlayChimeAttoo.LocalSettings::notification_prefsis removed; Shell 7'sLocalSettings::notification_sounds: Box<StoredNotificationSounds>is the only stored form of[notifications.sounds]and the only thingfluxer-platformreads and writes (unchanged).NotificationPrefsis a view:NotificationPrefs::from_stored(&StoredNotificationSounds)(unknown names ignored, the original's defaults for missing ones) andNotificationPrefs::apply_to(&self, &mut StoredNotificationSounds)(writes the known names, leaves the rest). A change goes throughNotificationPrefsAction::apply_to(self, &mut StoredNotificationSounds)inpersist::reduce(the same path asShellSettingChange): it writes only the name it changes (master_volume,disabledor the sound's), so a newer version's names and values survive a load → change → save.sound_volume,followandnotifications_pageread the view. The carrier needed nothing new (StoredValue::Int/Boolalready cover the volume and the switches).master_volume_scales_and_clamps,disable_all_and_per_sound,afk_timeout_patch_and_revert,mention_preference_patch_and_revert,page_model_strings,stored_round_trip) plussound_changes_are_savedandall_arrays_are_exhaustive.How it was tested
crates/fluxer-core/tests/shell_notif_prefs.rs(10 tests; since the joinview_of_the_stored_tableanda_change_writes_only_its_own_name: a change writes exactly one name into a table holding unknown names and values, and the preview / timeout / mention write none),apps/fluxer/src/runtime.rs::tests::notification_sound_switch_reaches_the_settings_file: a file with a planted unknown sound and value, loaded through the runtime's persistence, a sound switched in the store, the store'sSaveSettingsexecuted: the file on disk holdsmute = falseand still the planted names, and the next load's view has the sound off,crates/fluxer-api/tests/guild_settings.rs::mention_preference_and_afk_timeout_patches(wiremock), proto contract/roundtrip tests.FLUXER_SCREENSHOT_TESTS=1 cargo xtask cigreen locally. No real-display tests apply (pure core; no UI change, so no screenshots). Nothing Windows-specific.Closes #806
Closes #858
🤖 Generated with Claude Code
https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4K
shell::notif_prefs: the notification sounds' master volume (0-200 %), "Disable all notification sounds" and a switch per sound the client plays (NotificationSound::ALL, one per bundled Chime), applied to every PlayChime after the reducers (dropped when off or when the system disallows sounds, PlayChimeAt at the master volume otherwise) and the preview; the inactive timeout (PATCH /users/@me/settings {afk_timeout}) and the reply mention preference (PATCH /users/@me {mention_flags}), both shown at once and put back when the write fails; notifications_page with the original's strings (notifications_tab/*.tsx, SoundLabels.ts). Refs #806 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0161qMQMsCyJhjYw4gqa6e4KIndependent review: Shell 14 (notification settings), head
3b79e2c7Reviewed
git diff 158c90dd..origin/shell-14-core-notification-settings-inactivecold.Gate:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh review worktree: all steps passed.Checks
master_volume_scales_and_clamps,disable_all_and_per_sound,afk_timeout_patch_and_revert,mention_preference_patch_and_revert,page_model_strings,stored_round_trip), plussound_changes_are_savedandall_arrays_are_exhaustive. They assert the spec's values: 0–200 % master volume with a default of 100, a 60–600 s timeout shown as 1–10 minutes, and flags 0/1/2. The revert tests driveEffectFailed.NotificationPrefs { master_volume: u8, all_disabled, disabled: BTreeSet<NotificationSound> }withstored/apply_stored,NotificationSound::ALL(append-only, with an exhaustiveness test),sound_volume(app, sound) -> Option<f32>andnotifications_page(app) -> NotificationsPageModelall exist.ShellAction::NotificationPrefs,ApiRequest::PatchMeandAudioCommand::PlayChimeAtare appended, and no existing variant changed shape.UserPrivate.mention_flagsandUserPatchmatchUserResponseSchemas.ts:68-72andUserRequestSchemas.ts:108, andUserSettingsPatch.afk_timeoutmatches:380. The new fields are optional and skipped when unset, so the round-trip and spec-contract tests pass. No path panics on server data:from_flagsmaps any value, andtimeout_minutessaturates. No secrets appear in the code or fixtures.deaf,undeaf,incoming-ring, …) matchSoundUtils.ts:31-48.SoundLabels.ts.COMMON_SOUND_TYPESmatchesNotificationsTabSounds.tsx:115.Sound.ts:329previewSoundandNotificationsTabSounds.tsx:186.getEffectiveMultiplier.Math.max(1, Math.min(10, Math.round(s/60))), and the write isafkTimeout: value*60, as inNotifications.tsx:116.PATCH /users/@me, as inMentionPreferenceTab.tsx(UserCommands.update). The PR's deviation from the plan is therefore correct.NotificationSound::ALLis append-only and has its exhaustiveness test.of_chimeis an exhaustive match, so a newChimewill not compile until it has a sound.Findings
mention_flagson the user, not in user settings) and is documented in the PR. The orchestrator should acknowledge it before merging.crates/fluxer-core/src/persist.rs. That file is not a registration file, and Global Constraints say such a conflict goes to the orchestrator rather than being resolved by keeping both sides. Please flag it when merging. #858 tracks the wiring.SetMentionPreference(flags); the code takes aMentionPreferenceenum, withflags()/from_flags(). Task 39 reads it through the page model, so nothing breaks.notif_prefs::reducesettles the oldest pending mention write on anyApiResult::Me, because the answer carries no request id. An unrelatedMe, today only the restore path, could settle a write early. The effect is cosmetic: the session's user is then shown.Verdict: approved. No blocking findings, and the gate is green.
Joined with Task 7 per the orchestrator's decision: one field, one on-disk owner.
LocalSettings::notification_prefsis removed; Task 7'sLocalSettings::notification_sounds: StoredNotificationSoundsis the only stored form of[notifications.sounds]and the only thing fluxer-platform reads and writes (unchanged).NotificationPrefsis now a view in fluxer-core:NotificationPrefs::from_stored(unknown names ignored, the original's defaults for missing ones) andapply_to;persist::reducewrites each change withNotificationPrefsAction::apply_to, which sets only the name the change touches (master_volume,disabledor the sound's), so unknown names and values survive load → change → save.sound_volume,followandnotifications_pageread the view. The carrier needed no extension. New tests:shell_notif_prefs::{view_of_the_stored_table, a_change_writes_only_its_own_name}andruntime::tests::notification_sound_switch_reaches_the_settings_file(switch in the store → the runtime's save → the file hasmute = falseand still the plantedfuture-sound/message_volume; the next load sees it). Merge commitcda9f301; full gate (FLUXER_SCREENSHOT_TESTS=1 dbus-run-session -- cargo xtask ci): all steps passed. Closes #858.Merged into
shellby hand (the merge API returns 405); the commits are in the branch.Independent review: Shell 14 (core-notification-settings-inactive), head
cda9f301cReviewed
git diff a68e4701d..origin/shell-14-core-notification-settings-inactivefrom scratch. The branch is already an ancestor oforigin/shell, so this review checks the code after the merge.Gate:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh worktree atcda9f301c: all steps passed (exit 0).Checks
crates/fluxer-core/tests/shell_notif_prefs.rs(master_volume_scales_and_clamps,disable_all_and_per_sound,afk_timeout_patch_and_revert,mention_preference_patch_and_revert,page_model_strings,stored_round_trip). They check the spec values: 0–200 % with a default of 100, a timeout of 60–600 s offered as 1–10 minutes,mention_flags0/1/2, and the strings. Extra tests cover saving, the view of the stored table, writes that change only one name, andALLexhaustiveness. The runtime testnotification_sound_switch_reaches_the_settings_fileshows that names written by a newer version survive a save.NotificationPrefs { master_volume: u8, all_disabled, disabled: BTreeSet<NotificationSound> }withstoredis present, and so aresound_volume(app, sound) -> Option<f32>,NotificationSound::ALL,notifications_page(app) -> NotificationsPageModel(General / Mention preference / Sounds),SetAfkTimeout(seconds)andSetMentionPreference.ShellAction::NotificationPrefsandAudioCommand::PlayChimeAtare appended at the end.afk_timeoutand the volume are clamped,try_fromhas a fallback, and an unknownmention_flagsvalue reads as no preference. Unknown names in[notifications.sounds]are kept. There are no secrets, and the only log lines are the setting name and the error. The fixtureuser_me.jsongainsmention_flags, as inUserResponseSchemas.ts. The proto change is checked against the OpenAPI document (spec_contract).Math.max(1, Math.min(10, Math.round(afkTimeout/60)))(PushSettings.tsx). The mention preference isUserCommands.update({mention_flags}), i.e.PATCH /users/@me, andflagToValuematches (MentionPreferenceTab.tsx).DEFAULT_MASTER_VOLUME = 100,MAX_VOLUME_PERCENT = 200andclampVolumematchSound.ts. Preview is disabled while all sounds are off, and the order of the common sounds matches (NotificationsTabSounds.tsx). Labels matchSoundLabels.ts. Sound names matchSoundUtils.ts(deaf,incoming-ring, ...). The only sound the original disables by default (SameChannelMessage) is not one this client plays, so the defaults agree.NotificationSound::ALL,MentionPreference::ALL) are append-only and have exhaustiveness tests.of_chimeis an exhaustive match, so a newChimewill not compile without its sound.Findings
PATCH /users/@meand noafk_timeoutin the patch type) and they are small, so this is a process note only.notif_prefs::reducetreats anyApiResult::Meas the reply to the oldest pending mention write. AMefrom another request, such as a profile edit, can therefore pop that write early. The page then shows the server's value until the real reply arrives. This is only a brief visual effect and loses no data.sound_volumebuildsNotificationPrefs::from_storedfrom the table on every chime and every call to the page model. This is cheap at 15 entries, but a cached view would be tidier.Verdict: APPROVED. No blocking findings, and CI is green locally.
Pull request closed