An audit turned up a lot of dead code: old server-side queue and library CRUD functions in Convex, unused files and exports in web and mobile, an unreachable mobile /queue screen, and five copies of formatDuration. This PR removes it without changing behavior.
Changes
Convex: removed 21 unused functions from playback.ts (the old server-side queue: playInOrder, skipNext, toggleShuffle, reorderQueue, getQueuePaginated, getSongProgress, …) and 19 from library.ts (browseSongs, browseAlbumSummary, browseAlbumTracksPaginated, getSongByName, createSong, …). Also removed playlists.browsePlaylistSummary, browsePlaylistSongsPaginated, the includeSongs arg, favorites.browseFavoritesSummary, browseFavoritesSongsPaginated, the unused BrowseAlbumSummary type, and actions.cleanupHlsStreams.
I deleted cleanupHlsStreams instead of scheduling it. Nothing ever scheduled it, the web server already evicts idle HLS jobs in server-hls.ts, and admins can still trigger adminCleanupHlsStreams from settings.
Web: deleted lib/data.ts, generateKeys.mjs (a duplicate of docker/generate-auth-keys.mjs), and the unwired lib/station-artist.test.mjs. Removed unused exports in media-links.ts, album-grid-classes.ts and selection-range-styles.tsx. The five formatDuration copies now use one lib/format-duration.ts, which keeps player-bar's flooring. The other call sites pass integer durationSeconds, so their output is unchanged.
Mobile: deleted the unreachable /queue routes (the mini player opens /(app)/player?queue=1, and no links or deep links point at /queue) and the media-actions-sheet re-export barrel; its importers now import from media-context-menu. Memoized the ConvexAuthSessionProvider value and fixed its error message, which named the wrong provider. Dropped the unused palette.background dep from the playlist screenOptions memo and formatted use-cover-palette.ts.
Not done
The ~32 one-line route re-export shims under library/, search/ and the (albums,…) group are still there. Merging home/library/search into a shared group would change the NativeTabs triggers, anchor: "library", the per-tab index/_layout screens, and the +native-intent deep link target (/(app)/(tabs)/home/...). That's a navigation refactor on both platforms, not a cleanup.
Older mobile builds on self-hosted servers
Builds from before #38 (Nov 3) call browsePlaylistSongsPaginated, browseFavoritesSongsPaginated and browsePlaylistDetail({ includeSongs: false }). Their playlist and favorites screens break against this server.
Builds from before 4a740c9 (Oct 8, client-first playback) call the old server-side queue functions and library.browseSongs.
pnpm -r typecheck (convex, web, mobile) and web eslint pass. I didn't run the app on a simulator; the only route change is deleting screens that nothing navigates to.
Changes made by Claude Opus 5.5 via Claude Code (T3 Code harness).
An audit turned up a lot of dead code: old server-side queue and library CRUD functions in Convex, unused files and exports in web and mobile, an unreachable mobile `/queue` screen, and five copies of `formatDuration`. This PR removes it without changing behavior.
## Changes
- **Convex**: removed 21 unused functions from `playback.ts` (the old server-side queue: `playInOrder`, `skipNext`, `toggleShuffle`, `reorderQueue`, `getQueuePaginated`, `getSongProgress`, …) and 19 from `library.ts` (`browseSongs`, `browseAlbumSummary`, `browseAlbumTracksPaginated`, `getSongByName`, `createSong`, …). Also removed `playlists.browsePlaylistSummary`, `browsePlaylistSongsPaginated`, the `includeSongs` arg, `favorites.browseFavoritesSummary`, `browseFavoritesSongsPaginated`, the unused `BrowseAlbumSummary` type, and `actions.cleanupHlsStreams`.
- I deleted `cleanupHlsStreams` instead of scheduling it. Nothing ever scheduled it, the web server already evicts idle HLS jobs in `server-hls.ts`, and admins can still trigger `adminCleanupHlsStreams` from settings.
- **Web**: deleted `lib/data.ts`, `generateKeys.mjs` (a duplicate of `docker/generate-auth-keys.mjs`), and the unwired `lib/station-artist.test.mjs`. Removed unused exports in `media-links.ts`, `album-grid-classes.ts` and `selection-range-styles.tsx`. The five `formatDuration` copies now use one `lib/format-duration.ts`, which keeps `player-bar`'s flooring. The other call sites pass integer `durationSeconds`, so their output is unchanged.
- **Mobile**: deleted the unreachable `/queue` routes (the mini player opens `/(app)/player?queue=1`, and no links or deep links point at `/queue`) and the `media-actions-sheet` re-export barrel; its importers now import from `media-context-menu`. Memoized the `ConvexAuthSessionProvider` value and fixed its error message, which named the wrong provider. Dropped the unused `palette.background` dep from the playlist `screenOptions` memo and formatted `use-cover-palette.ts`.
## Not done
- The ~32 one-line route re-export shims under `library/`, `search/` and the `(albums,…)` group are still there. Merging `home/library/search` into a shared group would change the NativeTabs triggers, `anchor: "library"`, the per-tab `index`/`_layout` screens, and the `+native-intent` deep link target (`/(app)/(tabs)/home/...`). That's a navigation refactor on both platforms, not a cleanup.
## Older mobile builds on self-hosted servers
- Builds from before #38 (Nov 3) call `browsePlaylistSongsPaginated`, `browseFavoritesSongsPaginated` and `browsePlaylistDetail({ includeSongs: false })`. Their playlist and favorites screens break against this server.
- Builds from before `4a740c9` (Oct 8, client-first playback) call the old server-side queue functions and `library.browseSongs`.
- Every build from #38 onward is unaffected.
## Verification
`pnpm -r typecheck` (convex, web, mobile) and web `eslint` pass. I didn't run the app on a simulator; the only route change is deleting screens that nothing navigates to.
---
Changes made by Claude Opus 5.5 via Claude Code (T3 Code harness).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Remove ~45 unused Convex functions (old server-side queue, library CRUD,
paginated playlist/favorites queries, unscheduled cleanupHlsStreams), dead
web/mobile files and exports, and the unreachable mobile /queue routes.
Share one formatDuration helper in web. Memoize the auth session context
value and fix its provider error message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
An audit turned up a lot of dead code: old server-side queue and library CRUD functions in Convex, unused files and exports in web and mobile, an unreachable mobile
/queuescreen, and five copies offormatDuration. This PR removes it without changing behavior.Changes
playback.ts(the old server-side queue:playInOrder,skipNext,toggleShuffle,reorderQueue,getQueuePaginated,getSongProgress, …) and 19 fromlibrary.ts(browseSongs,browseAlbumSummary,browseAlbumTracksPaginated,getSongByName,createSong, …). Also removedplaylists.browsePlaylistSummary,browsePlaylistSongsPaginated, theincludeSongsarg,favorites.browseFavoritesSummary,browseFavoritesSongsPaginated, the unusedBrowseAlbumSummarytype, andactions.cleanupHlsStreams.cleanupHlsStreamsinstead of scheduling it. Nothing ever scheduled it, the web server already evicts idle HLS jobs inserver-hls.ts, and admins can still triggeradminCleanupHlsStreamsfrom settings.lib/data.ts,generateKeys.mjs(a duplicate ofdocker/generate-auth-keys.mjs), and the unwiredlib/station-artist.test.mjs. Removed unused exports inmedia-links.ts,album-grid-classes.tsandselection-range-styles.tsx. The fiveformatDurationcopies now use onelib/format-duration.ts, which keepsplayer-bar's flooring. The other call sites pass integerdurationSeconds, so their output is unchanged./queueroutes (the mini player opens/(app)/player?queue=1, and no links or deep links point at/queue) and themedia-actions-sheetre-export barrel; its importers now import frommedia-context-menu. Memoized theConvexAuthSessionProvidervalue and fixed its error message, which named the wrong provider. Dropped the unusedpalette.backgrounddep from the playlistscreenOptionsmemo and formatteduse-cover-palette.ts.Not done
library/,search/and the(albums,…)group are still there. Merginghome/library/searchinto a shared group would change the NativeTabs triggers,anchor: "library", the per-tabindex/_layoutscreens, and the+native-intentdeep link target (/(app)/(tabs)/home/...). That's a navigation refactor on both platforms, not a cleanup.Older mobile builds on self-hosted servers
browsePlaylistSongsPaginated,browseFavoritesSongsPaginatedandbrowsePlaylistDetail({ includeSongs: false }). Their playlist and favorites screens break against this server.4a740c9(Oct 8, client-first playback) call the old server-side queue functions andlibrary.browseSongs.Verification
pnpm -r typecheck(convex, web, mobile) and webeslintpass. I didn't run the app on a simulator; the only route change is deleting screens that nothing navigates to.Changes made by Claude Opus 5.5 via Claude Code (T3 Code harness).
🤖 Generated with Claude Code