feat(notifications): per-child quiet hours / DND (FEAT-5)#605
Merged
Conversation
Suppress a child's notifications during a configurable do-not-disturb window. Child model gains quiet_hours_start/quiet_hours_end (HH:MM); NotificationCoordinator.fire() skips a child route when the current local time falls inside the window (start>end = overnight; end exclusive; either blank = disabled). Parent routes and the bus event are unaffected. - models: Child.quiet_hours_start/end + (de)serialise - coord_notifications: _is_within_quiet_hours() pure helper + _child_in_quiet_hours() gate in fire() - websocket: expose fields in notifications/get_state; new notifications/set_child_quiet command with HH:MM validation - panel: per-child quiet-hours time inputs in the Recipients section - i18n: panel.notif_quiet_hours_label/desc in all 8 locales - tests: window logic (normal/overnight/disabled/bounds) + dispatch suppression + parent-unaffected + round-trip
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.
FEAT-5 — Per-child quiet hours / DND
Suppresses a child's TaskMate notifications during a configurable do-not-disturb window (e.g. school hours, bedtime). Complements the existing notification routing.
Behaviour
quiet_hours_start/quiet_hours_end,HH:MM).NotificationCoordinator.fire(), a child route is skipped when the current local time is inside the window.start > enddenotes an overnight window (e.g.20:00–07:00); the end bound is exclusive; either bound blank = disabled.Changes
Child.quiet_hours_start/quiet_hours_end(+ (de)serialise)._is_within_quiet_hours()helper +_child_in_quiet_hours()gate infire().notifications/get_state; newnotifications/set_child_quietcommand (admin-only) withHH:MMvalidation.panel.notif_quiet_hours_label/_descin all 8 locales.test_quiet_hours.py: window logic (normal / overnight / disabled / equal-bounds / boundaries), dispatch suppression, parent-unaffected, model round-trip.Verification
pytest tests/test_quiet_hours.py+ notification/models/storage suites green; Ruff clean.20:00/07:00), invalid99:99rejected (invalid_format), clear→"". Panel JSnode --checkclean.Part of the v4.3.1 audit fix+feature campaign. No version bump / release.