From dbb9b2c34b49df3ed80d009d0125e415cf0789e8 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Sun, 10 May 2026 21:26:40 +0200 Subject: [PATCH] wip(mobile): in-progress mobile + voice polish Snapshot of in-progress work parked here so group-DM-polish can land cleanly on main. Touches MainContent + mobile-ui.md which overlap with group-DM-polish; rebase onto post-merge main and resolve conflicts on those two files manually. Files: MainContent, MessageInput, MobileVoiceFullScreen (+test), StreamTile, VoiceUser, useLiveKit, useVisualViewportInset, AudioManager, voiceStore, voice utils, mobile-ui.md, voice.md, mobile-parity handoff doc. --- docs/systems/mobile-ui.md | 54 +- docs/systems/voice.md | 47 +- packages/web/src/audio/AudioManager.ts | 41 + .../web/src/components/chat/MessageInput.tsx | 23 +- .../web/src/components/layout/MainContent.tsx | 91 ++- .../layout/MobileVoiceFullScreen.test.tsx | 295 ++++++++ .../layout/MobileVoiceFullScreen.tsx | 712 +++++++++++++----- .../web/src/components/voice/StreamTile.tsx | 1 + .../web/src/components/voice/VoiceUser.tsx | 1 + packages/web/src/hooks/useLiveKit.ts | 35 +- .../web/src/hooks/useVisualViewportInset.ts | 36 + packages/web/src/stores/voiceStore.ts | 22 + packages/web/src/utils/voice.ts | 115 +++ 13 files changed, 1241 insertions(+), 232 deletions(-) create mode 100644 packages/web/src/components/layout/MobileVoiceFullScreen.test.tsx diff --git a/docs/systems/mobile-ui.md b/docs/systems/mobile-ui.md index e5682dc5..9562e5d5 100644 --- a/docs/systems/mobile-ui.md +++ b/docs/systems/mobile-ui.md @@ -495,27 +495,52 @@ File: `MobileVoiceFullScreen.tsx` **Header:** Collapse chevron (down arrow, pops screen), channel name, space name subtitle, participant count, members button (space channels only). -**Participant grid:** -- `grid-cols-1` for 1-2 participants, `grid-cols-2` for 3+ -- Avatar size: 80px for 1-2 participants, 56px for 3+ -- Mute/deafen badge overlay on avatar (bottom-right, rose circle with icon) -- Shows self-mute, space mute, permission mute, self-deafen, space deafen -- Context menu on other participants: voice mod items, local mute checkbox, volume slider +**Participant grid:** **Renders `` from `packages/web/src/components/voice/VoiceGrid.tsx` — the same component desktop uses.** This is the source of the camera + screen-share rendering pipeline; mobile has no separate tile components. Reusing `VoiceGrid` gives mobile feature parity with desktop for free: -**Control bar:** `glass-bubble` container with safe area padding. +- Camera tracks (`p.videoTrack` from `ParticipantInfo`) attach to a `