Skip to content

refactor: icons chunk#4567

Draft
jog1t wants to merge 1 commit into03-25-refactor_frontend_actor_list_upliftfrom
04-06-refactor_icons_chunk
Draft

refactor: icons chunk#4567
jog1t wants to merge 1 commit into03-25-refactor_frontend_actor_list_upliftfrom
04-06-refactor_icons_chunk

Conversation

@jog1t
Copy link
Copy Markdown
Contributor

@jog1t jog1t commented Apr 6, 2026

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link
Copy Markdown

railway-app bot commented Apr 6, 2026

🚅 Deployed to the rivet-pr-4567 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-cloud 😴 Sleeping (View Logs) Web Apr 6, 2026 at 9:57 pm
website 😴 Sleeping (View Logs) Web Apr 6, 2026 at 9:56 pm
frontend-inspector 😴 Sleeping (View Logs) Web Apr 6, 2026 at 9:55 pm
kitchen-sink ❌ Build Failed (View Logs) Web Apr 6, 2026 at 9:47 pm
mcp-hub ✅ Success (View Logs) Web Apr 6, 2026 at 9:45 pm
ladle ❌ Build Failed (View Logs) Web Apr 6, 2026 at 9:44 pm

Copy link
Copy Markdown
Contributor Author

jog1t commented Apr 6, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jog1t jog1t mentioned this pull request Apr 6, 2026
11 tasks
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 6, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4567

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4567

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4567

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4567

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4567

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4567

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4567

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4567

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4567

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4567

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4567

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4567

commit: e46d451

@claude
Copy link
Copy Markdown

claude bot commented Apr 6, 2026

PR Review: refactor: icons chunk

This PR adds ~3,000 individual per-icon chunk files to frontend/packages/icons/dist/icons/, splitting what was previously a monolithic bundle into tree-shakeable ESM files. The goal is clear and the approach is sound, but there are a few issues to address before this can merge.


Issues

1. CLAUDE.md is out of sync with the new workflow

frontend/packages/icons/CLAUDE.md currently instructs contributors to commit only:

  • manifest.json
  • src/index.gen.js
  • src/index.gen.ts
  • dist/index.js

Now that the build produces thousands of dist/icons/*.js chunk files, this guidance is stale. The instructions should be updated to include dist/icons/*.js (and dist/icon-component.js) so future contributors know what to commit after running pnpm generate.

2. Missing source files (src/index.gen.js, src/index.gen.ts)

The CLAUDE.md says these generated source files should be committed alongside the dist output. They are not in this PR. Are they unchanged? If they changed (e.g., index.gen.js no longer contains the inlined Icon function since it's been extracted to a separate entry), those changes should be included here for consistency.

3. dist/icon-component.js is included but dist/index.js is not

dist/icon-component.js is a new addition (re-exports Icon from a dedicated entry). Confirm dist/index.js was already updated on the base branch to include export { Icon } from "./icon-component.js"; — otherwise this split could break the import { Icon } from "@rivet-gg/icons" path.

4. Per-file CJS shim overhead

Each icon file (~67 lines) includes ~45 lines of identical CommonJS compatibility boilerplate from esbuild. This is expected since @fortawesome/free-solid-svg-icons ships CJS, and the bundler inlines the shim per output file. Worth noting in case a future optimization (e.g., pre-converting FA to ESM before bundling) could reduce per-file overhead significantly.


Minor Notes

  • The icon-component.js wrapper (createElement(FontAwesomeIcon, props)) is thin but the separate entry point is a clean architectural boundary — it keeps icon data imports separate from the React component, which is good for bundler analysis.
  • PR description is empty and checklist unchecked. Fine for a DRAFT, but should be filled before marking ready for review.
  • Stacked on 03-25-refactor_frontend_actor_list_uplift — the base branch must merge first.

Summary

The chunking strategy is correct and the vendor-icons.js build script (on the base branch) handles the case-insensitive filesystem collision for alias icons correctly. The main action item is updating CLAUDE.md to document that dist/icons/*.js and dist/icon-component.js are now part of the committed output, and confirming the src/index.gen.* files are accounted for.

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