Repository navigation
Conversation
Cover the core meeting flows to guard functional stability before the upcoming large-scale refactoring: - welcome page rendering and meeting id pre-fill from URL - create meeting, join with media, hang up back to the lobby - join an existing meeting by id - two-party audio/video: WHIP publish + WHEP subscribe through Live777, asserting real video frames (videoWidth > 0), inspired by the Live777 browser tests (fake media flags, full chromium new headless) Tests run against the release binary serving webapp + API + WHIP/WHEP proxy on one origin, with Redis and Live777 as external dependencies (docker compose locally, service containers in CI). Key UI elements get data-testid attributes so selectors survive refactors.
Document project layout, build/run commands, e2e testing conventions (data-testid selectors, video-playing assertions, dependency checks) and code style for AI agents working on the repository.
Replace the Go (chi) backend with an axum/tokio implementation: - REST API (/user/, /room/*) with JWT HS512 middleware (jsonwebtoken) - Room state stays in Redis hashes, values now serialized as JSON (serde_json) instead of gob; Room JSON shape preserved via serde flatten - WHIP/WHEP reverse proxy to Live777 via reqwest (rustls) - SPA hosting via rust-embed (static/dist), replacing go:embed - Build/CI switched to cargo: Makefile, Dockerfile (rust:1-alpine), GitHub workflows, package.json test:e2e, playwright webServer path
- React 18 -> Vue 3 <script setup> SFCs; @vitejs/plugin-vue, vue-tsc, eslint-plugin-vue replace the React toolchain - jotai -> module-level ref/shallowRef (store/atoms.ts); zustand+persist -> reactive + localStorage watch (store/setting.ts), reading the old zustand storage format for backward compatibility - drop unused deps: jotai-devtools, jotai-location, swr - WHIP/WHEP EventTarget singletons kept; useSyncExternalStore replaced by composables bridging sync events into shallowRef - svg icons split into individual SFCs (path data verified byte-identical) - fix video/audio element setup timing: immediate+post watchers run before template refs attach in Vue, so bind from onMounted instead - e2e selectors (data-testid) unchanged; 5/5 playwright tests pass
- vite 5.4 -> 8.2, unocss 0.64 -> 66.7.5, eslint 9.14 -> 9.39.5, typescript 5.6 -> 5.9, @stylistic/eslint-plugin-js 2 -> 4, @types/node 22 -> 26, cross-env 7 -> 10, copy-to-clipboard 3 -> 4, wavesurfer.js 7.8 -> 7.12, @mediapipe/tasks-vision 0.10.21 -> 0.10.35 - stay on eslint 9 (ecosystem stability) and mediapipe 0.10 (API churn) - fix Uint8Array<ArrayBuffer> typing for TS 5.9 stricter TypedArray generics
UI: unified dark theme — design tokens as UnoCSS shortcuts (btn-primary, panel, input-dark, icon-btn, chip), radial-glow background, dark settings modal, floating control bar, rounded player cards; drop all <center> tags; replace the rotate-180 select hack with an invisible-overlay + chevron. Layout: show at most 9 video tiles (self + 8 remotes) in a responsive 3-column grid; remotes beyond the cap render as a '+N' tile and are never subscribed (no WhepPlayer mounted). WhepPlayer now stops the WHEP connection on unmount (the module-level context otherwise kept receiving media) and uses restart() on mount to avoid reusing a closed peer connection.
When someone shares their screen, switch to a presenter view: the shared content takes the main stage (full height, object-contain) while participants shrink to a 160px thumbnail strip (right side on desktop, bottom on mobile). Stopping the share restores the 3-column grid. Fix a layout oscillation bug: with the tiles rendered in two separate v-if/v-else branches, switching layouts unmounted every WhepPlayer — the unmount hook clears the presentation stream (flipping the layout back) and the remount restarts WHEP and re-sets it, looping forever. The tile list now renders once with a stable parent; only container classes and tile widths change between layouts.
…ting
Data model (in-memory behind a Store trait, MemoryStore now, PostgreSQL
later; Redis removed entirely):
- Room (metadata, password never serialized), Meeting instance (first
join starts, last leave/owner-end finishes), Participant with
join/leave timestamps, archived Record with durations and max
concurrent; Presence stays ephemeral with 45s TTL + client heartbeat
+ server sweeper.
Working logic:
- new endpoints: join/leave/end, presence PATCH, records (user+room),
SSE /room/{id}/events replacing the 3s polling (EventSource token via
query param); ownership enforced via JWT (presence, room updates,
records); room lock/password/presenter enforced server-side and in UI
(owner panel in settings, screen-share restricted to presenter,
everyone auto-hangs-up when the owner ends the meeting).
- welcome page lists personal meeting records.
Observability:
- POST /log intake (unauthenticated by design) writes browser logs as
NDJSON on the client_log target; webapp/lib/log.ts batches/keepalive-
flushes window errors, unhandled rejections, console warn/error and
instrumented events (join, WHIP/WHEP lifecycle, getUserMedia failures)
tagged with sessionId and meetingId.
Infra: redis dropped from compose.yml, CI services, e2e global-setup
and Makefile; default tracing filter includes client_log.
- Message model stored in memory (500/meeting cap), archived with the
meeting Record when the meeting ends
- POST /room/{id}/message: auth, requires an ongoing meeting, trims and
caps content at 500 chars; display name comes from the participant record
- SSE now has two event types: snapshot (room state + last 50 messages,
so late joiners see history) and message (live single-message delivery)
- webapp: chat toggle in the control bar with unread badge, slide-in
panel with message bubbles, Enter/button send, auto-scroll
- e2e: two-user exchange and late-joiner history specs (data-testid only)
- Members panel (slides out like chat, mutually exclusive): avatar,
name, owner badge, live mic/camera state per participant; owner first,
then join order; control-bar toggle shows the active count
- Mute all: POST /room/{id}/mute (owner only) broadcasts a muteAllAt
timestamp; clients mute their own mic when it advances (owner exempt)
- Remove participant: DELETE /room/{id}/participant/{userId} (owner
only; cannot remove self or the owner); the removed client sees its
leaveAt in the next snapshot and hangs up automatically
- e2e: panel listing/state and mute-all + kick flows (9/9 pass)
- manifest.webmanifest (standalone, theme colors, any+maskable icons); icons rendered from logo.svg via headless chromium - hand-rolled service worker: network-first navigations with offline SPA fallback, cache-first content-hashed assets, and a hard bypass for /user, /room, /log, /whip, /whep, /session so API, SSE and WebRTC signaling are never cached; old caches cleaned on activate - index.html: manifest link, theme-color, apple-touch-icon, apple-mobile-web-app meta, viewport-fit=cover - register the SW in production only (dev proxies would fight the cache)
Auto rejoin: on SSE reconnect the client idempotently re-joins the meeting (the server clears leaveAt, so no duplicate participants), immediately re-publishes presence, and nudges a dead WHIP connection; SSE errors/rejoins are reported through the browser log pipeline. Mobile: front/back camera switch (facingMode constraint, shown only on mobile while not screen sharing); small-screen polish — tiles clamped to min(320px, 92vw), control bar capped and scrollable, chat/members panels at 85vw on phones, prepare preview clamped as well. e2e: offline/online recovery with no duplicate participants, and switch-camera visibility on mobile vs desktop (12/12 pass)
- start() no longer returns silently when the stream is empty (slow devices / permission prompts): it waits for the first track over the sync event, times out into Failed after 10s, and arms the watchdog so publishing retries automatically. e2e simulates a 2s getUserMedia. - Player gets a name prop and shows an initial-based avatar with the user name when video is off (audio waveform kept), replacing the black box; wired from whip-player, whep-player and prepare
Replace the wavesurfer strip (and the wavesurfer.js dependency, -36KB bundle) with a music-player-style dial ring drawn from an AnalyserNode on canvas: 120 fine radial ticks around the avatar, mapped to the lower 3/4 of the spectrum where speech energy lives; idle ticks stay faintly visible so the ring is always complete, amplitude drives tick length and opacity
liveion 0.9.0 (vs live777-server 0.7.3) can leave a subscriber with a connected but permanently muted video track (see binbat/live777#406). Mitigate downstream: - gate the WHEP subscription until the remote presence reports 'connected' (avoids binding to a publish session that is replaced) - watchdog: if the remote should be sending video but the track stays muted ~10s while connected, tear down and re-subscribe to trigger a fresh keyframe request compose.yml and CI e2e service now use ghcr.io/binbat/liveion:0.9.0
- actions/checkout, actions/setup-node, actions/upload-artifact v4 -> v7 - pin CI node to 24 (was floating 'latest') - Dockerfile: node:20-alpine -> node:24-alpine (LTS, required by vite 8), rust:1-alpine -> rust:1.97-alpine (reproducible), alpine -> alpine:3.23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
npm run buildnpm run test:rust— 35 passednpm run test:e2eagainst Liveion 0.10.2 — 33 passednpm audit --omit=dev— 0 vulnerabilitiesgit diff --checkNotes
/room/{id}/stream*endpoints are intentionally removed.