refactor(bot): move playlist service out of utils into services
Merged
LU
3mo ago+437+437+012345678901234567890123456789-427-427-012345678901234567890123456789
Stacked on #1981 (not yet merged) — both touch idleDisconnect.ts and leave.ts.
Summary
- Second bounded slice of #1968:
collaborativePlaylist.tsholdsCollaborativePlaylistService, a stateful class with module-levelMapstate, mislabeled as a util. Zero internal imports of its own. - Moved to
services/musicRecommendation/, updated 4 real import sites (idleDisconnect.ts,leave.ts,playlist.ts,playHandler.ts) plus 2jest.mock()string-literal mocks (playlist.spec.ts,play/index.spec.ts) that a prior grep-only research pass for the watchdog slice missed — caught this time with a repo-wide grep before committing.
Verification
-
npm run type:check --workspace=@lucky/bot— clean -
npm run test:bot— 242/243 suites (1 pre-existing skip, unchanged count) -
npm run lint --workspace=@lucky/bot— 0 errors, 73 pre-existing warnings (unchanged) - Repo-wide grep for the old path after the move — zero remaining references
Summary by cubic
Moved the stateful collaborative playlist logic into a service under services/musicRecommendation to clarify module boundaries. No behavior changes.
- Refactors
- Relocated
collaborativePlaylist.tsand its spec toservices/musicRecommendation/collaborativePlaylist. - Updated imports in
leave.ts,playlist.ts,play/handlers/playHandler.ts, andutils/music/idleDisconnect.ts. - Updated
jest.mockpaths infunctions/music/commands/playlist.spec.tsandfunctions/music/commands/play/index.spec.ts. - Verified clean typecheck, tests, and lint in
@lucky/bot. - Note: overlaps with the watchdog-to-services work; both touch
idleDisconnect.tsandleave.ts.
- Relocated