Skip to content

feat(electron): render source SVG icons inline for theme-aware coloring#581

Open
kennyheard wants to merge 1 commit intolukilabs:mainfrom
kennyheard:feat/source-inline-svg-icons
Open

feat(electron): render source SVG icons inline for theme-aware coloring#581
kennyheard wants to merge 1 commit intolukilabs:mainfrom
kennyheard:feat/source-inline-svg-icons

Conversation

@kennyheard
Copy link
Copy Markdown

Summary

  • Server pre-reads SVG icon files at source load time (rawSvg on LoadedSource)
  • SourceAvatar resolves via resolveRawSvgIcon for inline rendering with currentColor normalization
  • Same approach as tool icons — no changes to useEntityIcon or icon-cache.ts
  • Non-SVG icons, emojis, and favicon fallback unchanged

Test plan

  • Sources with SVG icons render inline (inspect DOM — should be <svg> not <img>)
  • Icons inherit text color (toggle light/dark mode)
  • Sources with emoji icons still work
  • Sources without icons fall back to favicon
  • Sources with raster icons (PNG) render as before

🤖 Generated with Claude Code

Server pre-reads SVG icon files at source load time and includes the raw
content on LoadedSource. SourceAvatar resolves it with resolveRawSvgIcon
for inline rendering with currentColor normalization — same approach as
tool icons. Non-SVG icons, emojis, and favicon fallback continue through
the existing useEntityIcon path.
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