GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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
|
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
📝 WalkthroughWalkthroughReplaces 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. ChangesNotification sound model and playback
Notification settings UI
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
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
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.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: e004e8da-044f-4142-9b4e-cca10c73adda
src/components/notificationsCenter/eventDescriptors/types.tssrc/components/notificationsCenter/notificationActionTarget.tssrc/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsxsrc/components/profile/NotificationSettings/SoundSettingsDialog.test.tsxsrc/components/profile/NotificationSettings/SoundSettingsDialog.tsxsrc/components/profile/NotificationSettings/index.tsxsrc/globalState/provider/NotificationsProvider.tsxsrc/resources/i18n/de/common.jsonsrc/resources/i18n/de@informal/common.jsonsrc/resources/i18n/en/common.jsonsrc/utils/notificationHelpers.tssrc/utils/notificationSettings/model.tssrc/utils/notificationSettings/notificationSettings.test.tssrc/utils/notificationSettings/soundPlayback.test.tssrc/utils/notificationSettings/soundPlayback.ts📄 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.tsxsrc/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsxsrc/components/notificationsCenter/eventDescriptors/types.tssrc/components/profile/NotificationSettings/index.tsxsrc/components/notificationsCenter/notificationActionTarget.tssrc/utils/notificationSettings/soundPlayback.test.tssrc/utils/notificationSettings/soundPlayback.tssrc/components/profile/NotificationSettings/SoundSettingsDialog.tsxsrc/globalState/provider/NotificationsProvider.tsxsrc/utils/notificationSettings/notificationSettings.test.tssrc/utils/notificationSettings/model.tssrc/utils/notificationHelpers.ts📄 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.tsxsrc/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsxsrc/components/notificationsCenter/eventDescriptors/types.tssrc/components/profile/NotificationSettings/index.tsxsrc/components/notificationsCenter/notificationActionTarget.tssrc/utils/notificationSettings/soundPlayback.test.tssrc/utils/notificationSettings/soundPlayback.tssrc/components/profile/NotificationSettings/SoundSettingsDialog.tsxsrc/globalState/provider/NotificationsProvider.tsxsrc/utils/notificationSettings/notificationSettings.test.tssrc/utils/notificationSettings/model.tssrc/utils/notificationHelpers.ts⚙️ 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.tsxsrc/components/profile/NotificationSettings/SoundSettingsDialog.stories.tsxsrc/components/notificationsCenter/eventDescriptors/types.tssrc/components/profile/NotificationSettings/index.tsxsrc/components/notificationsCenter/notificationActionTarget.tssrc/utils/notificationSettings/soundPlayback.test.tssrc/utils/notificationSettings/soundPlayback.tssrc/components/profile/NotificationSettings/SoundSettingsDialog.tsxsrc/globalState/provider/NotificationsProvider.tsxsrc/utils/notificationSettings/notificationSettings.test.tssrc/utils/notificationSettings/model.tssrc/utils/notificationHelpers.tsLearnt 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[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)
[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)
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.
There was an error while loading. Please reload this page.
| const asset = soundAssetFor(soundId); | ||
| if (asset && 'Audio' in window) { | ||
| const audio = new Audio(asset); | ||
| audio.volume = 0.5; |
There was a problem 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.
- audio.volume = 0.5; + audio.volume = DEFAULT_VOLUME;
‼️ 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.
| audio.volume = 0.5; | |
| audio.volume = DEFAULT_VOLUME; |
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.
There was an error while loading. Please reload this page.
| import { messageEventEmitter } from '../../services/messageEventEmitter'; | ||
| import { playNotificationSound } from '../../utils/notificationSettings/soundPlayback'; | ||
| import { notificationSettingsStore } from '../../utils/notificationSettings/store'; | ||
| import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors'; |
There was a problem 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.
-import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors'; +import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors/registry';
‼️ 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.
| import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors'; | |
| import { getEventDescriptor } from '../../components/notificationsCenter/eventDescriptors/registry'; |
[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)
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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| "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" | ||
| } |
There was a problem 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.
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.
There was an error while loading. Please reload this page.
…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]>
|
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 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 TDD: model (6) + view render (6). Full suite 1240 green, tsc/eslint/stylelint/m3Sweep clean. Storybook desktop + mobile verified against the mockups. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
src/utils/notificationSettings/soundPlayback.ts (1)
1-41: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftMake playback consume
notificationConfig.The current inputs only distinguish
familyandisMention, while the dialog persists separatenew,standard, andmentionsounds per area. Consequently, distinctnew/standardchoices cannot affect playback; the helper still resolves generic message/mention slots. Carry notification kind (or the original event classification) into playback and resolvesettings.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
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.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: f3e64532-37f2-4c36-998f-807a9361ea8e
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/**src/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsxsrc/components/profile/NotificationSettings/NotificationConfigDialog.test.tsxsrc/components/profile/NotificationSettings/NotificationConfigDialog.tsxsrc/components/profile/NotificationSettings/index.tsxsrc/components/profile/NotificationSettings/notificationConfigDialog.styles.scsssrc/resources/audio/notifications/CREDITS.mdsrc/resources/i18n/de/common.jsonsrc/resources/i18n/de@informal/common.jsonsrc/resources/i18n/en/common.jsonsrc/utils/notificationSettings/model.tssrc/utils/notificationSettings/notificationConfig.test.tssrc/utils/notificationSettings/notificationConfig.tssrc/utils/notificationSettings/soundPlayback.ts📄 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.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.test.tsxsrc/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsxsrc/components/profile/NotificationSettings/index.tsxsrc/utils/notificationSettings/soundPlayback.tssrc/utils/notificationSettings/notificationConfig.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.tsxsrc/utils/notificationSettings/model.ts📄 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.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.test.tsxsrc/components/profile/NotificationSettings/notificationConfigDialog.styles.scsssrc/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsxsrc/components/profile/NotificationSettings/index.tsxsrc/utils/notificationSettings/soundPlayback.tssrc/utils/notificationSettings/notificationConfig.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.tsxsrc/utils/notificationSettings/model.ts⚙️ 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.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.test.tsxsrc/components/profile/NotificationSettings/NotificationConfigDialog.stories.tsxsrc/components/profile/NotificationSettings/index.tsxsrc/utils/notificationSettings/soundPlayback.tssrc/utils/notificationSettings/notificationConfig.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.tsxsrc/utils/notificationSettings/model.ts⚙️ 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.scssLearnt 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.scssLearnt 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.tsxsrc/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.
There was an error while loading. Please reload this page.
| &__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; | ||
| } |
There was a problem 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.”
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.
There was an error while loading. Please reload this page.
| <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> |
There was a problem 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.”
src/components/profile/NotificationSettings/NotificationConfigDialog.tsx#L134-L158 (this comment)src/components/profile/NotificationSettings/notificationConfigDialog.styles.scss#L86-L94Verify 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.
There was an error while loading. Please reload this page.
| - **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. |
There was a problem 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)
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.
There was an error while loading. Please reload this page.
| "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" |
There was a problem 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”.
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.
There was an error while loading. Please reload this page.
| 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' |
There was a problem 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.
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.
There was an error while loading. Please reload this page.
| sound: | ||
| typeof kindSrc.sound === 'string' | ||
| ? (kindSrc.sound as SoundId) | ||
| : fallback.sound, |
There was a problem 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.
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.
There was an error while loading. Please reload this page.
… 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]>
… 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]>
…#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]>
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]>
There was a problem 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.
src/utils/notificationSettings/soundPlayback.ts (2)
145-174: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winShared throttle silences the call sound if a message/mention sound just played.
throttleis a single module-level instance (2000ms gap) applied uniformly byplayNotificationSoundto every family, includingcalls. SinceassetForEventforces 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
callsfrom 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 winThread the per-kind volume into playback.
KindConfig.volumeis already persisted and used for preview, butplayNotificationSoundstill hardcodesDEFAULT_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 winDuplicates the Audio playback/volume-clamp logic already in
soundPlayback.ts.
handlePreviewreimplementsnew 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 winShared
OrisoDialogicon sizing affects all current consumers.LegalLinkModal,SoundSettingsDialog, andNotificationConfigDialogall 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 inOrisoDialog.🤖 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.
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.
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b4be5428-3780-4e84-83ce-5488fd95723a
src/components/modal/OrisoDialog.tsxsrc/components/profile/NotificationSettings/NotificationConfigDialog.tsxsrc/components/profile/NotificationSettings/notificationConfigDialog.styles.scsssrc/globalState/provider/NotificationsProvider.tsxsrc/utils/notificationSettings/soundPlayback.test.tssrc/utils/notificationSettings/soundPlayback.ts📄 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.scsssrc/utils/notificationSettings/soundPlayback.test.tssrc/components/modal/OrisoDialog.tsxsrc/globalState/provider/NotificationsProvider.tsxsrc/utils/notificationSettings/soundPlayback.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.tsx⚙️ 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📄 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.tssrc/components/modal/OrisoDialog.tsxsrc/globalState/provider/NotificationsProvider.tsxsrc/utils/notificationSettings/soundPlayback.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.tsx⚙️ 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.tssrc/components/modal/OrisoDialog.tsxsrc/globalState/provider/NotificationsProvider.tsxsrc/utils/notificationSettings/soundPlayback.tssrc/components/profile/NotificationSettings/NotificationConfigDialog.tsxLearnt 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.scsssrc/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 thevar(--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.
selectEventToAnnouncecorrectly 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.
There was an error while loading. Please reload this page.
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.