feat(web): rover ui - #17
Merged
Merged
Conversation
thomasyuill-livekit
force-pushed
the
ty/rover-web-ui
branch
4 times, most recently
from
April 27, 2026 21:10
1cbc394 to
aa87955
Compare
thomasyuill-livekit
force-pushed
the
ty/rover-web-ui
branch
from
April 27, 2026 21:36
aa87955 to
00a3b02
Compare
thomasyuill-livekit
force-pushed
the
ty/rover-web-ui
branch
from
April 29, 2026 13:59
5bcc521 to
3b1cd3a
Compare
thomasyuill-livekit
force-pushed
the
ty/rover-web-ui
branch
2 times, most recently
from
April 29, 2026 20:37
3093961 to
2866c02
Compare
thomasyuill-livekit
force-pushed
the
ty/rover-web-ui
branch
from
April 29, 2026 20:59
2866c02 to
c525ee7
Compare
Passive effect cleanups fire in registration order. Calling useConnection() first meant session.end() ran before useAcquireControl's release RPC, leaving the controller seat held when navigating away from /robot or /rover while in operate mode. Move useConnection() to be the last hook in both page-clients so cleanups fire as: releaseOperator → data-track teardown → session.end. Added a doc-comment to useConnection capturing the ordering requirement. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
stephen-derosa
approved these changes
May 6, 2026
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
Adds a second teleop page for the rover alongside the existing pan/tilt arm app, and refactors shared UI/connection plumbing.
Routing
/is now a landing page that shows a "Connect to Robot" and/or "Connect to Rover" button based on which env vars are set, or an empty state if neither is configured.components/app.tsxmoved toapp/robot/page-client.tsx, and a newapp/rover/page-client.tsxmirror was added. Each wraps the SessionProvider in its ownapp/<robot>/page.tsx.Rover protocol
lib/rover.ts— topic helpers (<rover_id>.imu,<rover_id>.control_cmd,<rover_id>.arducam),ImuPayloadtype, andcontrolCmdJson(throttle_rps, steering_rps)encoder clamped to ±1 rev/s.use-imusubscribes to the rover IMU track (bufferSize: 256to keep up with ~100 Hz frames).use-rover-control-cmd-trackpublishes the joystick-driven throttle/steering data track and cleans up on mode change.(horizontal, vertical)→(steering_rps, throttle_rps)with vertical-up as forward throttle.Shared components & hooks
DebugPanel(components/debug-panel.tsx): table-based panel taking{label, value, unit, precision}rows, used by both robot and rover pages.Dialog+VideoDialog(components/{dialog,video-dialog}.tsx): a video container that selects the rightTrackReference(by participant + track name + source) with aWaiting for <label>placeholder. The rover page targets<rover_id>.arducamexplicitly.use-video-fit-screen(replacesuse-video-fit-container): computes a width/height fit given an inset and the track's aspect ratio.use-connection: extractedsession.start()/end()lifecycle that surfaces failures via a sonner toast and redirects to/.StatusBaraccepts anactionsprop so each page provides its own disconnect / fullscreen / debug buttons.Errors & UX
session.start()failures show asonnertoast (shadcn add sonner) with a stableidto dedupe StrictMode double-mounts, then redirect to/.page-client.tsxs: the connection lifecycle effect is declared first so its cleanup runs last. Subscription hooks (useImu,useGyro, control-cmd track) tear down while the PC manager is still alive — eliminates the "Cannot read properties of undefined (reading 'client')" and "PC manager is closed" crashes during navigation.Env vars
Split into
NEXT_PUBLIC_ROBOT_*andNEXT_PUBLIC_ROVER_*(identity / LiveKit URL / token)..env.exampleand README updated.Test plan
/shows the "No robots configured" empty stateNEXT_PUBLIC_ROBOT_*set, only the Robot button appears (and vice versa for rover)LIVEKIT_TOKENand verify an error toast appears and the page redirects back to/🤖 Generated with Claude Code