Repository navigation
feat(room): live MoQ telemetry HUD in Debug mode - #64
Conversation
Quest-Claim: afe11371f13fc5b0
Debug mode now shows, per remote tile, its renditions with the live one ringed, its simulcast pixel target, an amber flash on every HD/SD switch, and sparklines of video bitrate, frame rate, and audio arrival jitter beside the decoders' late, stall, underrun, and skip counters. A room-wide panel shows the PROBE round trip, downlink estimate, and PROBE target. Nothing is subscribed or timed while Debug is off. Health grades and publish-side counters wait on moq-dev/moq exposing them; the quest now tracks that remainder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A publisher sends no audio through a mute or a pause in speech, so an interval without arrivals now reports nothing instead of a growing delay. The simulcast flash names the source's selection, which the decoder may not show yet. Sparklines need a 440px-wide tile so they clear the audio box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the jitter trace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe room debug HUD now displays rendition states, video targets, delivery graphs, and counters. Watch video and audio expose decoder statistics, and the new Jitter class tracks arrival offsets. NetworkDebug samples PROBE metrics and is tied to the room’s signal cleanup. Quest documents describe the HUD status and promotion steps. Merge Risk:
|
|
Maintainer decision (via /quest-run): ✅ (Written by Claude Opus 5.5) |
… renditions Measure both bottom panels with a ResizeObserver instead of a fixed 440 px width threshold, which let the panel cover the audio rendition label on tiles around 440 px wide. Record the decoder's own jitter estimate as an upstream ask in the quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mate The trace came from the decoder's newest-arrival stats, which miss groups that arrive too late to be read, so it stayed flat through the dropouts it should explain. Keep the audio counters, and move the sparkline to the quest, waiting on moq-dev/moq to expose the decoder's own ingress jitter estimate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep this branch's quest rewrite over #58's Plan, whose derived audio jitter the review replaced with the decoder's own estimate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Works on quest/m2/network-xray.md and rewrites it to the work that remains.
Problem
Debug mode only drew static catalog boxes, so you couldn't see MoQ's per-tile adaptive subscription or delivery health happening.
Approach
app/src/room/debug.tsnow draws, only while Debug is on:▲ selected sd → hd/▼ selected hd → sdbanner, with the new rendition ringed amber for 3 s, whenever the simulcast selection moves (the ringed box is labeledselected, since the decoder may still show the old rendition until the new one arrives)@moq/uisparklines of video bitrate and frame rate, plus the decoders' late/stall/underrun/skip countersResizeObserverkeeps that current), so a small tile doesn't get buriedResizeObserver, and the PROBE observation lives inside the effect that Debug gates, so turning Debug off tears all of it down. Observing PROBE is what asks the relay for updates.An audio jitter sparkline is left to the quest: the decoder's own ingress estimate, which sees every arriving group, is private at the pin, and a trace derived from the decoder's newest-arrival stats misses groups that arrive too late to be read, so it stayed flat through the dropouts it should explain.
WatchBroadcastnow exposes its decoders'stats. The app depends on the workspace-only@moq/uiforgraphand the formatters. Its stylesheet targets MoQ's shadow roots, so the HUD lays out the sparkline with Tailwind.What the pinned
moq/lacks (the quest now waits on these)Hang.Healthexists inmoq/js/hang/src/health.ts, but@moq/hangdoesn't export it (not inindex.ts, not in packageexports). Upstreammaindoesn't either. A viewer grade also needs the player's own feedback snapshot, andDecoder.feedback()is@internal.#measuredinmoq/js/watch/src/audio/decoder.ts, fed from the container consumer'sspread) is private, so the HUD shows no audio jitter sparkline yet.@moq/roomLocalneither passesstatsto itsPublish.Broadcasts nor exposes its encoders, andPublish.Broadcastkeeps its renditions private. So local tiles still show no HUD, the same as before.holdViewerinWatch.Player) is private. The HUD shows the connection-wide PROBE target instead.Impact
WatchBroadcastis internal to the app.@moq/ui(workspace:*, already a workspace member).Decisions
Taken while the maintainer was afk; all are revertible:
## Waitingon moq-dev/moq. I didn't hold the PR or patchmoq/here. Alternative: hold the PR until upstream exports land, which would block a working HUD on three upstream changes plus a pin bump.Jitter from newest-arrival stats, superseded by the review fix below.stats: trueon local broadcasts.@moq/roomLocaldoesn't take it, and nothing in Hang would read the track yet. That moves upstream together with the publisher-counters item.quest/m2/network-xray-promote.md: the maintainer tries the HUD and decides how to promote it. It requires the health grades./quest-mergethis PR (rejected: iterate, skip); follow-upquest/m2/network-xray-promote.md✅ keep (rejected: drop). The head applies both: the PR is ready and the follow-up quest stays in the diff.app/src/room/jitter.tsuntil moq-dev/moq exposes the decoder's ingress estimate, as the reviewer recommended (rejected: keep the derived trace, which misses late groups the ordered reader skips). The audio counters stay; the quest's Goal and Waiting carry the sparkline.Alternatives
health.ts. Rejected: reusable diagnostics belong upstream, and a fork would drift.moq/js/hang/src/health.tsby relative path. Rejected: it bypasses the package's exports and type-checks foreign code under the app's settings.Follow-ups
Maintainer:item./quest-planin moq-dev/moq (Hang's quest waits on each):Healthfrom@moq/hang, and giveWatch.Playera public feedback snapshot or a gradedhealthoutput@moq/roomLocalpassstats/echoPaththrough and expose each published rendition's statsWatch.Player's downlink grant/quest-planin moq-dev/moq:@moq/ui'sgraphshould draw anundefinedsample as a break in the line instead of a zero (moq/js/ui/src/graph.ts:16). The HUD's bitrate and frame-rate traces draw a decoder restart's missing interval as zero, as MoQ's own watch overlay does today.100 + z, unchanged from before) draws over the Settings panel. It's minor and Debug-only.Validation
quest gate just check: Quest, TypeScript, Biome, API tests (41), app tests (64, including 7 newJittertests), and media tests (2) all pass.just dev, then joined room@xray-hudfrom two isolated headless Chrome sessions (agent-browser, fake camera and mic) with Debug on:▲ sd → hd(ring moved tohd). Zooming out fired▼ hd → sd. The amber banner and ring showed up in a screenshot.quest gate just checkon each head (all pass). I didn't repeat the browser run for the label and jitter-gap changes; they are text and a skipped push, covered by unit tests and types.main(clean merge, no conflicts):quest gate just checkpassesquest check, fallow--unused-deps(it accepts@moq/ui, whichdebug.tsimports), TypeScript, Biome, API tests (45), and app tests (81). The browser media tests timed out locally at load 25-30 (Vite page loads over 30 s in tests that never turn Debug on); CI on the merged head is the signal for those.bun run --cwd app check,quest check, fallow pass): ranjust devand drove two headless Chromium peers (Playwright, fake camera and mic, Debug on) throughapp/test/room.htmlwith the app stylesheet, sweeping the viewport so the remote tile went from 196 to 620 px wide:Models
🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with medium)
Review
Rewritten by
quest reviewafter each round.Head: 1dbb66f
Base: origin/main at 9234698
Risk: medium,
it adds to plans under quest/, which agents start without a person reading themClassified: medium by default
Risk file: none
Reviewer: Codex, gpt-6.2-sol, high effort
Session:
01a219f7-29f8-7863-90d3-beee1ac1efa4, round 4Score: 10/10,
The branch’s only changes since the last review clarify the follow-up quest title and wrap a line, so the head is ready to land.Rounds: 4; first round 2 (medium 2); findings 2 (medium 2): fixed 2, refuted 0, open 0
Findings: none