dotbot/console-web: unified web console for control + orchestration - #279
Open
geonnave wants to merge 27 commits into
Open
dotbot/console-web: unified web console for control + orchestration#279geonnave wants to merge 27 commits into
geonnave wants to merge 27 commits into
Conversation
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
…yphs Adopts the design's north-up y convention (screen top = arena max-y), which deliberately diverges from dotbot/frontend's y-down map - keep that in mind when comparing positions across the two UIs. AI-assisted: Claude Fable 5
…only) AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
…er footer AI-assisted: Claude Fable 5
…simulator AI-assisted: Claude Fable 5
…ess, console) AI-assisted: Claude Fable 5
…gins AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
… cmd toggle) AI-assisted: Claude Fable 5
…troller conventions The controller reports direction as 0 = north (+y), positive counter- clockwise, so the north-up display must negate it; the pad's steering sign is verified against the simulator (pad-right = clockwise arc) but the classic frontend used the opposite sign on real hardware - validate on a real DotBot before trusting teleop in the field. AI-assisted: Claude Fable 5
…tem deselects AI-assisted: Claude Fable 5
…should go) The pad closes the heading loop itself at 10 Hz (P on heading error, alignment-scaled throttle with a floor that keeps the motion-derived heading observable). Replaces body-relative throttle/yaw teleop, which felt erratic; verified convergent against the simulator. AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
AI-assisted: Claude Fable 5
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #279 +/- ##
============================================
- Coverage 83.27% 66.83% -16.44%
============================================
Files 119 137 +18
Lines 11120 14442 +3322
Branches 570 616 +46
============================================
+ Hits 9260 9653 +393
- Misses 1857 4774 +2917
- Partials 3 15 +12
🚀 New features to boost your workflow:
|
The bot marker used a fixed CSS transition (left/top .2s linear). Position updates arrive at whatever rate the source reports them (~20Hz in simulation, sparser and irregular from real LH2 hardware), so the fixed 200ms duration is either too short relative to the gap between updates (the bot glides for 200ms then holds still until the next update, producing visible stutter) or too long (a fast update interrupts the transition already in flight). The old frontend has no transition at all and snaps instantly, which is the same defect in its more visible form. Add useSmoothPositions: a small per-bot animation state driven by requestAnimationFrame, using the previously observed update interval as the next animation's duration (clamped to [60ms, 600ms]) instead of a constant. A jump larger than 35% of the arena diagonal in one update is treated as a teleport and rendered instantly rather than animated across the whole arena. MapView now reads bot render position from this hook instead of the raw prop, and the CSS transition is removed (redundant with per-frame interpolation). Verified: vitest (7 new cases covering first-sight snap, in-flight retarget, duration clamping, teleport detection), tsc build, eslint, and a manual pass against the running simulator + vite dev stack. AI-assisted: Claude Sonnet 5
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.
Adds
dotbot/console-web/, a map-first web console that merges the PyDotBot control plane and swarmit orchestration into one UI: Map/List/Grid views with shared selection, a footer control dock (drive pad, LED, waypoint missions), and a testbed rail (flash with per-device SSE progress, start/stop/reset, streaming event console, missions panel). Ported from a Claude Design prototype; React 18 + Vite + TS, no UI framework, all colors through design tokens with dark/light themes.The controller serves the built console at
/console, side by side with the classic/PyDotBotfrontend (replacing it is deferred until the console is hardware-validated), and proxies/swarmit/*to the swarmit server through a streaming httpx route so SSE stays live and the console is same-origin in production exactly like under the vite dev proxy. The swarmit endpoint is configurable:[run.controller] swarmit_urlin dotbot.toml,--swarmit-url, orDOTBOT_SWARMIT_URL; the defaulthttp://localhost:8001matchesswarmit serve. The config resolver learned dotted nested sections for this.Dev harness under
dotbot/console-web/dev/: a stateful fake swarmit server implementing the real HTTP contract (status/settings/start/stop/reset, chunked/flash/streamSSE,/eventswith history replay), a demo fleet for the dotbot simulator, andTESTING.mdwith run commands and a manual checklist. Pointing the console at a real swarmit server is a URL change.Things a reviewer should know:
dotbot_simulatoronly; the classic frontend used the opposite sign on real robots, so one of the two has a left/right swap. Needs one teleop test on a real DotBot before the pad is trusted (if inverted: flip the sign inJoystick.tsxand file the bug against the simulator)./flash/streamprogress is only visible to the requesting client; multi-client progress belongs in/eventsor/status(to file upstream).Validated end-to-end against
dotbot run simulator+ the fake swarmit server (all views/themes, waypoint missions, full flash/start/stop cycle, production build served from the controller), plus vitest for the pure logic (state merge, mission tail-grouping, SSE parsing), pytest for config resolution and the proxy, a newconsoleCI job mirroring the frontend job, and sdist/wheel builds inspected to confirm the built console ships.