Skip to content

fix(shell-docs): drop lucideIconsPlugin, which can't resolve our icon names - #8410

Open
Laptopmini wants to merge 1 commit into
CopilotKit:mainfrom
Laptopmini:fix/8409-lucide-icon-warnings
Open

Laptopmini wants to merge 1 commit into
CopilotKit:mainfrom
Laptopmini:fix/8409-lucide-icon-warnings

Conversation

@Laptopmini

@Laptopmini Laptopmini commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #8409. liveSource and referenceSource used Fumadocs' stock lucideIconsPlugin(). That plugin looks each icon up by its bare Lucide name, but every icon in src/content has a prefix (lucide/Play, custom/a2a). So it warned Unknown icon detected for each one and set the icon to undefined. That's 240 lines in next build and 480 more from next start while the pages are served.

Nothing reads those tree icons. strip() in live-nav.ts drops them from the sidebar, the cookbook draws its logos from folderSource() (which never had the plugin) through RECIPE_ICONS, and breadcrumbs() in llms/live-search.ts ignores them. So this PR removes the plugin from both loaders, with a comment on why. It's one file, and lucide-react stays because other components use it.

A resolver that understands the prefixes would also silence the warnings. I left that out because nothing would render those icons today.

Verified on main 7b88608, before and after, in the same worktree (Node 24.14.1, fumadocs-core 16.17.8, next 16.4.2). I ran the steps from test_unit-shell-docs.yml:

before after
next build 2>&1 | grep -c "Unknown icon detected" 240 0
same in next start log while serving every page 480 0
other build warnings (CSS optimizer, >1000 routes) same same
typecheck, lint, check-live-mdx pass, 571/571
check-redirects / check-live-pages / check-page-inventory 1042/1042, 460/460, unchanged

I also fetched all 464 page URLs from check-live-pages (plus /, /llms.txt, /llms-full.txt, /cookbook) from both builds and compared them. The server-rendered HTML is identical on every page once chunk filenames and the build ID are masked, including the cookbook logos. The RSC payload is the same length on every page and differs only in row order and reference IDs.

Not verified: I didn't screenshot the pages, since the rendered HTML is identical.

The commit-msg commitlint hook couldn't run in my worktree because it has no root node_modules. I ran commitlint by hand on the message with the same commitlint.config.js (it passed), then committed with only that hook skipped. All pre-commit hooks ran and passed.

Related PRs and Issues

Checklist

  • I have read the Contribution Guide
  • If the PR changes or adds functionality, I have updated the relevant documentation (no functional change)
  • If the PR contains a breaking change, the title has ! (for example feat(react-core)!: ...) and the description has a BREAKING CHANGE: line with migration steps. See VERSIONING.md (not breaking)
  • "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

Summary by CodeRabbit

  • Refactor
    • The live sidebar no longer uses the icon plugin. Navigation titles continue to be supported. This may change which icons are available in the live sidebar.

… names

Every icon in src/content is a prefixed name (lucide/Play, custom/a2a), so
the stock plugin warned "Unknown icon detected" about 240 times per build and
again on next start, then dropped the icon. Nothing reads these tree icons:
the sidebar strips them and the cookbook maps its own through folderSource.

Closes CopilotKit#8409
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The live and reference content sources no longer register lucideIconsPlugin. liveSource retains navTitlePlugin, and comments describe icon naming and sidebar handling.

Changes: Icon plugin registration

Layer / File(s) Summary
Update content source plugins
showcase/shell-docs/src/lib/live-source.ts
liveSource and referenceSource no longer register lucideIconsPlugin. liveSource retains navTitlePlugin. Comments describe icon naming and sidebar handling.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · up to 78eef

This removes the icon plugin that produced build and start warnings. Rendered output is reported unchanged, and the change is easy to revert. Merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: removing lucideIconsPlugin from shell-docs, which the author says cannot resolve the prefixed icon names. The raw summary confirms liveSource and referenceSource no longer …
Linked Issues check Passed Issue #8409 asks for a clean shell-docs build log, with no "Unknown icon detected" warnings from lucideIconsPlugin, and no change in output. The diff for showcase/shell-docs/src/lib/live-source.ts rem…
Out of Scope Changes check Passed The whole-PR diff against merge base 7b88608 touches only showcase/shell-docs/src/lib/live-source.ts (+4/-3). Every change is the plugin removal or the explanatory comment that describes it. No unr…
Full details: Title check

Explanation

The title names the change: removing lucideIconsPlugin from shell-docs, which the author says cannot resolve the prefixed icon names. The raw summary confirms liveSource and referenceSource no longer register the plugin, so the title matches the changeset. It uses the conventional fix(scope) prefix and fits within 75 characters.

Full details: Linked Issues check

Explanation

Issue #8409 asks for a clean shell-docs build log, with no "Unknown icon detected" warnings from lucideIconsPlugin, and no change in output. The diff for showcase/shell-docs/src/lib/live-source.ts removes the lucideIconsPlugin import and its use from both liveSource and referenceSource. navTitlePlugin stays on liveSource. This removes the source of the warnings, which the issue names as the expected fix. The PR description reports, without rerun here, that the warning count drops from 240 to 0 at build and from 480 to 0 under next start, and that server-rendered HTML is unchanged on the fetched pages. The issue's claim that no reader uses these tree icons (strip() in live-nav.ts, folderSource() for cookbook logos, breadcrumbs() in live-search.ts) is consistent with the issue text. I did not re-inspect those readers. The issue's optional prefix-aware plugin is not required.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against merge base 7b88608 touches only showcase/shell-docs/src/lib/live-source.ts (+4/-3). Every change is the plugin removal or the explanatory comment that describes it. No unrelated code, dependencies, or tests are changed. lucide-react is not removed, as the PR description states.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7b88608 and 78eef43.

Files selected for processing: 1

  • showcase/shell-docs/src/lib/live-source.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
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.

🐛 Bug: shell-docs build logs ~240 "Unknown icon detected" warnings from lucideIconsPlugin

1 participant