mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6080] [Issue]: Roleplay/Conversation completion sound only plays after navigating to another chat #3371
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3371
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Sep 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6080
Summary
In Roleplay and Conversation chats the completion notification sound only plays if you have navigated to a different chat before the reply finishes. If you stay on the chat and look away (another window, another tab), no sound plays, even with the mode's notification sound enabled and "only when unfocused" on. Game mode already pings regardless of which chat is active.
Expected behavior
With the Roleplay (or Conversation) notification sound enabled, a finished reply plays the ping whether or not the chat is still the active one, subject to the existing "only play when unfocused" setting.
Actual behavior
The ping plays only when
currentActive !== params.chatId. The Roleplay/ConversationplayConfiguredNotificationPing(...)call is inside the navigated-away block that also increments the unread count and shows the avatar bubble (packages/client/src/hooks/use-generate.ts, the block ending around line 3262 on staging9bf5baaf0). Game mode's ping sits outside that condition (around line 3208), so Game behaves as expected.Steps to reproduce
Environment
9bf5baaf0(also reproduced on 2.4.3 and 2.4.4)Logs, screenshots, or video
Not needed to reproduce; the condition is visible in the source at the line above.
Additional context
Related: #1808 asked for the navigated-away case and #1841 fixed it; the stay-on-chat case was never covered. I have been running a fix on my fork since 2026-08-13 (one ping site in the success path, gated by the same mode toggles and the unfocused-only setting; Game keeps its single ping via
gameTurnLoadedSoundPlayed). I am taking this one: draft PR follows today.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@ghost commented on GitHub (Sep 12, 2026):
Correction after measuring, before anyone spends time on this.
Staging
9bf5baaf0, built clean beside a build of my branch, same cloned data, a mock OpenAI-compatible provider, Web Audio faked to count synthesized pings, Playwright driving the composer:9bf5baaf0The stay-on-chat ping already exists:
ChatRoleplaySurface.tsx:1897(andConversationView.tsx:1166for Conversation) plays it when a fresh assistant message appears in the active chat, since v2.0.3.use-generate.tspings only for the navigated-away case because that is when no surface is mounted. One ping each way, by design. My reading missed the surface, and #6081 would have added a second ping on top of it.What I actually observe on my install is different and I will file it separately with a precise repro once I have one without my own patch in the way: with post-processing agents on, the surface's ping comes when the agents finish (the message leaves
postProcessingPending), not when the text finishes — and a held rewrite that never lands means no ping at all.Closing this as not a bug as stated. #6081 is closed too.