Skip to content

fix(settings): Change default arrangement setting with the in-song menu#817

Open
jphinspace wants to merge 1 commit into
got-feedBack:mainfrom
jphinspace:resetbug
Open

fix(settings): Change default arrangement setting with the in-song menu#817
jphinspace wants to merge 1 commit into
got-feedBack:mainfrom
jphinspace:resetbug

Conversation

@jphinspace

@jphinspace jphinspace commented Jul 9, 2026

Copy link
Copy Markdown

In-song arrangement (lead, rhythm, bass, etc) changes were not being persisted to subsequent songs. This might have been intended but IMO the normal default arrangement setting is harder to find than the in-song-menu one, and I'm not sure there's much value in having two totally independent settings. Most of the time I'm not switching instrument between every song.

Summary by CodeRabbit

  • Bug Fixes
    • Changing the song arrangement during playback now also saves that arrangement as the default automatically.
    • If saving fails, the arrangement switch still completes normally without interruption.
    • Added regression coverage to confirm the default arrangement indicator updates correctly after a manual switch.

Signed-off-by: Joe <jphinspace@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b096933-1642-4c1e-8044-70bebc6c372b

📥 Commits

Reviewing files that changed from the base of the PR and between 950e348 and 4bf6bd9.

📒 Files selected for processing (2)
  • static/app.js
  • tests/browser/default-arrangement-pin.spec.ts

📝 Walkthrough

Walkthrough

Manual arrangement switching now triggers an unawaited call to persist the selected arrangement as the default, swallowing any errors. A new Playwright regression test verifies that switching arrangement via the dropdown results in a settings POST with the correct default_arrangement and updates the pin UI state.

Changes

Auto-persist arrangement default

Layer / File(s) Summary
Fire-and-forget persistence on manual arrangement switch
static/app.js, tests/browser/default-arrangement-pin.spec.ts
changeArrangement now calls pinCurrentArrangementDefault() without awaiting, catching and swallowing failures; a new regression test intercepts /api/settings POSTs, mocks WebSocket, switches arrangement via the #arr-select dropdown, and asserts the persisted default_arrangement and updated #arr-default-pin state.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AppJS as app.js
  participant SettingsAPI as /api/settings

  User->>AppJS: change `#arr-select` (dispatch change event)
  AppJS->>AppJS: changeArrangement(index)
  AppJS->>AppJS: pinCurrentArrangementDefault() (not awaited)
  AppJS->>SettingsAPI: POST default_arrangement
  SettingsAPI-->>AppJS: response (success or error)
  AppJS->>AppJS: swallow error if any
  AppJS->>User: update `#arr-default-pin` aria-pressed
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: in-song arrangement changes now update the default setting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant