Skip to content

ui: surface live identity + drift legend in inspect panel - #20

Merged
lex00 merged 1 commit into
mainfrom
feat/inspect-hydration
Jul 13, 2026
Merged

lex00 merged 1 commit into
mainfrom
feat/inspect-hydration

Conversation

@lex00

@lex00 lex00 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Picking an env turned every node blue with values unchanged, so it wasn't obvious the overlay was live. Two gaps, both addressed:

1. The inspect panel dropped the live state

chant's source-anchored overlay merges the observed identity onto managed nodes — physicalId (real cloud resource id) and ownership — as top-level IRNode fields (graph-ir.ts sourceOverlayGraphs). The panel only read node.attrs, so it never showed them.

Now the panel splits identity / live / declared:

  • live — observed physical id + ownership for managed nodes; pending nodes say "not provisioned yet — no live state" explicitly.
  • declared — the source values; $ref cross-resource refs render as → target.attr instead of raw {"$ref":…} JSON (the "static infra refs").

2. The drift wasn't summarised

Added to the meta line (overlay mode only): N managed · N foreign · N pending, plus a colour legend. So "everything's blue" now reads as "17 pending" — i.e. nothing is deployed in that env yet, which is why there's no live state to show.

Why the example looks all-pending

example/ has nothing provisioned in prod, so every declared resource is pending (blue) by definition. Live identity appears on managed (green) nodes once resources exist. Verified live: example/prod → 0 managed · 0 foreign · 17 pending.

node --check clean; 32 tests pass.

Picking an env showed every node blue with values unchanged, so it wasn't
obvious the overlay was live. Two gaps:

- The inspect panel only read node.attrs, dropping the live state chant merges
  onto managed nodes (physicalId, ownership are top-level IRNode fields). Now the
  panel has an "identity / live / declared" split: live shows the observed
  physical id + ownership; pending nodes say so explicitly (no live state because
  not provisioned). Declared $ref values render as "→ target.attr" instead of raw
  {"$ref":…} JSON.
- Added a drift summary to the meta line (N managed · N foreign · N pending) and a
  colour legend, both shown only in overlay mode — so "everything's blue" reads as
  "17 pending" (nothing deployed yet).
@lex00
lex00 merged commit a98c0a6 into main Jul 13, 2026
1 check passed
@lex00
lex00 deleted the feat/inspect-hydration branch July 13, 2026 19:58
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