Skip to content

[codex] Productize runtime map UI#26

Merged
Joncallim merged 1 commit into
mainfrom
codex/runtime-map-productization
Jul 3, 2026
Merged

[codex] Productize runtime map UI#26
Joncallim merged 1 commit into
mainfrom
codex/runtime-map-productization

Conversation

@Joncallim

Copy link
Copy Markdown
Owner

What changed

  • switched the web app's shared model from /api/snapshot + /api/graph to /api/runtime/map + /api/snapshot
  • added a first-class Runtime Map workspace with provider and layer filters, diagnostics, node inspection, and cross-provider edge browsing
  • surfaced runtime summaries on Home, added route/nav/settings/command-palette support, and expanded demo-mode runtime data
  • hardened scripts/smoke-deploy.sh to verify protected-route 401 behavior and a live /api/events/stream snapshot event
  • updated the Playwright harness to force CARGO_INCREMENTAL=0 for the local daemon build on this Mac
  • refreshed operator-facing docs for the runtime workspace and stronger deployment smoke path

Why

The repo already exposed /api/runtime/map, but the main UI still depended on the older Docker-centric snapshot/graph path. This change makes the runtime map a real product surface instead of a backend side channel.

Impact

Validation

  • npm run check
  • npm run test:e2e
  • npm run build:deploy
  • DOCKERMAP_API_TOKEN=test-token DOCKERMAP_SMOKE_URL=http://127.0.0.1:4000 ./scripts/smoke-deploy.sh

@Joncallim Joncallim merged commit eda03b6 into main Jul 3, 2026
7 checks passed
@Joncallim Joncallim deleted the codex/runtime-map-productization branch July 3, 2026 14:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fac4377c91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


const runtime = model.runtime;

const filteredNodes = useMemo(() => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move the runtime filter hook before early returns

When /runtime is the first route rendered (direct URL/default route), model is initially null, so the component returns on the loading/empty branch before this useMemo runs. After the fetch completes the same component renders with an extra hook and React throws Rendered more hooks than during the previous render, leaving the Runtime page unusable; compute the memo before any conditional return or avoid a hook here.

Useful? React with 👍 / 👎.

Comment thread apps/web/src/lib/model.ts
}

function runtimeLayerForNode(node: RuntimeMapNode): RuntimeLayerId {
return (node.layer ?? "unassigned") as RuntimeLayerId;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Populate layers for live runtime nodes

In live mode /api/runtime/map is proxied from the Rust daemon, whose RuntimeMapNode currently serializes no layer field (crates/dockermap-core/src/lib.rs:468-476), so this fallback puts every live node into unassigned. The new layer count/filter therefore only works with the demo data and is misleading for actual hosts; infer a layer from type/provider or add the field on the daemon side.

Useful? React with 👍 / 👎.

Comment thread apps/web/src/lib/model.ts
if (
value.includes("healthy") ||
value.includes("running") ||
value.includes("active") ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Check inactive statuses before active

For systemd nodes the daemon assigns node.status from ActiveState (systemd_runtime_node), so stopped units commonly arrive as inactive. Because this positive match uses substring search, inactive contains active and is classified as healthy, hiding those units from the attention count/filter; match exact active/running states or handle inactive as offline/unknown before this branch.

Useful? React with 👍 / 👎.

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