Skip to content

refactor(extension): TS-composed inspector view + brand/layout token split - #65

Merged
kateebonner merged 2 commits into
mainfrom
kate/inspector-view-reorg
Jul 3, 2026
Merged

refactor(extension): TS-composed inspector view + brand/layout token split#65
kateebonner merged 2 commits into
mainfrom
kate/inspector-view-reorg

Conversation

@kateebonner

@kateebonner kateebonner commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What

No UX changes — this is a refactor to make the later design work easier. (Only visible diff: the yellow accent is dropped, since it was hard to read.)

Starts the UX pass with a more scalable, modular organization centered on the inspector — the only custom component we've built so far.

  • View is now TS-composed: media/ui/ atoms (text/pill/icon) → components (metric/preview) → view (views/inspector.ts), each owning its styles via constructable stylesheets (style.ts registry). The static media/inspector.{html,css} files are deleted.
  • Token split: design values live in brand.css (colors/type/space, preferring --vscode-* theme vars), composition in layout.css (.stack/.row/.grid-fit…). The shell (run_inspector.ts) owns only CSP/nonce/stylesheet wiring; the webview entry (inspector_webview.ts) is pure mount + message plumbing.
  • De-yellowed: --color-run now follows the theme progress color; the <0||0> mark and hero metric label drop the accent literal (--color-accent stays defined, just unapplied).

Note for @raghav — touches two files in your lane

  • inspector_view_contract.test.ts — the view is TS-composed now, so the old DOM-id pinning is gone. It now pins the actual shell⇄view seam: stylesheets + bundle linked, CSP grants everything the view needs, brand token present. IDs/classes are internal to the view and free to change.
  • packaging.test.ts — required-assets list swaps inspector.html/.css for brand.css/layout.css to match.

No fixture-loader changes. Message protocol (runlabel/iteration/warming/completed/refresh/ping) is unchanged.

Verified

  • Build + typecheck + full unit suite green on this tree in a clean worktree (79 passed / 2 skipped).
  • A follow-up PR stacks on this one with the inspector frame-race fix (watcher delivery gate + template atomic writes).

🤖 Generated with Claude Code

…split

Replace the static media/inspector.{html,css} markup with a TS-composed
view: atoms (text/pill/icon) -> components (metric/preview) -> view
(views/inspector.ts), each owning its styles via constructable
stylesheets (style.ts registry). Design values live in brand.css
(tokens); composition in layout.css (formal selectors); the shell
(run_inspector.ts) owns only CSP/nonce/stylesheet wiring, and the
webview entry (inspector_webview.ts) is pure mount + message plumbing.

Also de-yellows the inspector: --color-run now follows the theme's
progress color, and the <0||0> mark / hero metric label drop the accent
literal (--color-accent stays defined in brand.css, just unapplied).

Contract test now pins the shell<->view seam (stylesheets + bundle
linked, CSP grants, brand token present) instead of DOM ids — ids are
internal to the view. packaging.test's required-assets list swaps
inspector.{html,css} for brand.css/layout.css to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kateebonner kateebonner closed this Jul 2, 2026
@kateebonner kateebonner reopened this Jul 2, 2026
@kateebonner
kateebonner merged commit 68c8fb7 into main Jul 3, 2026
8 checks passed
@kateebonner
kateebonner deleted the kate/inspector-view-reorg branch July 3, 2026 01:08
@kateebonner
kateebonner restored the kate/inspector-view-reorg branch July 3, 2026 01:12
@kateebonner
kateebonner deleted the kate/inspector-view-reorg branch July 3, 2026 01:12
@kateebonner
kateebonner restored the kate/inspector-view-reorg branch July 3, 2026 01:12
@kateebonner
kateebonner deleted the kate/inspector-view-reorg branch July 3, 2026 01:12
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