silverbucket / silverbucket/setlist-roller

Refactor: split app.svelte.js (2024 lines) into focused stores

Open
#71 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p2
Dominant language
JavaScript
Stars
1
Forks
0
Avg merge
8h 45m
Merged PRs (30d)
20

Description

`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):

  1. Extract migrations/import/export → `stores/data-io.svelte.js`
  2. Extract account/connection lifecycle → `stores/connection.svelte.js`
  3. Extract band-editing → `stores/band.svelte.js`
  4. Extract song editor → `stores/song-editor.svelte.js`
  5. Leave generation+roll in the main store.

Do this gradually — one extraction per PR, verify tests pass.

(From comprehensive review, finding E1.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/lib/stores/app.svelte.js and map the listed independent sections before choosing one extraction. Start with the first proposed target, stores/data-io.svelte.js, then verify the existing tests pass; done means that section is moved into a focused store without breaking the app.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.