Commit Graph

1 Commits

Author SHA1 Message Date
nesquena-hermes 0f594ec714 fix: register 5 missing Lucide icons (TTS speaker + queue chevron + insights cards) (#1413)
The li() helper in static/icons.js logs console.warn and returns ''
when an icon name is not in LI_PATHS. Five icon names referenced by
static/*.js were never registered, so their host elements rendered as
empty 0-size buttons / containers despite display:flex.

Five missing icons added:

  - 'volume-2'    — TTS speaker on every assistant message
                    (ui.js:3376; regression from #499; surfaced after
                    #1411 fixed CSS specificity in v0.50.255)
  - 'chevron-up'  — queue pill chevron (ui.js:2178; the '▲' fallback
                    only fired when li was undefined, not when it
                    returned '')
  - 'hash'        — Insights 'Messages' stat card (panels.js:883)
  - 'cpu'         — Insights 'Tokens' stat card (panels.js:884)
  - 'dollar-sign' — Insights 'Cost' stat card (panels.js:885)

The Insights icons are a fresh regression from #1405 (v0.50.255).

Adds tests/test_issue1413_li_path_coverage.py — three tests:

  1. Walk every li('NAME', ...) call across static/*.js, assert NAME
     is registered in LI_PATHS. Prevents the entire class of bug.
  2. Pin the five icons added by this fix so removal gets a clear
     error message.
  3. Pin the warn+empty-string contract of li() so the diagnostic
     story in the test docstring stays accurate.

Reported by @AvidFuturist via Telegram, 2026-05-01.

Fixes #1413
2026-05-01 17:57:34 +00:00