fix(mobile): voice join flow — correct screen key + remove desktop PiP from mobile branch
Two compounding root causes produced a "PiP-style grey view" briefly visible after Join Voice on mobile: 1. MobileSpacesScreen.handleVoiceJoin pushed 'voice' onto the mobile stack. MobileShell.screenMap only has 'voice-full' — the renderer returned null for 'voice' while the root screen sat under `visibility: hidden` (stack length > 0). Corrected to 'voice-full' with an explanatory comment. 2. AppLayout mounted the desktop <PictureInPicture /> in the mobile branch too. Its visibility check `(isInServerVoice || isInDmCall) && !voiceFullscreen` is true the moment currentVoiceChannelId is set, so the desktop PiP rendered as the only visible UI on top of the hidden mobile shell. Removed from the mobile branch; kept on desktop. Added a comment to prevent regression. Mobile owns its voice overlay chrome exclusively via MobileVoiceMiniBar + MobileVoiceFullScreen. Spec: docs/systems/mobile-ui.md gains a "Voice Join Flow (Mobile)" subsection and a leading paragraph in "Voice Overlay" stating that PiP is desktop-only.
This commit is contained in:
@@ -406,7 +406,13 @@ export function AppLayout() {
|
||||
<UserProfileModal />
|
||||
<IncomingCallModal />
|
||||
<ImagePreview />
|
||||
<PictureInPicture />
|
||||
{/* PictureInPicture is desktop-only. Mobile has its own purpose-built
|
||||
voice chrome (MobileVoiceMiniBar + MobileVoiceFullScreen) mounted
|
||||
inside MobileShell. Mounting PiP here too caused a "PiP-style grey
|
||||
view" to appear on top of the mobile shell whenever a voice call
|
||||
was connected but the voice-full screen was not on the stack
|
||||
(e.g. immediately after Join, or after popping voice-full back to
|
||||
the root). */}
|
||||
<SoundController />
|
||||
<GlobalAudioRenderer />
|
||||
<NotificationController />
|
||||
|
||||
@@ -224,7 +224,13 @@ export function MobileSpacesScreen() {
|
||||
const connectFn = useVoiceStore.getState().connectFn;
|
||||
joinVoiceChannel(chId, connectFn ?? undefined);
|
||||
setVoiceJoinChannelId(null);
|
||||
pushMobileScreen('voice');
|
||||
// Push the canonical mobile voice screen key. Previously this passed
|
||||
// 'voice', which has no entry in MobileShell.screenMap — the renderer
|
||||
// returned null while the root screen sat under `visibility: hidden`,
|
||||
// exposing the desktop PictureInPicture popup as the only visible UI
|
||||
// (the "PiP-style grey view" bug). The screen key must match
|
||||
// MobileShell.tsx:91 ('voice-full').
|
||||
pushMobileScreen('voice-full');
|
||||
}, [pushMobileScreen]);
|
||||
|
||||
const toggleCategory = (categoryId: string) => {
|
||||
|
||||
Reference in New Issue
Block a user