Skip to content

Remove unused Expo Router template files that duplicate the Colors palette #65

@kmch4n

Description

@kmch4n

Summary

A self-contained cluster of files from the original Expo Router template is still in the repo but is not referenced by any application code. They use a different Colors palette than the one the app actually uses (src/constants/colors.ts), reference a global.css that the rest of the app never loads, and present an outdated mental model to anyone reading the repo for the first time.

Problem

Verified by grep -r against src/: the cluster only references itself. No file under src/app/, src/components/{VideoCard,VideoCardCompact,FilterBar,...}, hooks, services, or repos imports any of these.

Cluster:

  • src/components/themed-text.tsx
  • src/components/themed-view.tsx
  • src/components/hint-row.tsx — imports themed-text + themed-view
  • src/components/web-badge.tsx — imports themed-text + themed-view
  • src/components/external-link.tsx
  • src/components/animated-icon.tsx + animated-icon.web.tsx (+ its companion animated-icon.module.css)
  • src/components/ui/collapsible.tsx — imports themed-text + themed-view
  • src/hooks/use-color-scheme.ts + use-color-scheme.web.ts
  • src/hooks/use-theme.ts — imports constants/theme + use-color-scheme
  • src/constants/theme.ts — exports a second Colors object that conflicts with src/constants/colors.ts, plus Fonts, Spacing, BottomTabInset, MaxContentWidth. Imports @/global.css.
  • src/global.css — only loaded by constants/theme.ts, which is itself only loaded by use-theme, which is only loaded by the dead cluster.

The active app uses Colors from src/constants/colors.ts (Alpine Blue palette), useColorScheme directly from react-native (src/app/_layout.tsx:6), and expo-symbols for icons via src/components/ui/Icon.tsx. Nothing in the active code path needs anything from this cluster.

Impact

  • New contributors hit two different Colors exports and two different theming approaches and don't know which is canonical.
  • Bundle size bloat (small but non-zero — Spline Sans / SF Pro Rounded font-stack CSS variables, multiple useThemeColor indirections).
  • area:web thinking is muddled: web-badge.tsx looks like a Web feature but isn't wired up anywhere.

Relevant files

All the files listed above. Removing them should not require any other code change. Verified via grep — the cluster has no external importers.

Proposed fix

Delete the cluster as a single PR:

  • src/components/{themed-text,themed-view,hint-row,web-badge,external-link,animated-icon,animated-icon.web,animated-icon.module.css,ui/collapsible}
  • src/hooks/{use-color-scheme,use-color-scheme.web,use-theme}
  • src/constants/theme.ts
  • src/global.css

Run npm run lint and a manual smoke test on iOS to confirm nothing was implicitly resolved (e.g. via Metro). The smoke surface to verify is small: home → import → detail → calendar → dashboard → settings → all sub-settings.

Acceptance criteria

  • Files deleted.
  • Lint passes.
  • iOS app boots, all 5 tabs render, no missing-module red box.
  • A single canonical Colors and a single theme system remain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:lowLow prioritytech-debtCode health and maintainability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions