Skip to content

fix(webui): icons clipped in the console sidebar and cards - #7

Merged
krugis merged 1 commit into
mainfrom
claude/epic-heisenberg-5m3wi7
Jul 23, 2026
Merged

fix(webui): icons clipped in the console sidebar and cards#7
krugis merged 1 commit into
mainfrom
claude/epic-heisenberg-5m3wi7

Conversation

@krugis

@krugis krugis commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Problem

Icons in the web console (sidebar nav, card headers, stat tiles, section headers) rendered cut off on the right and bottom edges.

The inline icon sprite defined each glyph as <g id="…"> with no viewBox. The Lucide paths are drawn on a 24×24 grid, but they're referenced from 16–20px <svg> elements. Without a viewBox there's no scaling — the 24-unit artwork is clipped to the smaller box.

Fix

Change the sprite definitions from <g id="…"> to <symbol id="…" viewBox="0 0 24 24">. A <use> that references a <symbol> adopts the symbol's viewBox and scales the glyph to the host <svg>'s size, so every icon renders complete. The referencing markup (<svg class="icon"><use href="#…"/></svg>) is unchanged.

Verification

Built the binary, ran the console, and screenshotted the dashboard — all nav, card, stat-tile, and section icons now render fully with no clipping. Single-file HTML change, no application code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JgWPXefHtzYcspK8zo4Bo6


Generated by Claude Code

The inline icon sprite used <g id="…"> definitions with no viewBox, so
each 24×24 Lucide glyph rendered at 24 user units inside a 16–20px <svg>
and got clipped on the right and bottom edges.

Switch the sprite definitions to <symbol id="…" viewBox="0 0 24 24">. A
<use> that references a symbol adopts its viewBox and scales the glyph to
the host <svg>'s size, so every icon now renders complete. Referencing
markup is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JgWPXefHtzYcspK8zo4Bo6
@krugis
krugis merged commit 2afccbf into main Jul 23, 2026
3 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.

2 participants