fix(webui): icons clipped in the console sidebar and cards - #7
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 noviewBox. The Lucide paths are drawn on a 24×24 grid, but they're referenced from 16–20px<svg>elements. Without aviewBoxthere'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'sviewBoxand 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