Skip to content

3.1.0: mx mission-control — live web dashboard#13

Merged
rousan merged 1 commit into
mainfrom
develop
Jun 30, 2026
Merged

3.1.0: mx mission-control — live web dashboard#13
rousan merged 1 commit into
mainfrom
develop

Conversation

@rousan

@rousan rousan commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Adds mx mission-control (alias mx mc): a local, read-only live web dashboard for the runtime. Run it, open the printed http://localhost:7777 (a second monitor works well), and watch a calm, monochrome, auto-refreshing overview of every repo's and work's health plus a consolidated ports board.

Minor — runtime stays v3, no migration.

Server (zero runtime deps)

A hand-written node:http server serves a single self-contained HTML page (/), a JSON snapshot (/api/state), and a Server-Sent Events stream (/api/stream). It recomputes on a short timer and pushes instantly on manifest changes (fs.watch on works/, repos/, mx.json). --port walks upward if busy (default 7777); -o opens the browser. State is built in-process from listRepoHealth + listWorkHealth — it never mutates the runtime.

UI — apps/mission-control/ (React + Vite + Tailwind)

  • Builds to one inlined index.html (vite-plugin-singlefile), copied into npm/mission-control/ at build time. React/Vite/Tailwind are dev-only, so the published @roulabs/mx keeps zero runtime dependencies. pnpm build builds the dashboard before the CLI so the copy step finds dist/.
  • Theme auto-syncs with the OS via prefers-color-scheme (light + dark).
  • Semantic health colors on the monochrome canvas: green ✓ when healthy, red ⚠ when not.
  • Works grid shows active works by default with a "show archived" toggle.
  • Ports board is independent (always every work) and rendered as a nested treework → worktree → (service · port · url) so names aren't repeated; cross-work collisions flagged in red, archived works dimmed.

Also in this release

  • Fix a false positive in repo-health rendering (CLI + dashboard): a repo with no remote (no origin/HEAD) has no default branch to compare against, so its current branch is no longer flagged — only a detached HEAD is. Now matches @mx/core (which already treated it as healthy).
  • Cleaned two stale references to the removed mx work worktree hydrate command / --no-hydrate flag in the stamped templates/.

Code

  • CLI: commands/missionControl.ts, paths.ts#missionControlHtml(), --port flag, main.ts routing (mission-control / mc), help text.
  • New apps/mission-control/ workspace; tsup copies its dist/ into npm/mission-control/; root build builds it first; eslint ignores it; .gitignore covers npm/mission-control/ and .playwright-mcp/.
  • Bump npm/package.json → 3.1.0.

Verification

typecheck (all 3 projects) / lint / 85 tests / build all green. Smoke-tested end-to-end against a seeded multi-repo, multi-worktree runtime: /, /api/state, SSE /api/stream; browser screenshots confirm the UI in light and dark, the archived toggle, the semantic colors, the no-remote fix, and the nested ports tree (incl. a worktree with multiple ports).

New `mx mission-control` (alias `mx mc`): a local, read-only live dashboard
for the runtime. Open the printed localhost URL (a second monitor works well)
for a calm, monochrome, auto-refreshing overview of every repo's and work's
health plus a consolidated ports board.

Server
- Zero-dependency `node:http` server: serves a single self-contained HTML page
  at `/`, a JSON snapshot at `/api/state`, and a Server-Sent Events stream at
  `/api/stream`. Recomputes on a short tick and pushes instantly on manifest
  changes (fs.watch on works/, repos/, mx.json). `--port` walks upward if busy
  (default 7777); `-o` opens the browser.
- Built in-process from listRepoHealth + listWorkHealth; never mutates anything.

UI (apps/mission-control — React + Vite + Tailwind)
- Builds to one inlined index.html (vite-plugin-singlefile), copied into
  npm/mission-control/ at build time. React/Vite/Tailwind are dev-only, so the
  published package keeps zero runtime dependencies. `pnpm build` builds the
  dashboard before the CLI so the copy step finds dist/.
- Theme auto-syncs with the OS via prefers-color-scheme (light + dark).
- Semantic health colors: green tick when healthy, red when not.
- Works grid shows active works by default with a "show archived" toggle; the
  ports board is independent and covers every work, rendered as a nested tree
  (work -> worktree -> service/port/url) with cross-work collisions flagged.

Also
- Fix a false positive in repo health rendering (CLI + dashboard): a repo with
  no remote (no origin/HEAD) has no default branch to compare against, so its
  current branch is no longer flagged — only a detached HEAD is. Matches core.
- Clean two stale references to the removed `mx work worktree hydrate` command
  / `--no-hydrate` flag in the stamped templates.

New `commands/missionControl.ts` + `paths.ts#missionControlHtml()` + `--port`
in the CLI; `apps/mission-control/` workspace; build/eslint/gitignore wiring.
Bump to 3.1.0 (runtime stays v3, no migration). Docs updated. 85 tests pass.
@rousan
rousan merged commit d0ca85a into main Jun 30, 2026
1 check passed
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