GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(notifications): two-slot sound model + decoupled playback + sound dialog (#576) by Storypapst · Pull Request #579 · OpenResilienceInitiative/ORISO-Frontend

Conversation

@Storypapst

@Storypapst Storypapst commented Jul 21, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Why

Notification sounds were the weakest surface: one hardcoded sound, a single on/off toggle, and the sound was chained to the OS popup (no sound with the tab focused or without browser-notification permission). Closes #576; implements the 2026-07-18 decision (sounds global, two slots) and Frank's UX: a popup dialog from a menu entry, reusing existing icons.

What

  • Decoupled playback — playNotificationSound(family, isMention) fires from NotificationsProvider on a genuinely new unread event, independent of focus/permission. Routed through the single isNotificationSuppressed gate (DND, per-conversation level, mute, family-off) and rate-limited (1 sound / 2 s). Volume 0.5.
  • Two global slots — sounds { message, mention } with SoundId (none|chime|ding|soft|default; mention default inherits messages). Parse/merge/default like dndUntil, cross-device via account data.
  • Calls sound — the calls family uses the existing incomingCall.mp3 (Slack-style separate call sound).
  • Sound dialog — SoundSettingsDialog (OrisoDialog, hero audio-on icon) opened from a menu entry that replaces the old on/off switch; per-slot dropdown + ▶ preview, message slot hides default. i18n de/de@informal/en.

Sound assets are placeholders (only two exist today) — the id model + UI already carry the distinct choices; swap the asset map when a curated library lands.

Verification

TDD: two-slot model (4), soundPlayback helpers (8), dialog render (5). Full suite 1228 green, tsc + eslint clean; Storybook dialog body verified (two slots, preview enabled for chime, disabled for the inherited-silent mention).

Design: 0 - Docs/PROPOSAL-notification-sounds.md. Composes with the shipped DND gate (#571) and per-conversation level.

Closes #576

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a dialog-based notification sound setup for new messages and @ mentions, including tone selection and audio preview.
    • Introduced per-area notification sound configuration with volume controls and optional “send by email” settings.
    • Notification sounds now play for newly received unread events according to your selected message/mention tones.
  • Bug Fixes
    • Prevented repeated sound announcements on initial load and during subsequent feed refreshes.
    • Added throttling to reduce excessive playback.
  • Documentation
    • Updated English and German translations for the new sound/configuration UI, plus audio tone credits.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Storypapst @claude
feat(notifications): two-slot sound model + decoupled playback + soun…
b3895df
…d dialog (#576)

Rebuilds notification sounds per the 2026-07-18 decision + issue #576.

- Sound decoupled from the OS popup: playNotificationSound(family, isMention)
  is driven from NotificationsProvider when a genuinely new unread event
  arrives — so it also sounds with the tab focused and without browser-
  notification permission. Routed through the single isNotificationSuppressed
  gate (DND, per-conversation level, mute, family-off) and rate-limited
  (createSoundThrottle, 1 sound / 2s). Fixed volume 0.5.
- Two global slots in the cross-device settings model: sounds { message,
  mention } with SoundId ('none'|'chime'|'ding'|'soft'|'default'); mention
  'default' inherits messages. Parse/merge/default like dndUntil.
- Calls family uses the existing incomingCall.mp3 (Slack-style call sound).
- SoundSettingsDialog: popup (OrisoDialog, hero audio-on icon) reached from a
  menu entry that replaces the old on/off toggle; per-slot dropdown + preview,
  message slot hides 'default'. i18n de/de@informal/en.
- mentioned param plumbed through EventActionParams so the mention slot fires.

Sound assets are placeholders (only two exist); the id model + UI carry the
distinct choices, swap the asset map when a curated library lands.

TDD: model two-slot (4), soundPlayback (resolveEventSound/soundAssetFor/
assetForEvent/throttle, 8), dialog render (5). Full suite 1228 green,
tsc/eslint clean; Storybook dialog body verified.

Closes #576

Co-Authored-By: Claude Fable 5 <[email protected]>
@Storypapst Storypapst self-assigned this Jul 21, 2026
@Storypapst
Storypapst requested review from Kadyan25, shanzaeimran and shazia-k July 21, 2026 13:22
@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Storypapst Storypapst mentioned this pull request Jul 21, 2026
Notification sounds: two global slots + popup dialog from a menu entry, decoupled playback #576
Closed
7 tasks
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Replaces the notification sound toggle with configurable message, mention, and notification-kind sounds, validated playback helpers, new-event routing, profile dialogs with previews, localization, Storybook coverage, and tests.

Changes

Notification sound model and playback

Layer / File(s) Summary
Sound model and playback helpers
src/utils/notificationSettings/model.ts, src/utils/notificationSettings/notificationConfig.ts, src/utils/notificationSettings/soundPlayback.ts, src/utils/notificationSettings/*test.ts
Adds validated sound slots, per-area notification configuration, event-family asset resolution, call sounds, throttling, persistence parsing, merging, and unit tests.
New-event playback routing
src/components/notificationsCenter/..., src/globalState/provider/NotificationsProvider.tsx, src/utils/notificationHelpers.ts
Propagates mention metadata, removes popup-coupled audio, and plays deduplicated sounds for newly observed unread events.

Notification settings UI

Layer / File(s) Summary
Notification configuration UI
src/components/profile/NotificationSettings/NotificationConfigDialog.*, src/components/profile/NotificationSettings/index.tsx, src/components/modal/OrisoDialog.tsx, src/resources/i18n/*/common.json
Adds area and notification-kind sound/email configuration with tabs, previews, confirmation handling, responsive styling, dialog support, localization, stories, and tests.
Global sound-slot UI
src/components/profile/NotificationSettings/SoundSettingsDialog.*, src/resources/audio/notifications/CREDITS.md
Adds message and mention sound selection, previews, localized labels, Storybook/test coverage, and tone asset attribution.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant NotificationFeed
  participant NotificationsProvider
  participant getEventDescriptor
  participant notificationSettingsStore
  participant playNotificationSound
  NotificationFeed->>NotificationsProvider: normalized notification feed
  NotificationsProvider->>getEventDescriptor: resolve event family
  NotificationsProvider->>notificationSettingsStore: read settings and device data
  NotificationsProvider->>playNotificationSound: play configured sound for new unread event
Loading

Possibly related PRs

  • OpenResilienceInitiative/ORISO-Frontend#249: Extends event descriptor metadata used by notification behavior.
  • OpenResilienceInitiative/ORISO-Frontend#351: Provides the dialog component extended here with configurable footer actions and SVG sizing.

Suggested labels: coderabbit

Suggested reviewers: shazia-k, kadyan25, shanzaeimran

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise, conventional, and clearly names the notifications area and main sound-dialog change.
Linked Issues check ✅ Passed [#576] The PR covers decoupled playback, two-slot settings, dialog UI, calls, throttling, persistence, tests, and Storybook coverage.
Out of Scope Changes check ✅ Passed No clear out-of-scope changes; the i18n, styles, tests, credits, and OrisoDialog footer toggle all support the #576 implementation.
Validation Evidence ✅ Passed PASS: The PR adds targeted Vitest suites for playback helpers, notification config/settings, and both dialogs, and the description also reports a green suite/tsc/eslint.
Shared Ui Architecture ✅ Passed PASS: the new dialogs reuse OrisoDialog, shared notification config/sound helpers, and existing icons; no clear duplicate ORISO interaction pattern emerged.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/notification-sounds

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]
coderabbitai Bot requested changes Jul 21, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/profile/NotificationSettings/SoundSettingsDialog.tsx`:
- Line 123: Replace the hardcoded preview volume assignment in
SoundSettingsDialog with the shared DEFAULT_VOLUME constant. Export
DEFAULT_VOLUME from soundPlayback.ts and import it into SoundSettingsDialog so
preview playback stays aligned with the live notification baseline.

In `@src/globalState/provider/NotificationsProvider.tsx`:
- Line 28: Update the getEventDescriptor import in NotificationsProvider to
reference the underlying registry module directly instead of the barrel
eventDescriptors module, preserving the existing symbol usage while avoiding
unrelated code during page load.
- Around line 140-156: Update maybePlaySoundForNewEvent to use the absolute
newest event from feed[0] regardless of read state, rather than finding the
first unread item. Return when the feed is empty, the newest event matches
lastAnnouncedEventIdRef.current, or the newest event is already read; otherwise
update the marker and play the notification sound for that event.

In `@src/resources/i18n/en/common.json`:
- Around line 2023-2037: Remove the obsolete sounds string entry from the
notificationSettings block in the English dictionary and the corresponding
German translation files, while preserving the new notifications.sounds object
and all other translation keys.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e004e8da-044f-4142-9b4e-cca10c73adda

📥 Commits

Reviewing files that changed from the base of the PR and between 371854c and b3895df.

📒 Files selected for processing (15)
  • src/components/notificationsCenter/eventDescriptors/types.ts
  • src/components/notificationsCenter/notificationActionTarget.ts
  • src/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsx
  • src/components/profile/NotificationSettings/SoundSettingsDialog.test.tsx
  • src/components/profile/NotificationSettings/SoundSettingsDialog.tsx
  • src/components/profile/NotificationSettings/index.tsx
  • src/globalState/provider/NotificationsProvider.tsx
  • src/resources/i18n/de/common.json
  • src/resources/i18n/de@informal/common.json
  • src/resources/i18n/en/common.json
  • src/utils/notificationHelpers.ts
  • src/utils/notificationSettings/model.ts
  • src/utils/notificationSettings/notificationSettings.test.ts
  • src/utils/notificationSettings/soundPlayback.test.ts
  • src/utils/notificationSettings/soundPlayback.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: lint, type-check, test, build and Docker validation
  • GitHub Check: lint, type-check, build and Storybook Docker validation
  • GitHub Check: lint, type-check and build frontend
  • GitHub Check: lint, type-check, build and test frontend
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Keep shared behavior in hooks/utilities when multiple screens need the same state, route, selection, or formatting logic.
UI changes must have accessible focus/keyboard behavior and must not rely on color alone.

Files:

  • src/components/profile/NotificationSettings/SoundSettingsDialog.test.tsx
  • src/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsx
  • src/components/notificationsCenter/eventDescriptors/types.ts
  • src/components/profile/NotificationSettings/index.tsx
  • src/components/notificationsCenter/notificationActionTarget.ts
  • src/utils/notificationSettings/soundPlayback.test.ts
  • src/utils/notificationSettings/soundPlayback.ts
  • src/components/profile/NotificationSettings/SoundSettingsDialog.tsx
  • src/globalState/provider/NotificationsProvider.tsx
  • src/utils/notificationSettings/notificationSettings.test.ts
  • src/utils/notificationSettings/model.ts
  • src/utils/notificationHelpers.ts
**/*.{scss,sass,css,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Reuse existing design tokens, Sass mixins, and component patterns; avoid one-off hardcoded CSS for controls, active list states, focus rings, and responsive layout.

Files:

  • src/components/profile/NotificationSettings/SoundSettingsDialog.test.tsx
  • src/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsx
  • src/components/notificationsCenter/eventDescriptors/types.ts
  • src/components/profile/NotificationSettings/index.tsx
  • src/components/notificationsCenter/notificationActionTarget.ts
  • src/utils/notificationSettings/soundPlayback.test.ts
  • src/utils/notificationSettings/soundPlayback.ts
  • src/components/profile/NotificationSettings/SoundSettingsDialog.tsx
  • src/globalState/provider/NotificationsProvider.tsx
  • src/utils/notificationSettings/notificationSettings.test.ts
  • src/utils/notificationSettings/model.ts
  • src/utils/notificationHelpers.ts
src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

src/**/*.{ts,tsx,js,jsx}: Check behavior against the surrounding ORISO flow, not only types.
Flag duplicated route/state logic, missing error/loading handling,
privacy regressions around Matrix/chat/drafts, and changes that should
be expressed through shared hooks or utilities instead of local flags.

Files:

  • src/components/profile/NotificationSettings/SoundSettingsDialog.test.tsx
  • src/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsx
  • src/components/notificationsCenter/eventDescriptors/types.ts
  • src/components/profile/NotificationSettings/index.tsx
  • src/components/notificationsCenter/notificationActionTarget.ts
  • src/utils/notificationSettings/soundPlayback.test.ts
  • src/utils/notificationSettings/soundPlayback.ts
  • src/components/profile/NotificationSettings/SoundSettingsDialog.tsx
  • src/globalState/provider/NotificationsProvider.tsx
  • src/utils/notificationSettings/notificationSettings.test.ts
  • src/utils/notificationSettings/model.ts
  • src/utils/notificationHelpers.ts
🧠 Learnings (1)
📚 Learning: 2026-07-18T03:56:46.133Z
Learnt from: kiodreambau
Repo: OpenResilienceInitiative/ORISO-Frontend PR: 516
File: src/components/groupChat/waitingClock/WaitingAreaCountdown.stories.tsx:0-0
Timestamp: 2026-07-18T03:56:46.133Z
Learning: When reviewing Storybook stories (e.g., `*.stories.tsx`), treat story-specific styling done via isolated inline decorators/fixtures as Storybook simulation, not as production design tokens or focus-style behavior. Do not flag the story’s styles as production focus/regression issues unless the change involves the actual production components (not the story wrapper/fixture).

Applied to files:

  • src/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsx
🪛 React Doctor (0.7.6)
src/components/profile/NotificationSettings/SoundSettingsDialog.tsx

[warning] 48-48: This loops over your list twice because .filter().map() makes two passes, so do it in one pass with .reduce() or a for...of loop

Combine .map().filter() style chains into one pass with .reduce() or a for...of loop, so you only loop over the list once

(js-combine-iterations)

src/globalState/provider/NotificationsProvider.tsx

[warning] 28-28: This ships extra code to your users & slows page load. Import directly from "../../components/notificationsCenter/eventDescriptors/registry".

Import from the direct path: import { Button } from './components/Button' instead of ./components

(no-barrel-import)

🔇 Additional comments (7)
src/utils/notificationSettings/model.ts (1)

36-59: LGTM!

Also applies to: 84-85, 138-144

src/utils/notificationSettings/soundPlayback.ts (1)

1-105: LGTM!

src/utils/notificationSettings/notificationSettings.test.ts (1)

53-57: LGTM!

Also applies to: 213-258

src/utils/notificationSettings/soundPlayback.test.ts (1)

1-70: LGTM!

src/components/notificationsCenter/eventDescriptors/types.ts (1)

91-92: LGTM!

src/components/notificationsCenter/notificationActionTarget.ts (1)

50-52: LGTM!

src/utils/notificationHelpers.ts (1)

2-5: LGTM!

Also applies to: 76-80

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/components/profile/NotificationSettings/SoundSettingsDialog.tsx
const asset = soundAssetFor(soundId);
if (asset && 'Audio' in window) {
const audio = new Audio(asset);
audio.volume = 0.5;

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use DEFAULT_VOLUME for consistent preview volume.

Hardcoding 0.5 could cause the preview to drift from the actual notification volume if the baseline changes. Consider exporting DEFAULT_VOLUME from soundPlayback.ts and using it here so the preview accurately matches the live notification.

♻️ Proposed refactor
-			audio.volume = 0.5;
+			audio.volume = DEFAULT_VOLUME;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
audio.volume = 0.5;
audio.volume = DEFAULT_VOLUME;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/profile/NotificationSettings/SoundSettingsDialog.tsx` at line
123, Replace the hardcoded preview volume assignment in SoundSettingsDialog with
the shared DEFAULT_VOLUME constant. Export DEFAULT_VOLUME from soundPlayback.ts
and import it into SoundSettingsDialog so preview playback stays aligned with
the live notification baseline.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/globalState/provider/NotificationsProvider.tsx
import { messageEventEmitter } from '../../services/messageEventEmitter';
import { playNotificationSound } from '../../utils/notificationSettings/soundPlayback';
import { notificationSettingsStore } from '../../utils/notificationSettings/store';
import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors';

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Avoid barrel import to improve page load.

Importing directly from the registry file prevents pulling in unnecessary code when only resolving event descriptors.

⚡ Proposed refactor
-import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors';
+import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors/registry';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors';
import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors/registry';
🧰 Tools
🪛 React Doctor (0.7.6)

[warning] 28-28: This ships extra code to your users & slows page load. Import directly from "../../components/notificationsCenter/eventDescriptors/registry".

Import from the direct path: import { Button } from './components/Button' instead of ./components

(no-barrel-import)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/globalState/provider/NotificationsProvider.tsx` at line 28, Update the
getEventDescriptor import in NotificationsProvider to reference the underlying
registry module directly instead of the barrel eventDescriptors module,
preserving the existing symbol usage while avoiding unrelated code during page
load.

Source: Linters/SAST tools

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/globalState/provider/NotificationsProvider.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/resources/i18n/en/common.json
Comment on lines +2023 to +2037
"sounds": {
"title": "Notification sounds",
"intro": "Choose sounds for new messages and for mentions. Sounds apply on all your devices.",
"preview": "Preview",
"slot": {
"message": "New messages",
"mention": "Mentions"
},
"choice": {
"none": "No sound",
"chime": "Chime",
"ding": "Ding",
"soft": "Soft",
"default": "Same as messages"
}

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the obsolete sounds string from the notificationSettings block.

Adding this new sounds object under the notifications scope leaves the previous "sounds": "Notification sounds" key (located further down in the notificationSettings block) as dead code since the old toggle was removed.

Please remove the unused string here and in the corresponding German translation files to keep the dictionaries clean.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/resources/i18n/en/common.json` around lines 2023 - 2037, Remove the
obsolete sounds string entry from the notificationSettings block in the English
dictionary and the corresponding German translation files, while preserving the
new notifications.sounds object and all other translation keys.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Storypapst @claude
feat(notifications): figma notification-config dialog + 12 self-hoste…
c841cdd
…d tones (#576)

Implements the Figma design (desktop node 8863-41527, mobile 8863-41975): a
popup dialog opened from a menu entry, with three area tabs (Anfrage /
Gespraech / Termine — Termine disabled) and, per area, three kinds (New
Request / Standard Notification / @Mentioning), each a sound dropdown + "Send
by Email".

- Sounds: 12 tones vendored from react-sounds (MIT (c) Lukas Schneider) and
  self-hosted (no runtime CDN — CSP/privacy) as ton-1..12.mp3 with attribution
  + links in resources/audio/notifications/CREDITS.md. Downloaded via the
  react-sounds CLI offline mode. Named "Ton #1".."Ton #12" in the UI; SoundId
  catalogue extended, soundAssetFor maps them.
- Model: notificationConfig (area x kind -> {sound,email}) with tolerant parse
  + immutable setter, persisted cross-device in the settings store.
- Dialog: OrisoDialog + provided icons (notification_settings hero,
  notification_audio_off for "No Sound Selected", notification_audio when a
  tone is picked); Confirm/Cancel footer; tab switching; tone preview on
  select. Replaces the simpler sound entry in the profile panel.

TDD: notificationConfig model (6), NotificationConfigView render (6). Full
suite 1240 green, tsc/eslint/stylelint/m3Sweep clean. Storybook desktop +
mobile verified against the mockups.

Refs #576

Co-Authored-By: Claude Fable 5 <[email protected]>
@Storypapst

Storypapst commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Extended per Frank's 2026-07-21 follow-up — the Figma "Configure your notifications" dialog is now implemented and the tones are real & self-hosted:

Sounds (license-checked): react-sounds' sound assets are not CC0 — the repo (code + sounds) is MIT © Lukas Schneider. So instead of the CDN-backed lib (blocked by our CSP/privacy) I self-hosted 12 tones downloaded via the react-sounds CLI offline mode into resources/audio/notifications/ton-1..12.mp3, with the MIT attribution + links in CREDITS.md. Frank's list had system/boot_down twice → 12 unique tones, shown as "Ton #1".."Ton #12".

Dialog (Figma 8863-41527 desktop / 8863-41975 mobile): popup from a menu entry, three area tabs Anfrage / Gespräch / Termine (Termine disabled), per area three rows New Request / Standard Notification / @Mentioning, each a sound dropdown ("No Sound Selected" + muted-audio icon, switches to audio icon when a tone is picked) + Send by Email. Confirm/Cancel footer. Uses the provided notification_settings (hero), notification_audio / notification_audio_off icons. Model notificationConfig (area×kind → {sound,email}) persisted cross-device.

TDD: model (6) + view render (6). Full suite 1240 green, tsc/eslint/stylelint/m3Sweep clean. Storybook desktop + mobile verified against the mockups.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]
coderabbitai Bot requested changes Jul 21, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/utils/notificationSettings/soundPlayback.ts (1)

1-41: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Make playback consume notificationConfig.

The current inputs only distinguish family and isMention, while the dialog persists separate new, standard, and mention sounds per area. Consequently, distinct new/standard choices cannot affect playback; the helper still resolves generic message/mention slots. Carry notification kind (or the original event classification) into playback and resolve settings.notificationConfig[area][kind].sound.

Based on the PR objective, the area/kind configuration must drive notification playback. As per path instructions, “Check behavior against the surrounding ORISO flow, not only types.”

Also applies to: 79-135

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/notificationSettings/soundPlayback.ts` around lines 1 - 41, Update
resolveEventSound and its callers to accept the notification area and event
kind, then resolve the sound from settings.notificationConfig[area][kind].sound
so distinct new, standard, and mention choices control playback. Trace the
surrounding ORISO notification flow to preserve the original event
classification when passing these values, rather than collapsing events into
generic message/mention slots.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss`:
- Around line 19-138: Update the styles under the notification dialog selectors,
especially __tab, __selectWrap, __select, __email, __cancel, and __confirm, to
reuse the repository’s existing design tokens, Sass mixins, shared control
styles, and focus/active-state patterns. Remove bespoke hard-coded colors,
borders, spacing, and control treatments while preserving the current layout and
tab, selection, checkbox, and action-button behavior.

In `@src/components/profile/NotificationSettings/NotificationConfigDialog.tsx`:
- Around line 134-158: Complete the accessible tab interaction in
NotificationConfigDialog.tsx by adding keyboard navigation, tab-to-panel linkage
with aria-controls, and a corresponding tabpanel while preserving disabled-area
behavior; update notificationConfigDialog.styles.scss to restore a visible
:focus-visible or :focus-within indicator. Apply these changes at
src/components/profile/NotificationSettings/NotificationConfigDialog.tsx lines
134-158 and
src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
lines 86-94.

In `@src/resources/audio/notifications/CREDITS.md`:
- Around line 7-13: Replace the paraphrased MIT notice in CREDITS.md with the
complete MIT license text, preserving the copyright holder attribution for
react-sounds. Add the text in a dedicated license file such as
LICENSES/react-sounds-MIT.txt and update CREDITS.md to reference that file.

In `@src/resources/i18n/en/common.json`:
- Around line 2039-2056: Update the notification config translations under
config: correct “seperately” to “separately”, replace the German area labels
with “Requests”, “Conversations”, and “Appointments”, and change the
kind.mention label to “Mention”.

In `@src/utils/notificationSettings/model.ts`:
- Around line 70-87: Add translations for ton-1 through ton-12 used by SOUND_IDS
so SoundSettingsDialog resolves visible labels in every locale; alternatively,
route these IDs through the existing numbered-tone translation mechanism.
Preserve the current translation lookup for other sound IDs.

In `@src/utils/notificationSettings/notificationConfig.ts`:
- Around line 62-65: Update the sound normalization in the notification
configuration parser to accept only "none" or values included in
NOTIFICATION_TONE_IDS, falling back to fallback.sound for unknown strings and
unsupported legacy values such as "chime"; do not rely on the SoundId cast
alone. Add tests covering both an unknown string and an unsupported legacy
sound.

---

Outside diff comments:
In `@src/utils/notificationSettings/soundPlayback.ts`:
- Around line 1-41: Update resolveEventSound and its callers to accept the
notification area and event kind, then resolve the sound from
settings.notificationConfig[area][kind].sound so distinct new, standard, and
mention choices control playback. Trace the surrounding ORISO notification flow
to preserve the original event classification when passing these values, rather
than collapsing events into generic message/mention slots.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f3e64532-37f2-4c36-998f-807a9361ea8e

📥 Commits

Reviewing files that changed from the base of the PR and between b3895df and c841cdd.

⛔ Files ignored due to path filters (15)
  • src/resources/audio/notifications/ton-1.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-10.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-11.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-12.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-2.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-3.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-4.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-5.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-6.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-7.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-8.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/audio/notifications/ton-9.mp3 is excluded by !**/*.mp3 and included by src/**
  • src/resources/img/icons/notification_audio.svg is excluded by !**/*.svg and included by src/**
  • src/resources/img/icons/notification_audio_off.svg is excluded by !**/*.svg and included by src/**
  • src/resources/img/icons/notification_settings.svg is excluded by !**/*.svg and included by src/**
📒 Files selected for processing (13)
  • src/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsx
  • src/components/profile/NotificationSettings/NotificationConfigDialog.test.tsx
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
  • src/components/profile/NotificationSettings/index.tsx
  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
  • src/resources/audio/notifications/CREDITS.md
  • src/resources/i18n/de/common.json
  • src/resources/i18n/de@informal/common.json
  • src/resources/i18n/en/common.json
  • src/utils/notificationSettings/model.ts
  • src/utils/notificationSettings/notificationConfig.test.ts
  • src/utils/notificationSettings/notificationConfig.ts
  • src/utils/notificationSettings/soundPlayback.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: lint, type-check, test, build and Docker validation
  • GitHub Check: lint, type-check, build and Storybook Docker validation
  • GitHub Check: lint, type-check and build frontend
  • GitHub Check: lint, type-check, build and test frontend
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Keep shared behavior in hooks/utilities when multiple screens need the same state, route, selection, or formatting logic.
UI changes must have accessible focus/keyboard behavior and must not rely on color alone.

Files:

  • src/utils/notificationSettings/notificationConfig.test.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.test.tsx
  • src/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsx
  • src/components/profile/NotificationSettings/index.tsx
  • src/utils/notificationSettings/soundPlayback.ts
  • src/utils/notificationSettings/notificationConfig.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
  • src/utils/notificationSettings/model.ts
**/*.{scss,sass,css,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Reuse existing design tokens, Sass mixins, and component patterns; avoid one-off hardcoded CSS for controls, active list states, focus rings, and responsive layout.

Files:

  • src/utils/notificationSettings/notificationConfig.test.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.test.tsx
  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
  • src/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsx
  • src/components/profile/NotificationSettings/index.tsx
  • src/utils/notificationSettings/soundPlayback.ts
  • src/utils/notificationSettings/notificationConfig.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
  • src/utils/notificationSettings/model.ts
src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

src/**/*.{ts,tsx,js,jsx}: Check behavior against the surrounding ORISO flow, not only types.
Flag duplicated route/state logic, missing error/loading handling,
privacy regressions around Matrix/chat/drafts, and changes that should
be expressed through shared hooks or utilities instead of local flags.

Files:

  • src/utils/notificationSettings/notificationConfig.test.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.test.tsx
  • src/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsx
  • src/components/profile/NotificationSettings/index.tsx
  • src/utils/notificationSettings/soundPlayback.ts
  • src/utils/notificationSettings/notificationConfig.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
  • src/utils/notificationSettings/model.ts
src/**/*.scss

⚙️ CodeRabbit configuration file

src/**/*.scss: Prefer existing design tokens, mixins, and shared component states.
Flag hardcoded one-off styling when the same control/state already
exists elsewhere. Active/focus/list-item behavior should stay shared.

Files:

  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
🧠 Learnings (2)
📚 Learning: 2026-07-17T23:33:56.247Z
Learnt from: Storypapst
Repo: OpenResilienceInitiative/ORISO-Frontend PR: 485
File: src/components/conversationCreate/conversationCreate.styles.scss:168-175
Timestamp: 2026-07-17T23:33:56.247Z
Learning: This repo uses Stylelint v15.11.0. For the `value-keyword-case` rule, `currentColor` is considered an accepted keyword under this configuration. During code review, do not flag `currentColor` based on newer Stylelint (e.g., v17) behavior; only flag violations according to the repo’s Stylelint 15.11.0 setup.

Applied to files:

  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
📚 Learning: 2026-07-18T03:56:46.133Z
Learnt from: kiodreambau
Repo: OpenResilienceInitiative/ORISO-Frontend PR: 516
File: src/components/groupChat/waitingClock/WaitingAreaCountdown.stories.tsx:0-0
Timestamp: 2026-07-18T03:56:46.133Z
Learning: When reviewing Storybook stories (e.g., `*.stories.tsx`), treat story-specific styling done via isolated inline decorators/fixtures as Storybook simulation, not as production design tokens or focus-style behavior. Do not flag the story’s styles as production focus/regression issues unless the change involves the actual production components (not the story wrapper/fixture).

Applied to files:

  • src/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsx
🔇 Additional comments (3)
src/utils/notificationSettings/soundPlayback.ts (1)

8-19: LGTM!

Also applies to: 48-77

src/components/profile/NotificationSettings/NotificationConfigDialog.test.tsx (1)

47-116: LGTM!

src/resources/i18n/de/common.json (1)

2077-2095: LGTM!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
Comment on lines +19 to +138
&__tabs {
display: flex;
gap: 24px;
border-bottom: 1px solid #e5e7eb;
margin-bottom: 16px;
}

&__tab {
background: none;
border: none;
padding: 8px 2px;
font-size: 15px;
color: #6b7280;
cursor: pointer;
border-bottom: 2px solid transparent;

&--active {
color: var(--m3-primary, #a5000a);
border-bottom-color: var(--m3-primary, #a5000a);
font-weight: 600;
}

&--disabled {
opacity: 0.4;
cursor: not-allowed;
}
}

&__rows {
display: flex;
flex-direction: column;
gap: 20px;
}

&__row {
display: flex;
flex-direction: column;
gap: 8px;
}

&__label {
font-size: 12px;
color: #6b7280;
padding-left: 4px;
}

&__selectWrap {
position: relative;
display: flex;
align-items: center;
border: 1px solid #cfd4da;
border-radius: 8px;
padding: 0 12px;
height: 48px;
}

&__selectIcon {
display: inline-flex;
color: #4c555f;
margin-right: 8px;

svg {
width: 20px;
height: 20px;
}
}

&__select {
flex: 1;
border: none;
background: transparent;
font-size: 15px;
height: 100%;
outline: none;
color: #1a1a1a;
}

&__email {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 14px;
color: #1a1a1a;
cursor: pointer;

input {
width: 18px;
height: 18px;
accent-color: var(--m3-primary, #a5000a);
}
}

&__footer {
display: flex;
gap: 12px;
margin-top: 24px;
align-items: center;
}

&__cancel {
width: 48px;
height: 44px;
border-radius: 8px;
border: none;
background: #cfd4da;
color: #fff;
font-size: 16px;
cursor: pointer;
}

&__confirm {
flex: 1;
height: 44px;
border-radius: 8px;
border: none;
background: var(--m3-secondary, #4c555f);
color: #fff;
font-size: 15px;
cursor: pointer;
}

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Reuse the existing control and state styling primitives.

This adds bespoke tab, select, checkbox, and action-button treatments with hard-coded colors, borders, spacing, and active-state styling. Replace these with the repository’s tokens, mixins, and shared control/focus states rather than maintaining a parallel component style system.

As per coding guidelines, “Reuse existing design tokens, Sass mixins, and component patterns; avoid one-off hardcoded CSS for controls, active list states, focus rings, and responsive layout.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss`
around lines 19 - 138, Update the styles under the notification dialog
selectors, especially __tab, __selectWrap, __select, __email, __cancel, and
__confirm, to reuse the repository’s existing design tokens, Sass mixins, shared
control styles, and focus/active-state patterns. Remove bespoke hard-coded
colors, borders, spacing, and control treatments while preserving the current
layout and tab, selection, checkbox, and action-button behavior.

Sources: Coding guidelines, Path instructions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
Comment on lines +134 to +158
<div className="notifConfig__tabs" role="tablist">
{NOTIFICATION_AREAS.map((area) => {
const disabled = DISABLED_AREAS.includes(area);
return (
<button
key={area}
type="button"
role="tab"
aria-selected={area === activeArea}
disabled={disabled}
className={
'notifConfig__tab' +
(area === activeArea
? ' notifConfig__tab--active'
: '') +
(disabled ? ' notifConfig__tab--disabled' : '')
}
onClick={() => !disabled && onAreaChange(area)}
data-cy={`notif-tab-${area}`}
>
{t(`profile.notifications.config.area.${area}`)}
</button>
);
})}
</div>

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Complete the dialog’s keyboard interaction and focus treatment. The new controls do not provide a complete accessible interaction state: tabs lack the expected keyboard/tab-panel behavior, while the selector removes visible focus.

  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx#L134-L158: use the shared tabs pattern or add roving keyboard navigation plus aria-controls and a tabpanel.
  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss#L86-L94: restore a visible :focus-visible or wrapper :focus-within indicator.

As per coding guidelines, “UI changes must have accessible focus/keyboard behavior and must not rely on color alone.”

📍 Affects 2 files
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx#L134-L158 (this comment)
  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss#L86-L94
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/profile/NotificationSettings/NotificationConfigDialog.tsx`
around lines 134 - 158, Complete the accessible tab interaction in
NotificationConfigDialog.tsx by adding keyboard navigation, tab-to-panel linkage
with aria-controls, and a corresponding tabpanel while preserving disabled-area
behavior; update notificationConfigDialog.styles.scss to restore a visible
:focus-visible or :focus-within indicator. Apply these changes at
src/components/profile/NotificationSettings/NotificationConfigDialog.tsx lines
134-158 and
src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
lines 86-94.

Source: Coding guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/resources/audio/notifications/CREDITS.md
Comment on lines +7 to +13
- **Source:** react-sounds — https://github.com/e3ntity/react-sounds (mirror:
https://github.com/aediliclabs/react-sounds), catalogue: https://www.reactsounds.com/sounds
- **License:** MIT © Lukas Schneider. Full text: https://github.com/e3ntity/react-sounds/blob/master/LICENSE
- **Retrieved with:** `npx react-sounds-cli pick <name> --output=…` (offline/self-host mode)

MIT permits use and redistribution provided this copyright + licence notice is
kept — which this file satisfies.

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Vendor the complete MIT notice with the assets.

A link and paraphrase are not the required permission notice. The cited MIT license requires the copyright and permission notice in copies or substantial portions; add its complete text (for example in LICENSES/react-sounds-MIT.txt) and reference it here. (github.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/resources/audio/notifications/CREDITS.md` around lines 7 - 13, Replace
the paraphrased MIT notice in CREDITS.md with the complete MIT license text,
preserving the copyright holder attribution for react-sounds. Add the text in a
dedicated license file such as LICENSES/react-sounds-MIT.txt and update
CREDITS.md to reference that file.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/resources/i18n/en/common.json
Comment on lines +2039 to +2056
"config": {
"title": "Configure your notifications",
"intro": "Choose your notification sounds for each area seperately.",
"emailNote": "Emails are sent only if you do not respond within five minutes after the event.",
"noSound": "No Sound Selected",
"tone": "Sound #{{number}}",
"sendByEmail": "Send by Email",
"confirm": "Confirm",
"cancel": "Cancel",
"area": {
"requests": "Anfrage",
"conversations": "Gespräch",
"appointments": "Termine"
},
"kind": {
"new": "New Request",
"standard": "Standard Notification",
"mention": "@ Mentioning"

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Correct the English configuration copy.

“seperately” is misspelled, and the English locale exposes German area labels (Anfrage, Gespräch, Termine). Use “separately”, “Requests”, “Conversations”, and “Appointments”; also change “@ Mentioning” to the natural “Mention”.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/resources/i18n/en/common.json` around lines 2039 - 2056, Update the
notification config translations under config: correct “seperately” to
“separately”, replace the German area labels with “Requests”, “Conversations”,
and “Appointments”, and change the kind.mention label to “Mention”.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/utils/notificationSettings/model.ts
Comment on lines +70 to +87
export const SOUND_IDS: ReadonlyArray<SoundId> = [
'none',
'default',
'chime',
'ding',
'soft',
'ton-1',
'ton-2',
'ton-3',
'ton-4',
'ton-5',
'ton-6',
'ton-7',
'ton-8',
'ton-9',
'ton-10',
'ton-11',
'ton-12'

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add labels for the newly selectable tones.

SoundSettingsDialog iterates SOUND_IDS and resolves profile.notifications.sounds.choice.${id}. ton-1 through ton-12 are absent from the supplied locale bundles, so that dialog renders untranslated key paths for every new tone. Add those entries in all locales, or render these IDs through the existing numbered-tone translation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/notificationSettings/model.ts` around lines 70 - 87, Add
translations for ton-1 through ton-12 used by SOUND_IDS so SoundSettingsDialog
resolves visible labels in every locale; alternatively, route these IDs through
the existing numbered-tone translation mechanism. Preserve the current
translation lookup for other sound IDs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/utils/notificationSettings/notificationConfig.ts
Comment on lines +62 to +65
sound:
typeof kindSrc.sound === 'string'
? (kindSrc.sound as SoundId)
: fallback.sound,

@coderabbitai coderabbitai Bot Jul 21, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Validate persisted config sounds against the dialog allowlist.

Any string is accepted as SoundId, including invalid IDs and supported-but-unselectable values such as chime. This leaves the controlled <select> with no matching option and prevents users from correcting the stored value. Accept only none plus NOTIFICATION_TONE_IDS; otherwise fall back to fallback.sound. Add a test for an unknown string and an unsupported legacy sound.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/notificationSettings/notificationConfig.ts` around lines 62 - 65,
Update the sound normalization in the notification configuration parser to
accept only "none" or values included in NOTIFICATION_TONE_IDS, falling back to
fallback.sound for unknown strings and unsupported legacy values such as
"chime"; do not rely on the SoundId cast alone. Add tests covering both an
unknown string and an unsupported legacy sound.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Storypapst and others added 4 commits July 21, 2026 21:47
@Storypapst @claude
fix(notifications): per-row play button + volume arrows in the config…
2704e19
… dialog (#576)

Addresses Frank's review of the Figma dialog:
- Play button: when a tone is selected the left icon becomes a red play
  button that previews the tone (you could not hear it before); the
  crossed-out muted icon now shows ONLY when "No Sound" is chosen.
- Volume up/down arrows (the react-sounds volume, per kind): added to the
  left of each row; KindConfig gains volume (0..1, step 0.25, default 0.5),
  parsed/clamped; the play button and event playback use it.

TDD: model volume (clamp + immutable set), view (muted-vs-play swap, preview
at volume, arrows change volume). Full suite 1245 green; Storybook desktop
verified (Ton #5 shows the play button, empty rows keep the muted icon).

Refs #576

Co-Authored-By: Claude Fable 5 <[email protected]>
@Storypapst @claude
fix(notifications): plain play button that actually plays, hero icon,…
6b2787b
… storybook end-to-end (#576)

- story now renders the full NotificationConfigDialog (chrome + hero icon)
  with real audio preview, not the body view with a no-op onPreview — this
  is why no sound played and the top icon was missing in Storybook
- replace the bell+triangle with a plain large play-circle button; keep the
  crossed-out muted icon when no tone is chosen
- size raw-SVG hero icons in OrisoDialog (fixed width/height ignored fontSize)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@Storypapst @claude
fix(notifications): single footer + in-field play/mute icon per Figma (…
0b372d1
…#576)

- OrisoDialog gains hideActions so callers can supply their own action row;
  the dialog was rendering BOTH its own footer and OrisoDialog's built-in
  back/confirm footer (duplicate Bestätigen, stray Zurück/Verstanden)
- move the play/mute icon back INSIDE the select field (left), matching the
  Figma; plain play-circle when a tone is chosen, muted icon otherwise

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@shanzaeimran @claude
fix(notifications): announce the newest event slot, not the first unread
0e8ddaa
maybePlaySoundForNewEvent picked the event to sound with
feed.find(!readAt) (first unread) and compared its id to the marker. When
the current first-unread was read while older unread items remained, the
next poll surfaced an older backlog event as newest, its id differed
from the marker, and it played a spurious sound — reading your inbox
top-down pinged a sound for every unread beneath.

Extract the trigger into a pure selectEventToAnnounce(feed, marker) that
keys on the newest slot (feed[0]) by identity: only a genuinely newer
event announces, read-state churn below the top stays silent, and a
new-but-already-read top event advances the marker without a sound. Unit
tests cover the seed, new-unread, unchanged, and the two backlog cases
(the previously untested trigger logic).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
coderabbitai[bot]
coderabbitai Bot reviewed Jul 22, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
src/utils/notificationSettings/soundPlayback.ts (2)

145-174: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Shared throttle silences the call sound if a message/mention sound just played.

throttle is a single module-level instance (2000ms gap) applied uniformly by playNotificationSound to every family, including calls. Since assetForEvent forces the incoming-call asset regardless of mute, the intent is clearly for calls to always ring — but the shared rate limiter can still swallow the call sound if a message notification played moments earlier. Missing the audible cue for an incoming call is a more severe outcome than a missed message chime.

Exempt calls from the shared throttle (or use a per-family throttle) so an incoming call is never silenced by unrelated recent notification sounds.

🔧 Proposed fix
-	if (!throttle(now)) {
+	if (family !== 'calls' && !throttle(now)) {
 		return;
 	}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/notificationSettings/soundPlayback.ts` around lines 145 - 174,
Update playNotificationSound so the calls family is not blocked by the
module-level throttle after unrelated message or mention sounds; apply throttle
only to non-call families while preserving the existing suppression, asset,
audio, and playback flow.

148-174: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Thread the per-kind volume into playback. KindConfig.volume is already persisted and used for preview, but playNotificationSound still hardcodes DEFAULT_VOLUME, so real notification sounds ignore the user’s setting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/notificationSettings/soundPlayback.ts` around lines 148 - 174,
Update playNotificationSound to retrieve the configured per-kind volume for the
selected event family and apply it to the Audio instance instead of always using
DEFAULT_VOLUME. Reuse the existing KindConfig volume source and preserve the
current suppression, asset, throttling, and playback behavior.
src/components/profile/NotificationSettings/NotificationConfigDialog.tsx (1)

287-294: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Duplicates the Audio playback/volume-clamp logic already in soundPlayback.ts.

handlePreview reimplements new Audio(asset) + volume clamping + play().catch(() => undefined) locally instead of reusing a shared helper. As per path instructions, changes like this should be expressed through shared hooks/utilities rather than re-implemented per screen.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/profile/NotificationSettings/NotificationConfigDialog.tsx`
around lines 287 - 294, Update handlePreview to reuse the existing shared audio
playback/volume-clamping helper from soundPlayback.ts instead of constructing
and playing Audio locally. Preserve the soundAssetFor lookup and
browser-availability guard, and pass the resolved asset and volume through the
shared utility.

Source: Path instructions

src/components/modal/OrisoDialog.tsx (1)

106-113: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Shared OrisoDialog icon sizing affects all current consumers. LegalLinkModal, SoundSettingsDialog, and NotificationConfigDialog all pass MUI icons here, so the 64px cap changes every dialog. If this smaller size is only intended for one screen, make the icon size configurable instead of hardcoding it in OrisoDialog.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/modal/OrisoDialog.tsx` around lines 106 - 113, Make the hero
icon sizing in OrisoDialog configurable rather than applying the hardcoded 64px
height and 88px maxWidth to every consumer. Add a prop or equivalent option for
the intended screen, use it in OrisoDialog’s '& svg' styling, and preserve
existing sizing for LegalLinkModal, SoundSettingsDialog, and
NotificationConfigDialog unless they explicitly opt into the smaller dimensions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/components/modal/OrisoDialog.tsx`:
- Around line 106-113: Make the hero icon sizing in OrisoDialog configurable
rather than applying the hardcoded 64px height and 88px maxWidth to every
consumer. Add a prop or equivalent option for the intended screen, use it in
OrisoDialog’s '& svg' styling, and preserve existing sizing for LegalLinkModal,
SoundSettingsDialog, and NotificationConfigDialog unless they explicitly opt
into the smaller dimensions.

In `@src/components/profile/NotificationSettings/NotificationConfigDialog.tsx`:
- Around line 287-294: Update handlePreview to reuse the existing shared audio
playback/volume-clamping helper from soundPlayback.ts instead of constructing
and playing Audio locally. Preserve the soundAssetFor lookup and
browser-availability guard, and pass the resolved asset and volume through the
shared utility.

In `@src/utils/notificationSettings/soundPlayback.ts`:
- Around line 145-174: Update playNotificationSound so the calls family is not
blocked by the module-level throttle after unrelated message or mention sounds;
apply throttle only to non-call families while preserving the existing
suppression, asset, audio, and playback flow.
- Around line 148-174: Update playNotificationSound to retrieve the configured
per-kind volume for the selected event family and apply it to the Audio instance
instead of always using DEFAULT_VOLUME. Reuse the existing KindConfig volume
source and preserve the current suppression, asset, throttling, and playback
behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b4be5428-3780-4e84-83ce-5488fd95723a

📥 Commits

Reviewing files that changed from the base of the PR and between 6b2787b and 0e8ddaa.

📒 Files selected for processing (6)
  • src/components/modal/OrisoDialog.tsx
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
  • src/globalState/provider/NotificationsProvider.tsx
  • src/utils/notificationSettings/soundPlayback.test.ts
  • src/utils/notificationSettings/soundPlayback.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: lint, type-check, build and Storybook Docker validation
  • GitHub Check: lint, type-check, test, build and Docker validation
  • GitHub Check: lint, type-check, build and test frontend
  • GitHub Check: lint, type-check and build frontend
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{scss,sass,css,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Reuse existing design tokens, Sass mixins, and component patterns; avoid one-off hardcoded CSS for controls, active list states, focus rings, and responsive layout.

Files:

  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
  • src/utils/notificationSettings/soundPlayback.test.ts
  • src/components/modal/OrisoDialog.tsx
  • src/globalState/provider/NotificationsProvider.tsx
  • src/utils/notificationSettings/soundPlayback.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
src/**/*.scss

⚙️ CodeRabbit configuration file

src/**/*.scss: Prefer existing design tokens, mixins, and shared component states.
Flag hardcoded one-off styling when the same control/state already
exists elsewhere. Active/focus/list-item behavior should stay shared.

Files:

  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Keep shared behavior in hooks/utilities when multiple screens need the same state, route, selection, or formatting logic.
UI changes must have accessible focus/keyboard behavior and must not rely on color alone.

Files:

  • src/utils/notificationSettings/soundPlayback.test.ts
  • src/components/modal/OrisoDialog.tsx
  • src/globalState/provider/NotificationsProvider.tsx
  • src/utils/notificationSettings/soundPlayback.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

src/**/*.{ts,tsx,js,jsx}: Check behavior against the surrounding ORISO flow, not only types.
Flag duplicated route/state logic, missing error/loading handling,
privacy regressions around Matrix/chat/drafts, and changes that should
be expressed through shared hooks or utilities instead of local flags.

Files:

  • src/utils/notificationSettings/soundPlayback.test.ts
  • src/components/modal/OrisoDialog.tsx
  • src/globalState/provider/NotificationsProvider.tsx
  • src/utils/notificationSettings/soundPlayback.ts
  • src/components/profile/NotificationSettings/NotificationConfigDialog.tsx
🧠 Learnings (1)
📚 Learning: 2026-07-17T23:33:56.247Z
Learnt from: Storypapst
Repo: OpenResilienceInitiative/ORISO-Frontend PR: 485
File: src/components/conversationCreate/conversationCreate.styles.scss:168-175
Timestamp: 2026-07-17T23:33:56.247Z
Learning: This repo uses Stylelint v15.11.0. For the `value-keyword-case` rule, `currentColor` is considered an accepted keyword under this configuration. During code review, do not flag `currentColor` based on newer Stylelint (e.g., v17) behavior; only flag violations according to the repo’s Stylelint 15.11.0 setup.

Applied to files:

  • src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss
🔇 Additional comments (7)
src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss (1)

99-134: More one-off hardcoded styling added to the already-flagged control set.

The new play/mute icon styles add another hardcoded hex (#9aa1a9) and repeat the var(--m3-primary, #a5000a) fallback pattern rather than reusing a shared token/mixin — the same issue already raised for this file's controls. As per coding guidelines, "Reuse existing design tokens, Sass mixins, and component patterns; avoid one-off hardcoded CSS for controls, active list states, focus rings."

Source: Coding guidelines

src/utils/notificationSettings/soundPlayback.ts (2)

1-89: LGTM!


91-128: Marker-on-feed[0] fix resolves the earlier spurious-sound bug.

selectEventToAnnounce correctly keys off the newest slot (feed[0]) instead of the first unread item, with seeding-on-first-load and read-state handling — this addresses the previously flagged critical issue where reading the newest item would re-announce an older unread backlog item.

src/utils/notificationSettings/soundPlayback.test.ts (1)

1-123: LGTM!

src/globalState/provider/NotificationsProvider.tsx (1)

8-8: LGTM!

Also applies to: 26-31, 135-160, 198-206

src/components/profile/NotificationSettings/NotificationConfigDialog.tsx (1)

100-121: LGTM!

Also applies to: 304-304

src/components/modal/OrisoDialog.tsx (1)

18-22: LGTM!

Also applies to: 35-36, 159-208

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shanzaeimran

shanzaeimran commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Fixed the spurious-sound bug (0e8ddaa)

The sound trigger keyed on feed.find(!readAt) (first unread). The problem: when you read the top notification while older unread ones remain, the next poll surfaces one of those older backlog events as the "newest unread" — its id differs from the marker, so it plays a sound for a message that was already sitting in your feed. Reading your inbox top-down would ping a sound for each unread beneath.

Fix: extracted the decision into a pure selectEventToAnnounce(feed, marker) that keys on the newest slot (feed[0]) by identity, not the first unread. Now only a genuinely newer event announces; read-state churn below the top stays silent; a new-but-already-read top event advances the marker without sounding. Added unit tests for the trigger (which was previously untested), including the backlog-read regression.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

shanzaeimran
shanzaeimran approved these changes Jul 22, 2026
View reviewed changes
@shanzaeimran
shanzaeimran merged commit 55d42ce into pre-dev Jul 22, 2026
5 of 6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@shanzaeimran
shanzaeimran deleted the feat/notification-sounds branch July 22, 2026 05:37
@Storypapst Storypapst mentioned this pull request Jul 22, 2026
feat(notifications): config-driven playback, Safari hardening, arrow icons, panel spacing #586
Merged
This was referenced Jul 22, 2026
Profile section: interface display filters for the notification feed (custom "Alle" filterset) #592
Open
Display filters: settings model + profile section UI #593
Closed
feat(notifications): global Do-Not-Disturb control + announcement suppression #571
Merged
fix(notifications): call-ring reliability, banner routing, remove dead sound model #776
Merged
EPIC: Notification announcements — one path, complete coverage #778
Open
Consolidate banner + sound into one announcement path #779
Open
This was referenced Jul 31, 2026
EPIC: transactional e-mails — one design system across every sending path #828
Open
Replace key-backup recovery banner with the standard dialog component #843
Closed
This was referenced Aug 1, 2026
Timeline: fix Next-notification queue + read marking, add missing i18n keys and detail-pane timestamps #845
Closed
ADR: notification matrix — which occasion goes to which channel, and who may switch it off #860
Closed
Storybook: case-handover and feedback mails #864
Closed
Profile: notification settings for the full event list, split advice seeker vs counsellor #871
Closed
Feature request: appointment mail — the toggle is already shipped, nothing sends it #874
Closed
Profile settings: introduce 'Sicherheit & Datenschutz' section with grouped security, recovery and privacy options #878
Closed
One occasion, one catalogue, three channels: e-mail, in-app and browser push from one source #947
Closed
Replace the voice-note player and show an insertion marker in the composer #996
Closed
@coderabbitai coderabbitai Bot mentioned this pull request Aug 13, 2026
feat(emails): transactional e-mail design system, anchored in Storybook #881
Merged
12 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Oct 19, 2026
feat(erstantwort): explain blocked browser notifications, show active channels, house e-mail dialog #1729
Merged
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] requested changes
@shanzaeimran shanzaeimran shanzaeimran approved these changes
@shazia-k shazia-k Awaiting requested review from shazia-k
@Kadyan25 Kadyan25 Awaiting requested review from Kadyan25

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Storypapst Storypapst

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Storypapst @shanzaeimran
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.