Skip to content

Redesign Run Inspector: overlay pulse plot, metrics rail, fidelity≠objective fix - #117

Merged
kateebonner merged 1 commit into
mainfrom
kate/inspector-redesign
Jul 9, 2026
Merged

kateebonner merged 1 commit into
mainfrom
kate/inspector-redesign

Conversation

@kateebonner

Copy link
Copy Markdown
Contributor

Redesign of the Run Inspector pane (design lane — the host↔webview protocol and the shell/CSP contract are untouched).

What changed

  • One pulse graph. Drives overlay on a single shared time/amplitude axis with a colored legend, instead of a stack of per-drive panels — reads the controls' relative shape at a glance and reclaims vertical space.
  • Adapts to any run shape. Drive count is read from the run. Overlay for ≤ 6 drives; small multiples (one strip per drive) for 7+, where position + per-strip labels carry identity so color needn't. Handles 1 drive, mixed per-drive bounds, and degenerate lo == hi bounds.
  • Metrics moved to a left rail beside the plot (was a full-width wrapping row of uneven tiles): fidelity hero · objective (+ convergence trace) · iteration · feasibility · optimality. Collapses above the plot when the panel is docked narrow.
  • Fix — fidelity is not the objective. The convergence sparkline (the objective trace) used to live inside the hero card, which was relabeled to fidelity on completion — so a card labeled "fidelity" ended up drawn over a plot of the objective function. The sparkline now belongs to the objective card; fidelity is its own scalar hero.

Palette (two new categorical colors)

brand.css gains --series-5 (yellow) and --series-6 (red), both riding --vscode-charts-* tokens so they adapt to the user's theme, with dark-tuned hex fallbacks. Validated with the dataviz palette checker — PASS on lightness band, chroma floor, adjacent-pair CVD, and contrast for both dark (#1e1e1e) and light (#ffffff) surfaces. Ordering is deliberate: yellow at slot 5 keeps green(4) adjacent to yellow, not red, so the red/green pair (CVD's weakest) is never adjacent. Six is the ceiling — VS Code exposes exactly six chart hues — so past it the plot facets rather than inventing a 7th hue.

Verification

  • ✅ TypeScript erasability/syntax gate on all touched files.
  • ✅ Plot-geometry + adaptive-mode unit checks (scale, ZOH stairs, decimation, union domain, mode selection at N = 1/4/6/7/8/16, degenerate/mixed bounds).
  • ✅ dataviz palette validator (dark + light).
  • ⚠️ Could not run pnpm typecheck / pnpm test / pnpm build in my environment (no npm/deps available). Relying on CI here — please confirm the checks pass before merge. The existing inspector_view_contract / inspector_webview_view tests pin the protocol + .pane/.active/.pill, which are unchanged.

🤖 Generated with Claude Code

… rail, fidelity≠objective fix

- Pulse plot now overlays all drives on ONE shared time/amplitude axis with a
  legend, instead of a stack of per-drive panels. Adapts to any run shape:
  overlay for <=6 drives, small multiples for 7+ (position + labels disambiguate,
  so no ambiguous categorical-color cycling).
- brand.css: add validated --series-5 (yellow) / --series-6 (red) riding VS Code
  chart tokens; overlay ceiling 4 -> 6. Palette passes the dataviz validator
  (lightness band, chroma floor, adjacent CVD, contrast) on dark and light
  surfaces; order puts yellow before red so green(4) never neighbours red.
- Metrics move to a left rail beside the plot (was a full-width wrapping row of
  uneven tiles). Order: fidelity hero · objective(+trace) · iteration ·
  feasibility · optimality; collapses above the plot when docked narrow.
- Fix fidelity != objective: the convergence sparkline (the OBJECTIVE trace)
  lived inside the hero card, which was relabeled "fidelity" on completion — so
  a "fidelity" card sat over a plot of the objective. The sparkline now belongs
  to the objective card; fidelity is its own scalar hero.

Host<->webview message protocol and the shell/CSP contract are unchanged; only
the view DOM/CSS (design lane, free to change per the contract test) is touched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kateebonner
kateebonner merged commit d533b82 into main Jul 9, 2026
5 checks passed
aarontrowbridge added a commit that referenced this pull request Jul 11, 2026
…gn to #117 idiom)

Mirror the Run Inspector's reveal gate on the Device Inspector so the panel is
strictly button-press-only and VS Code never restores/auto-opens it:

- package.json: add "when": "amicode.deviceInspectorRevealed" to the view.
- device_inspector.ts: add DEVICE_INSPECTOR_CONTEXT_KEY + revealDeviceInspector()
  (setContext true → focus), structurally identical to INSPECTOR_CONTEXT_KEY /
  revealInspector; reveal() now funnels through it instead of a bare focus.
- extension.ts: amicode.openDeviceInspector calls revealDeviceInspector().
- test: assert the reveal order (setContext true → focus) and the package.json
  gate. No webview-internal (overlay/metrics-rail) changes — that lane is Kate's.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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