[GH-ISSUE #1808] [Issue]: Refactor notifications miss off-chat generation and roleplay pings #889

Closed
opened 2026-10-21 05:23:00 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1808

Originally assigned to: @cha1latte on GitHub.

Summary

Notification parity from the legacy implementation is incomplete in the refactor branch. Current refactor generation can save a reply after the user switches chats without creating unread state, a floating notification bubble, or the configured ping. The Roleplay notification sound setting is also present in Settings but does not appear to be connected to Roleplay generation completion.

Expected behavior

  • If a Conversation or Roleplay generation finishes after the user has navigated away from that chat, Marinara should increment that chat's unread count, show the avatar notification bubble, and play the relevant notification sound setting.
  • The Roleplay mode notification sound toggle should affect new Roleplay replies.
  • Notification audio should fail quietly and reuse audio resources like the legacy implementation did.

Actual behavior

  • src/features/runtime/generation/hooks/use-generate.ts handles assistant_message events by upserting/refetching and releasing UI, but there is no off-chat incrementUnread, addNotification, or playNotificationPing path in that file.
  • rpNotificationSound is present in src/shared/stores/ui.store.ts and src/features/shell/settings/components/settings/SettingControls.tsx, but searches only found runtime callers for Conversation notification sound under src/features/modes/conversation.
  • src/shared/lib/notification-sound.ts creates a new AudioContext every ping and does not catch audio failures.

Steps to reproduce

  1. Start a Conversation or Roleplay generation.
  2. Navigate to another chat before the generation finishes.
  3. Wait for the generated reply to save.
  4. Check whether unread count, floating avatar bubble, and notification sound appear for the chat.
  5. Toggle Settings > Appearance > Notifications > Roleplay mode and repeat for Roleplay.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor audit at 84f40efd
  • Run mode: not run; static code parity audit
  • OS + version: not relevant
  • Node + pnpm versions: not relevant
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

No runtime logs or screenshots. Static evidence from code comparison:

  • Refactor generation event handling: src/features/runtime/generation/hooks/use-generate.ts
  • Refactor notification shell: src/features/shell/notifications/components/ChatNotificationBubbles.tsx
  • Refactor notification audio helper: src/shared/lib/notification-sound.ts
  • Legacy off-chat notification logic existed in packages/client/src/hooks/use-generate.ts around group-turn and final cleanup paths.
  • Legacy Roleplay surface ping existed in packages/client/src/components/chat/ChatRoleplaySurface.tsx.

Regression notes

This worked in the legacy implementation. The refactor branch appears to have the shell/store/settings surface for notifications, plus improved native/local Conversation notifications, but the generation-runtime notification parity is incomplete.

Additional context

The refactor-only native/local Conversation notifications are useful and should be kept. They do not replace in-app unread counts, avatar bubbles, or Roleplay notification sounds. The legacy notification audio helper also had a safer shape: a reused AudioContext and a try/catch around Web Audio calls.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1808 Originally assigned to: @cha1latte on GitHub. ## Summary Notification parity from the legacy implementation is incomplete in the refactor branch. Current refactor generation can save a reply after the user switches chats without creating unread state, a floating notification bubble, or the configured ping. The Roleplay notification sound setting is also present in Settings but does not appear to be connected to Roleplay generation completion. ## Expected behavior - If a Conversation or Roleplay generation finishes after the user has navigated away from that chat, Marinara should increment that chat's unread count, show the avatar notification bubble, and play the relevant notification sound setting. - The `Roleplay mode` notification sound toggle should affect new Roleplay replies. - Notification audio should fail quietly and reuse audio resources like the legacy implementation did. ## Actual behavior - `src/features/runtime/generation/hooks/use-generate.ts` handles `assistant_message` events by upserting/refetching and releasing UI, but there is no off-chat `incrementUnread`, `addNotification`, or `playNotificationPing` path in that file. - `rpNotificationSound` is present in `src/shared/stores/ui.store.ts` and `src/features/shell/settings/components/settings/SettingControls.tsx`, but searches only found runtime callers for Conversation notification sound under `src/features/modes/conversation`. - `src/shared/lib/notification-sound.ts` creates a new `AudioContext` every ping and does not catch audio failures. ## Steps to reproduce 1. Start a Conversation or Roleplay generation. 2. Navigate to another chat before the generation finishes. 3. Wait for the generated reply to save. 4. Check whether unread count, floating avatar bubble, and notification sound appear for the chat. 5. Toggle Settings > Appearance > Notifications > Roleplay mode and repeat for Roleplay. ## Impact area - [x] App shell, navigation, startup, or providers - [ ] Catalog resources - [x] Chat mode - [x] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [x] Runtime systems: generation, world-state, visuals, tracker, or haptics - [x] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor audit at `84f40efd` - Run mode: not run; static code parity audit - OS + version: not relevant - Node + pnpm versions: not relevant - Rust version, if relevant: not relevant - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video No runtime logs or screenshots. Static evidence from code comparison: - Refactor generation event handling: `src/features/runtime/generation/hooks/use-generate.ts` - Refactor notification shell: `src/features/shell/notifications/components/ChatNotificationBubbles.tsx` - Refactor notification audio helper: `src/shared/lib/notification-sound.ts` - Legacy off-chat notification logic existed in `packages/client/src/hooks/use-generate.ts` around group-turn and final cleanup paths. - Legacy Roleplay surface ping existed in `packages/client/src/components/chat/ChatRoleplaySurface.tsx`. ## Regression notes This worked in the legacy implementation. The refactor branch appears to have the shell/store/settings surface for notifications, plus improved native/local Conversation notifications, but the generation-runtime notification parity is incomplete. ## Additional context The refactor-only native/local Conversation notifications are useful and should be kept. They do not replace in-app unread counts, avatar bubbles, or Roleplay notification sounds. The legacy notification audio helper also had a safer shape: a reused `AudioContext` and a try/catch around Web Audio calls. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:23:00 +07:00
Author
Owner

@cha1latte commented on GitHub (Jun 1, 2026):

fixed in #1841

<!-- gh-comment-id:4595928078 --> @cha1latte commented on GitHub (Jun 1, 2026): fixed in #1841
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#889
No description provided.