Skip to content

chore(ui): remove 8 unreferenced dead code files (~1,186 lines)#7883

Closed
jeffa-block wants to merge 1 commit intoblock:mainfrom
jeffa-block:jeffa/remove-dead-code-files
Closed

chore(ui): remove 8 unreferenced dead code files (~1,186 lines)#7883
jeffa-block wants to merge 1 commit intoblock:mainfrom
jeffa-block:jeffa/remove-dead-code-files

Conversation

@jeffa-block
Copy link
Copy Markdown
Contributor

Why

These 8 files have zero imports anywhere in the codebase — no direct imports, no barrel exports, no lazy/dynamic imports. They appear to be features that were built but never wired in, or were superseded by different implementations.

What

Remove 8 files totalling ~1,186 lines:

File Lines Likely history
InterruptionHandler.tsx 236 UI component for interruption detection — logic moved to inline handling in ChatInput.tsx
useRecipeManager.ts 324 Recipe management hook — replaced by inline logic
ScheduleFromRecipeModal.tsx 138 Recipe scheduling modal — unused
sessionCache.ts 130 Session caching utility — never wired in
WaveformVisualizer.tsx 113 Audio waveform visualisation — never wired into any view
RecipeExpandableInfo.tsx 98 Recipe info accordion — unused
CustomRadio.tsx 81 Custom radio button component — unused
RecipeInfoModal.tsx 66 Recipe info modal — unused

How to review

Verify each file has zero references:

for f in sessionCache CustomRadio WaveformVisualizer InterruptionHandler RecipeExpandableInfo RecipeInfoModal useRecipeManager ScheduleFromRecipeModal; do
  echo "$f: $(grep -rl "$f" ui/desktop/src/ --include='*.tsx' --include='*.ts' | grep -v "$f" | wc -l) references"
done

Testing

  • npm run build in ui/desktop — should compile cleanly (no imports to break)
  • npm run test — no test files reference these components

Remove files with zero imports across the entire codebase:

Components:
- InterruptionHandler.tsx (236 lines) — UI for interruption detection,
  superseded by inline logic in ChatInput.tsx
- WaveformVisualizer.tsx (113 lines) — audio waveform visualisation,
  never wired into any view
- CustomRadio.tsx (81 lines) — custom radio button component, unused
- RecipeExpandableInfo.tsx (98 lines) — recipe info accordion, unused
- RecipeInfoModal.tsx (66 lines) — recipe info modal, unused
- ScheduleFromRecipeModal.tsx (138 lines) — recipe scheduling modal,
  unused

Hooks:
- useRecipeManager.ts (324 lines) — recipe management hook, unused

Utils:
- sessionCache.ts (130 lines) — session caching utility, unused

Verified: no barrel exports, no dynamic imports, no lazy() references.
Total: 8 files, ~1,186 lines removed.
DOsinga pushed a commit that referenced this pull request Mar 26, 2026
…code

Squash of cleanup PRs #7872#7883:
- Remove debug console.log from main.ts, App.tsx, renderer.tsx,
  settings components, session sharing, extensions, and core components
- Upgrade extensions config save failure from debug to warn
- Remove stale TODO referencing non-existent doc in experiments.rs
- Remove stale comment in CardHeader.tsx
- Remove 8 unreferenced dead code files (~1,186 lines):
  InterruptionHandler, WaveformVisualizer, RecipeExpandableInfo,
  RecipeInfoModal, ScheduleFromRecipeModal, CustomRadio,
  useRecipeManager, sessionCache
@DOsinga
Copy link
Copy Markdown
Collaborator

DOsinga commented Mar 26, 2026

Squashed into #8142

@DOsinga DOsinga closed this Mar 26, 2026
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