Skip to content

feat(notifications): make connection-problem sound opt-in - #633

Merged
mairas merged 1 commit into
mainfrom
feat/connection-sound-opt-in
Sep 22, 2026
Merged

mairas merged 1 commit into
mainfrom
feat/connection-sound-opt-in

Conversation

@mairas

@mairas mairas commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Every interruption of the Signal K server connection played assets/notification.mp3. On a boat with a flaky link that is a chime every few seconds, and there was no way to turn it off short of disabling all notification audio.

The retry, permanent-failure and unknown-state connection toasts are now silent unless the new notificationConfig.sound.playConnectionSound option is on. It defaults to false, and configs written before this change lack the field, which reads as off — so no migration and no version bump (VERSION is already at 1.5.0 against the v1.4.1 stable release, so the cycle is open).

The checkbox sits at the top level of Settings → Notifications, next to "Disable audio", rather than inside the Audio expansion panel. That panel is disabled by disableNotifications, which governs Signal K notification states; a connection toast is not one of those, so burying the option there would make it unreachable for a user who has notifications off.

Tests cover the default-silent path, the opted-in path, the bootstrap suppression that still wins over the opt-in, and a stored config that predates the field.

🤖 Generated with Claude Code

  • Makes Signal K connection-problem sounds opt-in.
  • Adds Play a sound on Signal K connection problems to Notifications settings.
  • Defaults notificationConfig.sound.playConnectionSound to false, including for older stored configurations.
  • Keeps connection retry, permanent-failure, and unknown-state toasts silent unless the setting is enabled.
  • Preserves bootstrap suppression for connection sounds.
  • Adds tests for default, opt-in, bootstrap, and legacy-configuration behavior.

The Signal K connection retry and permanent-failure toasts played
notification.mp3 on every interruption. The sound now needs
notificationConfig.sound.playConnectionSound, which defaults to off and
is absent from configs written before this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: halos-org/skip/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: ff59817b-0546-4bb1-adff-1ef85af1bfb5

📥 Commits

Reviewing files that changed from the base of the PR and between 50502de and 2a27096.

📒 Files selected for processing (7)
  • src/app/app.component.spec.ts
  • src/app/app.component.ts
  • src/app/core/components/settings/notifications/notifications.component.html
  • src/app/core/components/settings/notifications/notifications.component.spec.ts
  • src/app/core/components/settings/notifications/notifications.component.ts
  • src/app/core/interfaces/app-settings.interfaces.ts
  • src/default-config/config.blank.notification.const.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Connection sound preference

Layer / File(s) Summary
Notification setting contract and control
src/app/core/interfaces/app-settings.interfaces.ts, src/default-config/config.blank.notification.const.ts, src/app/core/components/settings/notifications/*
The notification configuration adds playConnectionSound, defaulting to false. Legacy configurations receive the same default. The settings page adds a checkbox that is disabled when sound is disabled. Tests cover the legacy configuration.
Connection toast sound behavior
src/app/app/app.component.ts, src/app/app/app.component.spec.ts
Connection-status toasts are silent when playConnectionSound is disabled or bootstrap is not ready. Tests cover default, opted-in, and bootstrapping states.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SettingsService
  participant AppComponent
  participant ToastService
  SettingsService->>AppComponent: Provide playConnectionSound
  AppComponent->>AppComponent: Check setting and bootstrap readiness
  AppComponent->>ToastService: Show connection-status toast with sound flag
Loading

Merge Risk: ⚪ Minimal · up to 2a270

This makes Signal K connection sounds opt-in while preserving silent behavior for existing configurations; no merge-blocking risk is currently established.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 6 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title uses Conventional Commit form and clearly describes the main change: connection-problem sound becomes opt-in.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mairas mairas changed the title Make the Signal K connection-problem sound an opt-in setting feat(notifications): make connection-problem sound opt-in Sep 22, 2026
@mairas
mairas merged commit 088030d into main Sep 22, 2026
5 checks passed
@mairas
mairas deleted the feat/connection-sound-opt-in branch September 22, 2026 16:09
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.

1 participant