Skip to content

fix(playground): align selection handles with the scrolled score - #2864

Open
sgabenov wants to merge 1 commit into
CoderLine:developfrom
sgabenov:feature/playground-selection-handle-position
Open

fix(playground): align selection handles with the scrolled score#2864
sgabenov wants to merge 1 commit into
CoderLine:developfrom
sgabenov:feature/playground-selection-handle-position

Conversation

@sgabenov

@sgabenov sgabenov commented Sep 8, 2026

Copy link
Copy Markdown

Note

AI-authored disclosure (alphatab-ai-authored-v1)

Portions of this content were authored by an AI agent. The agent has read
AGENTS.md and the human submitter accepts responsibility for
compliance with the rules in that document.

Issues

Fixes #2863

Draft: issue #2863 is awaiting maintainer triage and acceptance. Published at the contributor's request for review; the accepted-issue prerequisite is not yet satisfied.

Proposed changes

In the Control playground, selecting notes after scrolling leaves the drag handles outside the visible score. With the track sidebar visible, the handles are also offset horizontally. Dragging the visible selection edge therefore cannot grab a handle.

Mount the handle overlay inside the score canvas so it scrolls with the notation and shares its horizontal origin. Convert mouse coordinates relative to the rendered score surface when finding the target beat, including the surface's scale.

This changes only the playground UI. The library's selection API, playback timing, and native ports are unchanged.

Validation

  • npm run typecheck --workspace=packages/playground passed.
  • npm run lint --workspace=packages/playground passed.
  • git diff --check passed.
  • Manually exercised the Control playground in Chrome with the bundled full-song.gp5 acoustic guitar track and the sidebar visible. After scrolling to bar 77, moved the start handle from x=329.19 to x=395.42 while the end stayed at x=608.34; then moved the end to x=553.47 while the start stayed fixed. Scrolled again and verified that both handles remained aligned with the selection.
  • No automated tests added: validation targets real browser scrolling, hit testing, and dragging. Audio output and native platform builds were not tested for this UI-only change.

Checklist

  • I consent that this change becomes part of alphaTab under its current or any future open source license
  • This PR is linked to an accepted issue
  • Changes are implemented
  • New tests were added (manual browser validation described above)
  • I have read AGENTS.md if an AI helped draft any part of this PR

AI authorship disclosure

  • No AI agent authored any part of this PR
  • An AI agent contributed to this PR. The disclosure is present above, and I have personally reviewed every change and can explain each one

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Thanks for the pull request. Before we dig into the code, a couple of things need addressing in the description:

  • Keep the pull request template sections. The description is missing section: Root-cause analysis. Please include it — even a short answer keeps the report actionable.

If the description isn't updated within 7 days, this pull request will be closed automatically and labeled state-rules-not-followed. Reopen any time — an edit to the description is all it takes.

If an AI helped draft this, AGENTS.md covers the same expectations from the AI side.

@sgabenov
sgabenov marked this pull request as ready for review September 8, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control playground: selection handles cannot be dragged after scrolling

1 participant