Skip to content

WIP: Paul/feat/t3 cockpit#3200

Draft
paul-nechifor wants to merge 1 commit into
paul/feat/t2-relayfrom
paul/feat/t3-cockpit
Draft

WIP: Paul/feat/t3 cockpit#3200
paul-nechifor wants to merge 1 commit into
paul/feat/t2-relayfrom
paul/feat/t3-cockpit

Conversation

@paul-nechifor

Copy link
Copy Markdown
Contributor

Contribution path

  • Small, safe change that does not need a tracking issue
  • Linked issue or discussion: DIM-XXX / #XXX / URL

Problem

Solution

How to Test

AI assistance

Checklist

  • I have read and approved the CLA.

@paul-nechifor
paul-nechifor marked this pull request as draft July 26, 2026 10:09
@paul-nechifor
paul-nechifor changed the base branch from main to paul/feat/t2-relay July 26, 2026 10:09
@greptile-apps

greptile-apps Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a packaged React cockpit and a reconnecting WebTransport relay path from robot streams to browser viewers.

  • Adds robot registration, manifests, subscriptions, reliable stream framing, and relay lifecycle management.
  • Integrates local and remote relay options into the robot CLI and global configuration.
  • Builds and packages cockpit assets in release distributions and adds Python, Deno, browser, and protocol tests.

Confidence Score: 3/5

The stale cockpit state and broken release wheel smoke path should be fixed before merging.

Robot removal leaves the previous manifest visible in the cockpit, and clean cibuildwheel validation now raises because its workflow does not generate the newly mandatory cockpit distribution.

Files Needing Attention: web/cockpit/src/session/session.ts, setup.py, .github/workflows/release-build-check.yml

Important Files Changed

Filename Overview
dimos/web/relay_bridge/relay_bridge_module.py Adds lazy stream subscriptions, local relay supervision, and reconnect/respawn behavior.
web/relay/registry.ts Adds robot registration, viewer watches, channel subscriptions, and forwarding policy coordination.
web/cockpit/src/session/session.ts Implements cockpit session orchestration but retains stale manifest/channel state after the selected robot disappears.
web/cockpit/src/session/transport.ts Adds WebTransport setup, certificate pinning, protocol checks, and reconnect backoff.
setup.py Copies relay and cockpit assets into wheels but introduces an unmet prerequisite in the release smoke workflow.
.github/workflows/release.yml Builds cockpit assets before creating release sdists and wheels.

Sequence Diagram

sequenceDiagram
    participant CLI as dimos run
    participant Bridge as RelayBridgeModule
    participant Relay as Deno Relay
    participant Cockpit as Browser Cockpit
    CLI->>Bridge: compose --local-relay/--relay-url
    Bridge->>Relay: robot hello + manifest
    Cockpit->>Relay: viewer hello + watch + subscriptions
    Relay-->>Bridge: subscription snapshots
    Bridge->>Relay: subscribed robot frames
    Relay-->>Cockpit: reliable/latest data streams
    Relay-->>Cockpit: robot-list and manifest updates
Loading

Comments Outside Diff (1)

  1. setup.py, line 95-105 (link)

    P1 Wheel smoke build lacks cockpit assets

    When the release wheel smoke workflow runs cibuildwheel from a clean checkout, CIBUILDWHEEL=1 reaches this new check without first building web/cockpit/dist, causing the validation job to abort with the cockpit-dist RuntimeError instead of producing a wheel.

    Knowledge Base Used: Build, CI, and Packaging

Reviews (1): Last reviewed commit: "feat: T3 cockpit" | Re-trigger Greptile

Comment on lines +108 to +115
case "robots": {
const pick = pickAutoWatch(msg.robots);
this.status.update({ robot: pick, robotCount: msg.robots.length });
if (pick !== null && pick.id !== watched) {
watched = pick.id;
await send({ t: "watch", robotId: pick.id });
}
break;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Stale manifest survives robot removal

When the watched robot disconnects and the relay publishes an empty robot list, this branch clears the selected robot but retains the previous manifest and channels, causing the cockpit to report "no robot" while continuing to display the disconnected robot's stale channel table.

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.95642% with 116 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/e2e_tests/test_cockpit_browser.py 8.69% 63 Missing ⚠️
dimos/web/relay_bridge/relay_process.py 77.93% 26 Missing and 6 partials ⚠️
dimos/e2e_tests/dimos_cli_call.py 52.63% 7 Missing and 2 partials ⚠️
dimos/web/relay_bridge/relay_bridge_module.py 86.04% 5 Missing and 1 partial ⚠️
dimos/web/relay_bridge/_wt_session.py 92.85% 3 Missing ⚠️
dimos/web/relay_bridge/test_relay_process.py 99.13% 2 Missing ⚠️
dimos/web/relay_bridge/locate.py 94.73% 1 Missing ⚠️
@@                  Coverage Diff                   @@
##           paul/feat/t2-relay    #3200      +/-   ##
======================================================
+ Coverage               74.33%   74.42%   +0.08%     
======================================================
  Files                    1108     1113       +5     
  Lines                  105309   106061     +752     
  Branches                 9598     9652      +54     
======================================================
+ Hits                    78283    78932     +649     
- Misses                  24316    24411      +95     
- Partials                 2710     2718       +8     
Flag Coverage Δ
OS-ubuntu-24.04-arm 68.43% <84.86%> (+0.12%) ⬆️
OS-ubuntu-latest 70.45% <84.86%> (+0.10%) ⬆️
Py-3.10 70.44% <84.86%> (+0.10%) ⬆️
Py-3.11 70.44% <84.86%> (+0.11%) ⬆️
Py-3.12 70.44% <84.86%> (+0.12%) ⬆️
Py-3.13 70.44% <84.86%> (+0.10%) ⬆️
Py-3.14 70.45% <84.86%> (+0.11%) ⬆️
Py-3.14t 70.44% <84.86%> (+0.10%) ⬆️
SelfHosted-Large 29.25% <20.82%> (-0.08%) ⬇️
SelfHosted-Linux 35.82% <19.73%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/conftest.py 80.59% <100.00%> (+0.14%) ⬆️
dimos/web/relay_bridge/manifest.py 100.00% <100.00%> (ø)
dimos/web/relay_bridge/protocol.py 100.00% <100.00%> (ø)
dimos/web/relay_bridge/test_manifest.py 100.00% <100.00%> (ø)
dimos/web/relay_bridge/test_protocol.py 100.00% <100.00%> (ø)
dimos/web/relay_bridge/test_relay_bridge_e2e.py 95.68% <100.00%> (ø)
dimos/web/relay_bridge/test_relay_bridge_module.py 98.33% <100.00%> (+0.15%) ⬆️
dimos/web/relay_bridge/test_relay_e2e.py 96.80% <100.00%> (+0.21%) ⬆️
dimos/web/relay_bridge/test_wt_session.py 100.00% <100.00%> (ø)
dimos/web/relay_bridge/locate.py 70.73% <94.73%> (+18.73%) ⬆️
... and 6 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@paul-nechifor
paul-nechifor force-pushed the paul/feat/t3-cockpit branch from 86d81f8 to 0ee126a Compare July 26, 2026 12:20
@paul-nechifor
paul-nechifor force-pushed the paul/feat/t3-cockpit branch from 1464b40 to 962eaef Compare July 27, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant