mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#8716
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8640
Author: @SpicyMarinara
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/music-stale-play-error-8618📝 Commits (1)
3a9a07bfix(music): an interrupted play() no longer shows as a playback failure📊 Changes
4 files changed (+100 additions, -5 deletions)
View changed files
📝
packages/client/src/components/chat/LocalMusicPlayer.tsx(+18 -5)➕
packages/client/src/lib/local-music-playback.ts(+13 -0)➕
scripts/regressions/local-music-playback-errors.regression.ts(+68 -0)📝
scripts/regressions/tsconfig.client-lanes.json(+1 -0)📄 Description
Closes #8618
Why this change
With the custom Music DJ source, the top-bar player could show "The play() request was interrupted by a c…" as its title and "Playback needs attention" as its subtitle while music was audibly playing and the pause control was showing. A transient, deliberate interruption looked like a current failure.
The reporter's diagnosis is right, and the exact sequence is: a resume through
togglePlay()is still pending when the DJ picks the next track. Selecting it callsaudio.pause()andaudio.load(), so the browser rejects the pendingplay()with anAbortError.togglePlay's.catchset that as the error unconditionally — after the selection had already cleared the error — and nothing cleared it again once the new track started.What changed
playbackErrorMessage(err, attempt, current)(lib/local-music-playback.ts) decides what a rejectedplay()shows. AnAbortError(play cut short by a deliberatepause()/load()), or any rejection from an attempt a newer track superseded, shows nothing. Genuine failures — unsupported or missing file, autoplay blocked by the browser — still show the browser's own message.play()paths (the track loader and the resume button) go through it. The resume button now records which source it resumed, so its outcome never overwrites a newer track's state, including marking it as playing.<audio>element'splayingevent clears any stale error, on both the desktop and the mobile player: if the element is playing, no earlier failure is current.Validation
scripts/regressions/local-music-playback-errors.regression.ts(client lane):AbortErroras anErrorand as aDOMExceptionshows nothing; a superseded attempt shows nothing even for a real failure;NotAllowedError,NotSupportedError, and non-Errorrejections still show; bothplay()paths classify their rejections; both players clear onplaying. Passes; on the player before this change it fails (neither path classified its rejection).tsc --noEmitfor the client and for the client regression lane pass; Prettier clean.Test plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.