Skip to content

Remove unused icon component and Rive AI-icon hook#4313

Open
wojtekn wants to merge 2 commits into
trunkfrom
remove-dead-icons
Open

Remove unused icon component and Rive AI-icon hook#4313
wojtekn wants to merge 2 commits into
trunkfrom
remove-dead-icons

Conversation

@wojtekn

@wojtekn wojtekn commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • N/A

How AI was used in this PR

Follow-up to #4293. Used Claude Code with Knip to identify unused UI code, then manually verified each finding had no references (including dynamic/string references and test mocks) before removing it. The Rive removal footprint (asset, test mock, dependency, and Vite bundling) was traced by hand.

Proposed Changes

Removes two pieces of dead UI code and their supporting infrastructure. No user-visible impact — neither was rendered anywhere. This trims an unused animation dependency and its WASM bundling, slightly reducing install and build surface.

  • Removes an unused SVG icon component that nothing referenced.
  • Removes the unused animated AI icon hook along with its Rive animation asset, its test mock, the @rive-app/react-canvas dependency, and the Rive-specific WASM copying in the Electron Vite config.

Testing Instructions

  • npm run typecheck passes across all workspaces.
  • npm test -- apps/studio passes (684 tests) — confirms removing the use-ai-icon test mock had no fallout.
  • npx knip no longer reports the two icons, and @rive-app/* is fully gone from the dependency graph.
  • Smoke-test the app (especially the AI/assistant surfaces) to confirm no missing-icon regression

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

wojtekn added 2 commits July 23, 2026 16:45
Deletes the dead useAiIcon hook, its .riv asset and test mock, the @rive-app/react-canvas dependency, and the associated Rive/WASM bundling in the Electron Vite config. The wasm() plugin and **/*.wasm handling are kept for PHP-WASM/Playground.
@wojtekn
wojtekn requested a review from a team July 23, 2026 15:13
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 9cfb1cb vs trunk

app-size

Metric trunk 9cfb1cb Diff Change
App Size (Mac) 1362.04 MB 1358.38 MB 3.66 MB 🟢 -0.3%

site-editor

Metric trunk 9cfb1cb Diff Change
load 1111 ms 1049 ms 62 ms 🟢 -5.6%

site-startup

Metric trunk 9cfb1cb Diff Change
siteCreation 6517 ms 6541 ms +24 ms ⚪ 0.0%
siteStartup 2388 ms 2394 ms +6 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@wojtekn
wojtekn requested a review from youknowriad July 24, 2026 10:24
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.

2 participants