Add notification preferences for BOS Settings v2 #57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/notification-preferences"
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?
Closes #56
Adds a persisted, versioned notification preference API on dev.breadway.Bar for the BOS Settings v2 controls. The server consumes manual and scheduled DND, per-app banner/history/off policy, sounds and lock-time suppression. Critical alert behavior is retained. Stage DND controls use the same preferences and all stage indicators refresh together.
Also consumes the Settings clock-format and validated font/text preferences. Later bar-specific CSS edits retain precedence. Unknown preference keys are preserved and writes keep a backup.
Verification: clippy with warnings denied, 24 headless notification tests, and a test binary built using the documented dev dependency overrides. Cargo.lock retains tagged dependencies. Updated with the latest origin/main.
UI testing remains reserved for the user. No app launch, desktop manipulation, live configuration writes or service starts were used for verification. Sound requires canberra-gtk-play; secure lock surfaces determine whether notification windows can appear while locked.
Companion Settings changes: bos-settings PR #46. API details: docs/notification-preferences.md.
Breadway referenced this pull request2026-10-03 16:15:13 +08:00
Independent review of head
8263a8f117. Verdict: changes requested. Not merged.Reviewed in an isolated worktree at that SHA. Required check
check / check (push)is success on this SHA (actions run 185, commit_sha matches, finished 2026-10-03). No prior reviews. Branch protection list is empty. dev-release.yml is main-only and correctly did not run here. A formal REQUEST_CHANGES review was rejected by Forgejo ("reject your own pull is not allowed"), so this comment is the persisted verdict.The PR is not mergeable against current origin/main (
e5f148009a). merge-tree reports one conflict in src/main.rs: main clones notif_store into stage::Shared::new, this branch does not and inserts the preference poll in the same region. src/notifications/mod.rs and src/stage/mod.rs also changed on both sides. Merge main into this branch and resolve that before a new review.Criteria:
Also: GetNotificationPreferences inserts every history app at the default policy as a side effect of a read (mod.rs:285-287). A later Set of that payload persists apps the user never chose. Do not do that on read; return known apps separately if Settings needs a list.
Do not merge. Update the branch with current main, fix the lock/critical split and the clock formatted() path, and add tests that drive Notify (history, banner event, sound gate, lock, critical) plus save/load round-trip, unknown-key preservation, and stage indicator refresh. BOS Settings UI consumption can stay unverified on this provider PR if the provider tests above exist.
Independent review of head
8263a8f117. Verdict: changes requested. Not merged.Reviewed in an isolated worktree at that SHA. Required check
check / check (push)is success on this SHA (actions run 185, commit_sha matches, finished 2026-10-03). No prior reviews. Branch protection list is empty. dev-release.yml is main-only and correctly did not run here. A formal REQUEST_CHANGES review was rejected by Forgejo ("reject your own pull is not allowed"), so this comment is the persisted verdict.The PR is not mergeable against current origin/main (
e5f148009a). merge-tree reports one conflict in src/main.rs: main clones notif_store into stage::Shared::new, this branch does not and inserts the preference poll in the same region. src/notifications/mod.rs and src/stage/mod.rs also changed on both sides. Merge main into this branch and resolve that before a new review.Criteria:
Also: GetNotificationPreferences inserts every history app at the default policy as a side effect of a read (mod.rs:285-287). A later Set of that payload persists apps the user never chose. Do not do that on read; return known apps separately if Settings needs a list.
Do not merge. Update the branch with current main, fix the lock/critical split and the clock formatted() path, and add tests that drive Notify (history, banner event, sound gate, lock, critical) plus save/load round-trip, unknown-key preservation, and stage indicator refresh. BOS Settings UI consumption can stay unverified on this provider PR if the provider tests above exist.
Review rework follow-up (BAR-56). Branch now at
535d746, fast-forward of1542b54plus a rustfmt-only style commit. Merge of origin/main already in (16dac6d, keeps notif_store clone plus preference poll).Mapping to review items:
16dac6d, src/main.rs keeps both.Checks on this head: cargo clippy --all-targets -- -D warnings passes, cargo build passes, cargo test passes (151 passed, 0 failed), cargo test --locked resolves. Changed-file rustfmt is clean; repo-wide cargo fmt --check still flags pre-existing files untouched by this change (bluetooth, control, slots, stats, tray, workspaces, panel, theme_widgets, widgets, popup, pure). Docker-based ci/build.sh could not run here (no docker daemon), so check.yml was mirrored with direct cargo. BOS Settings UI consumption stays unverified on this provider PR.
Independent re-review of head
535d746d0e. Verdict: pass. Merged as3f17c44e4f.Reviewed the full diff vs base
e5f148009ain an isolated worktree at the exact head. Head matches the expected SHA; base main is unchanged since the previous review. Required checkcheck / check (push)is success on this exact SHA (task 2420, run 194, finished 2026-10-14). No outstanding formal reviews. Branch was mergeable with no conflicts.Repair-item confirmation against the changes_requested review at
8263a8f(comment 4566) and the repair note (comment 4624):16dac6dof origin/main; src/main.rs keeps both the notif_store clone into stage::Shared::new and the new preference poll block. PR reports mergeable true.Independent runs in the scratch worktree at this head: cargo clippy --all-targets -- -D warnings clean; cargo test 151 passed 0 failed; cargo fmt --check flags only pre-existing files plus one cosmetic nit in new test code at mod.rs:1348 (not CI-enforced; check.yml runs clippy plus test only).
BOS Settings UI consumption stays unverified on this provider PR by design. As the provider half this is correct: versioned Get/Set on dev.breadway.Bar with api_version 1, effective_dnd, sound_available, known_apps, unknown-key tolerance, backup writes, and server-side consumption of every stored field.
Merged under standing breadbar dev-release authorization; no tags touched.
Independent re-review of breadbar PR #57 head
535d746d0e. Verdict: pass. Merged as3f17c44e4f.All repair items from the changes_requested review confirmed in an isolated worktree at the exact head: merge conflict resolved (
16dac6dkeeps notif_store clone plus poll, mergeable true); lock/critical unified under presentation() with paired predicate plus live-path tests; clock formatted() layers over theme format with tests; Notify/persistence/provider round-trip/backup/unknown-keys/sound tests pass; invalid schedule falls back to 22:00-07:00; Get reports known_apps without absorbing history apps; stage DND round trip, shared flag, refresh fan-out, and two-stage refresh verified; text_css allowlist and mtime precedence verified via throwaway scratch probes (scratch restored). Runs: clippy -D warnings clean, cargo test 151 passed 0 failed, required check task 2420/run 194 success on this exact SHA, no outstanding reviews. Pre-merge re-read confirmed head, base (e5f1480), checks, and mergeability unchanged.BOS Settings UI consumption stays unverified on this provider PR by design; as the provider half this is correct. Full verdict persisted on the PR (comment 4647). Cards stay in review for coordinator verification, not done.