mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3070] [Issue]: On mobile, the floating music/Spotify/YouTube mini-widget (z-60) covers the slide-in right/tracker/detail panel header tabs because it stacks above them (z-40) #1636
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#1636
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 @kolacheee on GitHub (Jun 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3070
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
On a phone, the floating media mini-widget (local music, Spotify, or YouTube) always paints on top of any slide-in mobile panel you open. The three persistent floating widgets render at
z-[60], while every overlay mobile panel — the right Settings/Tools panel, the tracker data panel, and the detail editor sheet — renders atz-40(their backdrops atz-30). Because the widget's z-index is higher, whenever music or a video is playing the widget floats over whichever panel you open. Its default spot is the top-left corner (x:16, y:96), and the panels start ~48px from the top, so the widget lands inside the panel's header/tab strip and covers those controls. Taps in that region hit the widget instead of the panel. It is draggable, so you can shove it aside — that's why this is degraded-but-recoverable rather than a hard block. (Note: the same overlap also hits the mobile sidebar drawer, which isz-40too.)How to reproduce (try it yourself)
You'll see: the media widget sitting on top of the panel header, covering the tab buttons or header controls underneath it; taps in that area hit the widget, not the panel.
Expected: the panel you deliberately opened should sit above an ambient floating widget — or the widget should drop below the panel / hide while a full-screen mobile panel is open.
Where it is
The three mobile floating widgets all use
z-[60]on theirmd:hiddenmobile branch:packages/client/src/components/chat/LocalMusicPlayer.tsx:378—className="fixed z-[60] touch-none select-none md:hidden"packages/client/src/components/spotify/SpotifyMiniPlayer.tsx:1031—cn("fixed z-[60] touch-none select-none", mobile && "md:hidden")packages/client/src/components/chat/YouTubePlayer.tsx:543—className="fixed z-[60] touch-none select-none md:hidden"Default position
{ x: 16, y: 96 }and collapsed-by-default come frompackages/client/src/stores/ui.store.ts:1206(spotifyMobileWidgetPosition: { x: 16, y: 96 }) andui.store.ts:1205(spotifyMobileWidgetCollapsed: true).The panels render LOWER, all at
z-40:packages/client/src/components/layout/AppShell.tsx:903— mobile tracker panelmari-tracker-panel !fixed bottom-0 z-40 ...AppShell.tsx:938— mobile right panelmari-right-panel !fixed bottom-0 right-0 z-40 !w-full ...AppShell.tsx:986— mobile detail sheetmari-mobile-detail-sheet !fixed bottom-0 right-0 z-40 ... !w-full ...AppShell.tsx:804— the mobile sidebar drawer is ALSOz-40(same overlap surface, not in the original report)All four are positioned with
MOBILE_SHELL_PANEL_TOP_CLASS = "top-[calc(env(safe-area-inset-top)_+_3rem)]"(AppShell.tsx:97), i.e. ~48px + inset from the top. Their backdrops arez-30(AppShell.tsx:920and:885).The floating widgets are mounted globally at
packages/client/src/components/layout/AppShell.tsx:1017-1019(<SpotifyMobileWidget /> <YouTubeMobileWidget /> <LocalMusicMobileWidget />), so they persist regardless of which panel is open. (For the record: these are NOT mounted from TopBar — TopBar mounts the separate desktop in-bar pill players.)The desktop in-bar players are a separate, non-floating render path (
LocalMusicPlayer.tsx:439,SpotifyMiniPlayer.tsx:1087,YouTubePlayer.tsx:605) and have no z-index dependency.What's happening
The media widget and the panels are both
position: fixeddirect children of the AppShell root, which isfixed inset-0 flex overflow-hiddenwith notransform/isolate/z-indexof its own (AppShell.tsx:766-772). That means there is no separate stacking context — the widget and the panels are pure z-index siblings, and stacking is decided purely by z-index.z-60 > z-40, so the widget always wins and paints over the panel body. Framer Motion's transform on the panel'smotion.asideonly isolates the panel's own subtree, not the sibling widget. And because the widget's collapsed default coordinate (y:96) falls ~48px below the panel's top edge, inside the full-width panel's header region, the overlap is guaranteed, not incidental.Suggested fix
Lower the three mobile floating widgets below the shell-panel layer by changing their
z-[60]toz-[35](between thez-30backdrop and thez-40panels):LocalMusicPlayer.tsx:378→fixed z-[35] touch-none select-none md:hiddenYouTubePlayer.tsx:543→fixed z-[35] touch-none select-none md:hiddenSpotifyMiniPlayer.tsx:1031→cn("fixed z-[35] touch-none select-none", mobile && "md:hidden")z-35keeps the widget above the chat content and thez-30backdrop during normal playback, but tucks it behind every open mobile overlay — the right/tracker/detail panels AND the sidebar drawer, all of which arez-40. Do NOT use the alternative "hide the widget while a panel is open" gate: it would unmount the widget and tear down its inner<audio>/YouTube iframe, stopping playback, and it misses the sidebar-drawer surface.Regression avoided: Desktop and >=768px are untouched — the
z-[60]/z-[35]token only lives on themd:hiddenmobile floating branch; desktop renders via a separate in-bar pill path with no z-index dependency. There is no theme coupling (globals.css has no widget/z-index override for light/dark/sillytavern; its@media (pointer: coarse)block only touches scrollbars and input font-size). In normal no-panel mobile playback the widget still floats above the chat becausez-35 > z-30and nothing in the chat content is positioned above it. As a bonus, the game-mode.game-party-sidebar(z-50 on mobile) now correctly covers the widget too. The widget stays mounted, so playback continues uninterrupted.AI-investigated against v2.0.6 (packages/client); cited lines read and confirmed. Mobile layout verified by reading the computed Tailwind classes + globals.css, not on a device — please confirm on a phone before fixing.
@SpicyMarinara commented on GitHub (Jun 29, 2026):
Addressed in PR #3072 by commit
4146a380. Validated locally with pnpm check and pnpm smoke:ui.