Skip to content

feat(docs-site): render card icons from lucide with legacy name aliases#96

Merged
steipete merged 1 commit into
mainfrom
docs-landing-icons
Jul 9, 2026
Merged

feat(docs-site): render card icons from lucide with legacy name aliases#96
steipete merged 1 commit into
mainfrom
docs-landing-icons

Conversation

@steipete

@steipete steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Related: openclaw/openclaw#102878

What Problem This Solves

Docs author card icons with lucide names plus a long tail of Font Awesome-style names (165 distinct icon="..." values in the current corpus), but the shell renderer only knew 9 hand-drawn paths. Every other name — including most of the landing page's "Key capabilities", "Start here", and "Learn more" grids — rendered the same generic fallback tile.

Why This Change Was Made

Resolve card/tile/CTA icons from the lucide package (build-time devDependency, exact-pinned, ISC) instead of a hand-maintained path table, matching docs.json's icons.library: "lucide" used by the Mintlify backup. Legacy Font Awesome-style names map through a small ICON_ALIASES table (gear -> settings, magnifying-glass -> search, ...); unknown names keep the generic fallback so a typo never breaks a build. The 9 curated paths are deleted — one icon system now owns the look.

User Impact

Card grids across the docs show real, distinct icons instead of repeated fallback tiles. This also unblocks the landing-page redesign (openclaw/openclaw#102880: new hero + fourth "Connect a Channel" card using message-circle).

Evidence

Landing page "Key capabilities" grid, production vs local shell preview build:

Before (production) After (this PR + landing redesign)
before icons after icons
  • Icon audit: all 165 icon names used in docs/** resolve via alias+lucide (temp script over the corpus; only slack needed a judgment call -> hash, lucide ships no brand marks).
  • make docs-check-shell passes (shell build + smoke: shell, routing, skin, hidden fixture).
  • node --test scripts/docs-site/frontmatter.test.mjs passes.
  • Lockfile diff is the single lucide@1.24.0 addition.

Docs author icons with lucide names plus a long tail of Font Awesome-style
names; the shell only knew 9 hand-drawn paths, so most cards rendered the
generic fallback tile. Resolve icons from the lucide package at build time,
map legacy names through ICON_ALIASES, and keep the fallback for unknown
names. All 165 icon names currently used in docs/ resolve.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedlucide@​1.24.01001001009680

View full report

@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Landing note on the red Validate docs code check — it is pre-existing, not from this PR:

  • The failing step is docs:visual (visual-smoke.mjs checkDesktop, mermaid-overlay goBack() wait). It reproduces locally on unmodified origin/main (2a10e88) with the exact same TimeoutError ([data-mermaid-overlay].open never hides after same-document back navigation).
  • Docs Code CI has been red on every branch since Jul 7, including dependabot-only bumps (e.g. runs on dependabot/npm_and_yarn/development-*), which cannot affect the overlay.
  • The real fix (close the mermaid overlay in the same-document popstate guard, plus the test's pushState target) is already part of refactor: adopt shared OpenClaw design system #95, so I am not duplicating it here.
  • Deployment is unaffected: r2-pages.yml runs docs:build:r2 + docs:smoke (non-visual), and both pass with this change. Locally: make docs-check-shell green, node --test scripts/docs-site/frontmatter.test.mjs green, all 165 icon names used in docs/** resolve.

@steipete
steipete merged commit 3705db9 into main Jul 9, 2026
6 of 7 checks passed
@steipete
steipete deleted the docs-landing-icons branch July 9, 2026 20:17
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