Skip to content

Name the structure toggle for the import it changes - #652

Merged
thcp merged 1 commit into
mainfrom
fix/structure-toggle-label-634
Sep 21, 2026
Merged

thcp merged 1 commit into
mainfrom
fix/structure-toggle-label-634

Conversation

@thcp

@thcp thcp commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #634

A reporter clicked "Song structure" on an open track, watched the button change colour, and saw the sections bar stay exactly where it was.

What is actually going on

The button and the bar are unrelated. The button is a server-side flag the pipeline reads once per job, so it can only ever affect the next import. The bar is a permanent part of the studio, showing whatever sections a track already has, whether detected at import or added by hand. Nothing the button does can reach a track that has already been separated.

Two things made that read as a fault:

  • The name described the structure rather than the work, so it looked like the switch that shows and hides the bar.
  • The toggle clears itself every time a song loads, because an inference pass costs minutes of CPU and should not be inherited from the last track. So the user finds it off after an import, clicks it expecting off, and gets on.

What changed

Wording only, no behaviour.

  • The button is "Detect structure", and the tooltip says it applies to the next import rather than to an open track.
  • The tooltip also points at the control that does own the bar: "Sections" in the Collapse row, which has shipped since before this was reported. The reporter was looking for it and never found it.
  • structure.toggleAria is new. The title is three sentences, which is right for a tooltip and wrong for a screen reader, so the aria label is short instead of reusing the title key.
  • Ten language tables, each naming its own locale's menu path rather than the English one.

Tests

Two, both in the existing spec. The first is the reported behaviour: the toggle leaves the sections bar alone in both directions, while the panel toggle still hides and shows it. The second pins the label, since naming the import is the whole fix and is otherwise the sort of thing a later tidy-up would undo.

Verified

pytest (1078 passing), ruff check and format, bandit, the full Playwright suite (183 passing), node --check, the JS unit tests, i18n coverage clean at 525 keys per table, uv.lock untouched, and cargo fmt, clippy and test unchanged at 99.

A reporter clicked "Song structure" on an open track, watched the button
change colour, and saw the sections bar stay exactly where it was (#634).

The button and the bar are unrelated. The button is a server-side flag the
pipeline reads once per job, so it can only affect the next import; the bar is
a permanent part of the studio showing whatever sections a track already has,
detected or added by hand. Nothing the button does can reach a track that has
already been separated.

Two things made that read as a fault. The name described the structure rather
than the work, so it looked like the switch that shows and hides the bar. And
the toggle clears itself every time a song loads, since an inference pass costs
minutes of CPU and should never be inherited from the last track: the user
therefore finds it off after an import, clicks it expecting off, and gets on.

So it is called "Detect structure" now, and the tooltip says it applies to the
next import rather than to an open track, and points at the control that does
own the bar: "Sections" in the Collapse row, which has been there since before
this was reported. No behaviour changes.

The title is three sentences, which is right for a tooltip and wrong for a
screen reader, so structure.toggleAria carries a short label instead of
pointing at the same key. Ten tables, each naming its own locale's menu path
rather than the English one.

Two tests: that the toggle leaves the sections bar alone in both directions
while the panel toggle still hides it, and that the label names the import.
The first is the reported behaviour, the second is the fix.

Verified: pytest (1078 passing), ruff, bandit, the full Playwright suite (183),
node --check, the JS unit tests, i18n coverage clean at 525 keys per table, and
cargo fmt, clippy and test unchanged at 99.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@thcp
thcp merged commit 7c7cd32 into main Sep 21, 2026
10 checks passed
@thcp
thcp deleted the fix/structure-toggle-label-634 branch September 21, 2026 09:59
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.

[Bug]: Usability Issue: Song Structure doesnt behave correctly

1 participant