`src/lib/stores/app.svelte.js` is 2024 lines covering connection lifecycle, account swap, generation orchestration, song editor, band editor, import/export, migrations, and config. Each section is independent state with its own concerns.
The Svelte 5 `$state` pattern doesn't require a god-store. Multiple stores composed via `setContext("app", {...connection, ...songs, ...band})` keeps cohesion high.
Fix (incremental):
- Extract migrations/import/export → `stores/data-io.svelte.js`
- Extract account/connection lifecycle → `stores/connection.svelte.js`
- Extract band-editing → `stores/band.svelte.js`
- Extract song editor → `stores/song-editor.svelte.js`
- Leave generation+roll in the main store.
Do this gradually — one extraction per PR, verify tests pass.
(From comprehensive review, finding E1.)
`src/lib/stores/app.svelte.js` is 2024 lines covering connection lifecycle, account swap, generation orchestration, song editor, band editor, import/export, migrations, and config. Each section is independent state with its own concerns.
The Svelte 5 `$state` pattern doesn't require a god-store. Multiple stores composed via `setContext("app", {...connection, ...songs, ...band})` keeps cohesion high.
Fix (incremental):
Do this gradually — one extraction per PR, verify tests pass.
(From comprehensive review, finding E1.)