refactor(web): one icon system — vendor the settings glyphs, drop lucide-solid #267
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab!267
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/199"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #199
Consolidates the SPA back to a single icon mechanism: the vendored
Iconcomponent (ADR-0019). The settings rework (#198) had introducedlucide-solidas a package dependency for its section/category icons, so the app was carrying two delivery mechanisms for the same Lucide designs.What changed
Icon.tsx— twelve glyphs vendored into theIconNameunion andGLYPHSmap:bell,bot,calendar-clock,container,folder-input,lock-keyhole,plane-landing,plug,settings-2,triangle-alert,chevron-left,chevron-right. Every child is apath/rect/circle— all in the file's known-tag set, so no<line>-style workaround was needed. The component's API and<svg>attributes are untouched.SettingsCategory.icon— now anIconNamestring instead of a component reference, so the shared layout renders it. TheLucideProps-typedSettingsIconalias is gone and the two registries no longer import anything to name an icon.SettingsLayout.tsx— the row icon and both chevrons render throughIconat the same sizes and classes (.settings-index-icon,.settings-index-chevronstay load-bearing forsettings-ia.css). The<svg>staysaria-hidden; the accessible name stays on the enclosing control.SettingsLayout.test.tsx— the stub-icon factory is dropped (with real glyphs rendering there is nothing to stub) and the fixtures use real icon names. The row-icon assertion now pins size 20 andaria-hiddenrather than a stub'sdata-iconattribute; every other assertion is unchanged and still passes.package.json/package-lock.json—lucide-solidremoved.No icon choice changed: every category keeps the glyph it had.
Verification
Run locally against a Node 24 toolchain (the worktree shipped without one, so it was bootstrapped):
npm cinpm run lintnpm run format:checknpm testnpm run build(tsc --noEmit && vite build)Acceptance criteria checked directly rather than by eye:
grep -rn lucide web/src web/e2e→ only the ISC attribution comment inIcon.tsx.npm ls lucide-solid→ empty;grep -c lucide dist/assets/*.js→0. The new glyph paths are inlined in the built bundle.lucide-solid@1.28.0tarball was fetched and each vendored glyph diffed against theiconNodearray the package actually rendered. All twelve are byte-identical, andIcon's<svg>attributes match the package'sdefaultAttributesexactly (viewBox,fill="none",stroke="currentColor", stroke-width 2, round caps/joins) — socurrentColorinheritance and light/dark behavior are unchanged by construction.One knowing difference, flagged
git-branch(the Branches category) was already vendored — from an earlier Lucide revision than the onelucide-solid@1.28.0shipped. The old design draws the stem and the arc as two elements; the current upstream design merges them into one path with slightly different arc endpoints. Both are Lucide's own git-branch glyph.The issue's brief calls
git-branchout as already vendored, so this keeps it as-is. That is also the better outcome: the Branches icon now matches thegit-branchthe chat header already draws (ChatHeader.tsx), which is exactly the one-icon-system consistency this change exists for. Changing the vendored glyph instead would have altered an icon outside the settings UI, beyond this issue's scope.Not run locally
The Go half of CI (
go build -tags ui,go test -tags ui,golangci-lint) — no Go toolchain in this environment. The diff is web + docs only and touches nothing the Go side reads beyondweb/dist, which builds cleanly above. CI covers it.[autoland] verdict: pass
Validated against ci / native (pull_request) — green in 8m27s, and that job is unconditional (no path gate), running the full SPA gate (npm ci, lint, format:check, test, build) plus go build/test -tags ui and golangci-lint against the embedded dist. Diff matches issue #199's brief exactly: all twelve glyphs vendored into IconName/GLYPHS, SettingsCategory.icon retyped to IconName, SettingsLayout renders row icon + both chevrons through Icon at the same sizes and load-bearing classes, lucide-solid dropped from package.json and the lockfile, ADR-0019 noted rather than superseded. grep confirms no lucide reference survives outside the ISC attribution comment in Icon.tsx, and no SettingsIcon or data-icon reference is left dangling. No drive-by changes.