Skip to content

Replace lucide-react with Phosphor (bold), ban Sparkle - #118

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-icons-phosphor
Aug 20, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-icons-phosphor

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Owner ruling: Phosphor (@phosphor-icons/react, bold weight) replaces lucide-react as the one icon library across apps/web and every UI package; the Sparkle/Sparkles glyph is banned outright (owner never wants to see a generic sparkles glyph again).
  • New @corbits/icons package: the curated Phosphor re-export surface every app/package imports glyphs through, plus BoldIconProvider — an IconContext wrapper mounted once at apps/web's root (app.tsx) so bold weight applies everywhere without repeating the prop at each call site. Deliberately just re-exports + one provider, extraction-ready for corbitsdev/react-ui (see the header comment in packages/icons/src/index.tsx).
  • Every lucide-react import in apps/web and packages/{api-query,artifact-ui,bench-ui,chat-ui,plugins-ui,settings-ui,tasks-ui} now routes through @corbits/icons. lucide-react removed from every package.json; no physical install remains (only referenced as @corbits/react-ui's own upstream peer dependency, out of scope here).
  • Guard: eslint.config.ts gained a no-restricted-imports rule banning lucide-react and direct @phosphor-icons/react imports outside packages/icons/src, and a no-restricted-syntax rule banning any Sparkle/Sparkles import from anywhere. Verified all three trip correctly.

Glyph mapping (lucide → Phosphor, bold)

lucide Phosphor Notes
ArrowDown ArrowDown
ArrowDownUp ArrowsDownUp
ArrowLeft ArrowLeft
ArrowUp ArrowUp
Bell Bell
Blocks SquaresFour
Bot Robot Agents nav + empty states
Cable Plugs
ChartColumn ChartBar Insights nav
ChevronDown CaretDown
ChevronLeft CaretLeft
ChevronRight CaretRight
CircleAlert WarningCircle
Clock Clock
Compass Compass
Copy Copy
Cpu Cpu
ExternalLink ArrowSquareOut
FileQuestion FileDashed
FileStack Stack
FileText FileText
GitBranch GitBranch
GitPullRequest GitPullRequest
Hash Hash
KeyRound Key
Library FolderOpen Files nav
Link LinkSimple
List ListBullets
Loader2 CircleNotch
Lock Lock
LogOut SignOut
LucideIcon (type) Icon (type)
Maximize2 ArrowsOut
MessageSquare ChatCircle
MessageSquarePlus ChatCircleDots
Mic Microphone
Minimize2 ArrowsIn
MoreHorizontal DotsThree
Paperclip Paperclip
Pencil PencilSimple
Pin PushPin
PinOff PushPinSlash
PlayCircle PlayCircle
Plug PuzzlePiece Plugins nav + MCP servers section
Plus Plus
Repeat Repeat
Reply ArrowBendUpLeft
RotateCw ArrowClockwise
Search MagnifyingGlass
Send PaperPlaneRight
Shield Shield
SlidersHorizontal SlidersHorizontal
SmilePlus Smiley reaction picker trigger
Sparkles Lightning Skills nav, skills empty states, skill card icon — banned glyph replaced with a purposeful one
Sparkles Cpu "Default model & fallbacks" section header — a model-routing concept, not a skill
Star Star
SunMoon MoonStars
TriangleAlert Warning
User User
UserPlus UserPlus
UserRound UserCircle
Users Users
Workflow FlowArrow
X X

Coordination

Siblings cl-6368-shell-polish, cl-6369-urls, cl-6362-routines-global were in flight and may add new lucide-react imports concurrently — the eslint guard added here (no-restricted-imports + no-restricted-syntax) catches any straggler import on rebase/merge, so nothing slips back in.

Test plan

  • tsc --noEmit clean on every touched package (api-query, artifact-ui, bench-ui, chat-ui, icons, plugins-ui, settings-ui, tasks-ui, apps/web)
  • bun test clean in every touched package dir (940+ package tests, 578 apps/web tests)
  • bun run check:ui-vocabulary — ok
  • bun run check:react-ui-drift — ok
  • apps/web production build (bun run build) succeeds
  • Confirmed the new eslint rules reject a lucide-react import, a direct @phosphor-icons/react import, and a Sparkle import
  • No mixed weights: grepped for any weight="..." prop other than "bold" — none found (weight enforced globally via BoldIconProvider)

Owner ruling: Phosphor (@phosphor-icons/react) is now the one icon
library, bold is the only weight, and the Sparkle/Sparkles glyph is
banned outright — every former sparkle spot now carries a glyph that
means something specific to what it marks (Lightning for Skills, Cpu
for the model-routing header).

- New @corbits/icons package: the curated Phosphor re-export every
  app/package imports glyphs through, plus BoldIconProvider (an
  IconContext wrapper mounted once at apps/web's root) so weight
  stays bold everywhere without repeating the prop at each call site.
  Extraction-ready for corbitsdev/react-ui per its own header comment.
- Every lucide-react import across apps/web and packages/{api-query,
  artifact-ui,bench-ui,chat-ui,plugins-ui,settings-ui,tasks-ui} now
  routes through @corbits/icons; lucide-react dropped from every
  package.json and the lockfile.
- eslint.config.ts: no-restricted-imports bans lucide-react and
  @phosphor-icons/react outside packages/icons/src; no-restricted-syntax
  bans importing Sparkle/Sparkles from anywhere.

Glyph mapping (lucide -> Phosphor, bold):
  ArrowDown -> ArrowDown, ArrowDownUp -> ArrowsDownUp,
  ArrowLeft -> ArrowLeft, ArrowUp -> ArrowUp, Bell -> Bell,
  Blocks -> SquaresFour, Bot -> Robot, Cable -> Plugs,
  ChartColumn -> ChartBar, ChevronDown -> CaretDown,
  ChevronLeft -> CaretLeft, ChevronRight -> CaretRight,
  CircleAlert -> WarningCircle, Clock -> Clock, Compass -> Compass,
  Copy -> Copy, Cpu -> Cpu, ExternalLink -> ArrowSquareOut,
  FileQuestion -> FileDashed, FileStack -> Stack, FileText -> FileText,
  GitBranch -> GitBranch, GitPullRequest -> GitPullRequest,
  Hash -> Hash, KeyRound -> Key, Library -> FolderOpen (Files nav),
  Link -> LinkSimple, List -> ListBullets, Loader2 -> CircleNotch,
  Lock -> Lock, LogOut -> SignOut, LucideIcon (type) -> Icon,
  Maximize2 -> ArrowsOut, MessageSquare -> ChatCircle,
  MessageSquarePlus -> ChatCircleDots, Mic -> Microphone,
  Minimize2 -> ArrowsIn, MoreHorizontal -> DotsThree,
  Paperclip -> Paperclip, Pencil -> PencilSimple, Pin -> PushPin,
  PinOff -> PushPinSlash, PlayCircle -> PlayCircle,
  Plug -> PuzzlePiece (Plugins nav + MCP servers), Plus -> Plus,
  Repeat -> Repeat, Reply -> ArrowBendUpLeft, RotateCw -> ArrowClockwise,
  Search -> MagnifyingGlass, Send -> PaperPlaneRight, Shield -> Shield,
  SlidersHorizontal -> SlidersHorizontal, SmilePlus -> Smiley,
  Sparkles (Skills nav/empty states/skill icon) -> Lightning,
  Sparkles (default-model routing header) -> Cpu, Star -> Star,
  SunMoon -> MoonStars, TriangleAlert -> Warning, User -> User,
  UserPlus -> UserPlus, UserRound -> UserCircle, Users -> Users,
  Workflow -> FlowArrow, X -> X

Verified: tsc + bun test clean on every touched package
(api-query, artifact-ui, bench-ui, chat-ui, icons, plugins-ui,
settings-ui, tasks-ui, apps/web — 578 web tests, 940+ across
packages), check:ui-vocabulary, check:react-ui-drift, and
apps/web's production build all pass. Confirmed the new eslint
rules reject a lucide-react import, a direct @phosphor-icons/react
import, and a Sparkle import.
@TheGreatAxios
TheGreatAxios merged commit 58c82ef into main Aug 20, 2026
0 of 2 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-icons-phosphor branch August 25, 2026 15:29
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