Skip to content

Swap amico.svg - #99

Merged
kateebonner merged 1 commit into
mainfrom
kate/amico-mark-refresh
Jul 9, 2026
Merged

Swap amico.svg#99
kateebonner merged 1 commit into
mainfrom
kate/amico-mark-refresh

Conversation

@kateebonner

@kateebonner kateebonner commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace packages/extension/media/amico.svg with Kate's redesigned mark
  • Consolidate to two SVG assets total: amico.svg (detailed, large contexts) and amico_reduced.svg (the same mark's outer bracket path only, no internal accents — small contexts). Both carry a single fill="currentColor" on their <svg> root (inherited by every child shape, none of which declare their own fill) — no per-file hardcoded colors, no per-consumer file variants.
  • atoms/icon.ts's inline mark is a canonical .svg file import (esbuild loader: {".svg": "text"}) instead of a hand-duplicated TS literal — the single-source-of-truth fix that prevents the exact drift this redesign otherwise re-triggered (see opencode PR β.1: amico-run thin process orchestrator (closes #1) #7, which caught the previous version of this mark going stale in the fork).

Not in this PR (scoped out on request)

Chat panel tab icon theming was cut: VS Code's webview tab icon (panel.iconPath) renders outside any live DOM, so fill="currentColor" can't resolve there — the platform's only mechanism for a theme-adaptive tab icon is two static {light, dark} files, which contradicts the two-file goal above. chat_panel.ts stays on its pre-existing single-file behavior (now pointed at the new amico.svg). The light/dark tab legibility question is deferred, not solved wrong.

Test plan

  • pnpm --filter amicode-v2 test — 431 passed, 0 failed
  • pnpm --filter amicode-v2 typecheck — clean
  • Open in the Extension Development Host and eyeball the activity-bar icon and an open chat panel tab in both a light and dark VS Code theme

@kateebonner kateebonner changed the title Swap amico.svg to the hackathon repo's mark Swap amico.svg Jul 8, 2026
kateebonner added a commit that referenced this pull request Jul 9, 2026
…ntext

The tab icon rendered solid black regardless of theme: amico_reduced.svg
carries fill="currentColor" for live-DOM consumers (icon.ts's inline
mark, which correctly inherits --vscode-foreground), but a WebviewPanel
tab icon is a static image with no DOM to inherit from — currentColor
there resolves to nothing and falls back to black.

Fix: tabIconPaths() derives the two literal-fill files VS Code's
{light,dark} iconPath API requires from the SAME single authored
amico_reduced.svg (string-substituting the fill), generated once into
globalStorageUri rather than checked into the repo — keeps the "two
authored SVG files" design while the tab icon actually adapts.

Also: package.json's activitybar/panel viewsContainers icons now point
at amico_reduced.svg instead of amico.svg — same small-size legibility
argument PR #99 already established for the tab icon and inline mark
applies here too (VS Code masks/recolors these regardless of fill, but
the fine circuit-pattern geometry still doesn't resolve at that size).
amico.svg is now unreferenced by code — kept as the large/detailed asset
for whatever future context actually renders it big enough to matter.

Tests: 433 pass (431 + 2 new for tabIconPaths), 0 fail. Typecheck clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Swaps in the redesigned Amico mark and reshapes how it is consumed so
the geometry lives in the .svg files, not in duplicated code.

Assets (media/):
- amico.svg — the detailed mark (redesigned).
- amico_reduced.svg — the same mark's outer bracket only, for small
  sizes. Both carry fill="currentColor" on the <svg> root so their
  color is driven by the host, not baked in.

logo() atom (media/ui/atoms/logo.ts, replaces icon.ts's mark()):
  logo({ variant?, fill? })
    variant "full" (default) → amico.svg;  "reduced" → amico_reduced.svg
    fill defaults to var(--vscode-foreground) (theme-responsive) via
    currentColor; overridable.
  Both files are imported as raw text (esbuild {".svg":"text"} loader +
  a matching vitest transform + svg.d.ts), so the .svg is the single
  source of truth — no path data duplicated in TS (the exact thing that
  silently drifted before). inspector.ts's brand mark now calls
  logo({ variant: "reduced" }).

Small-context consumers use the reduced mark: package.json's
activitybar/panel icons → amico_reduced.svg (VS Code auto-recolors
these monochrome masks per theme).

Chat panel native tab icon (chat_panel.ts): a WebviewPanel tab icon is
a static image with no DOM, so currentColor can't resolve there (it
rendered dark). VS Code's only theme-adaptive path is a committed
{light, dark} pair inside the extension folder — verified via probe
that an icon in globalStorageUri renders as nothing, and the .vsix
extension folder is read-only so runtime generation is impossible.
media/amico-tab-{light,dark}.svg are therefore committed, derived from
amico_reduced.svg with a theme-foreground gray fill; a unit test keeps
them in lockstep with the source geometry.

Tests: logo.test.ts (both variants, theme default, fill override) +
chat_panel_icon.test.ts (tab pair fills + geometry sync). 435 pass,
typecheck clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kateebonner
kateebonner force-pushed the kate/amico-mark-refresh branch from 576d444 to 84ab68c Compare July 9, 2026 01:23
@kateebonner
kateebonner merged commit afa9ecc into main Jul 9, 2026
5 checks 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