Skip to content

Prev/Next navigation in expanded block view - #117

Open
Shayshez wants to merge 2 commits into
tone-3000:mainfrom
Shayshez:feature/block-detail-prev-next
Open

Shayshez wants to merge 2 commits into
tone-3000:mainfrom
Shayshez:feature/block-detail-prev-next

Conversation

@Shayshez

@Shayshez Shayshez commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Screen.Recording.2026-09-10.at.18.54.00.mov
  • Adds Prev/Next chevrons (and Left/Right arrow key shortcuts) to the
    block detail header so you can step through adjacent blocks in the
    same lane without closing back to the chain gallery each time.
  • Reuses the existing detailBlockId prop-swap mechanism already
    exercised by swap-tone (same blockId, new tone) rather than any new
    unmount/remount boundary, so it doesn't touch [Feature]: Retain chain scroll position when closing expanded block view #82/[Feature]: Retain chain scroll position when adding new block #114's scroll-restore
    work at all.
  • Stepping is lane-local and skips insert slots, clamped at the lane's
    ends (no wraparound); a branch only taps the signal into the other
    lane, it never reorders or merges the two arrays, so this is correct
    in stereo too regardless of branching.
  • Both chevrons and the arrow-key shortcut disable while a model switch
    is in flight (switchModel has no cancel handle, so a step mid-switch
    is ignored rather than left to race), and the arrow listener ignores
    keydowns while an input/textarea/select/editable element has focus so
    it doesn't fight normal typing or dropdown navigation.
  • showEq/eqView deliberately survive a step (not reset) so you can
    compare EQ curves block to block — but the EQ body otherwise looks
    identical regardless of which block it's showing, so a step left no
    visible sign of which block you landed on. Fix: a small tone-title
    label in the shared card header, shown only while the EQ view is open
    (the non-EQ body already shows the title prominently). It reads
    straight off the tone prop, so it updates automatically on every
    step with no new state or effect.

Depends on #115 (issue #82's scroll-restore fix): this branch is
based on feature/chain-scroll-restore rather than main directly,
since this change extends the exact onBack code path #115 rewrote.
Until #115 merges, this PR's diff includes its commit too — that's
expected for a stacked PR, not a mistake.

Fixes #83

Test plan

  • ./script/test-dsp.sh — 140/140 tests pass on this branch
  • tsc -b / eslint clean on the changed files
  • Full plugin build (Release, Standalone) succeeds
  • Manually verified in a freshly built Standalone: Prev/Next chevrons
    and arrow keys step correctly, disable at lane boundaries, and the
    EQ header shows the current block's title while stepping

🤖 Generated with Claude Code

Shayshez and others added 2 commits September 10, 2026 16:48
…etail view

The gallery's scroll div unmounts entirely while the detail takeover is
open (ChainView's detailBlock branch renders a different subtree), so
returning to it always mounted a fresh div at scrollLeft 0. Queue the
closed block's id in a ref and, once back in the gallery, recompute its
tile's position (rather than replaying a raw offset) and center it -
this also degrades gracefully if the chain reshaped while the takeover
was open (block moved/deleted).

Also handles the block disappearing out from under the open detail view
instead of an explicit Back - trash from the detail header, undo, redo,
or any other native-initiated removal. That path never reaches onBack,
so detailBlockId is left stale and pointing nowhere while detailBlock
resolves to null; detecting that mismatch (rather than special-casing
each trigger) covers all of them in one place, falling back to the
block's last-known lane+index (clamped, since the vacated slot may now
be past the end) since there's no id left to look up.

Fixes tone-3000#82

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01URpcSgm9HiuypH6TfWfqMg
Add Prev/Next chevrons (and Left/Right arrow key shortcuts) to the block
detail header so you can step through adjacent blocks in the same lane
without closing back to the chain gallery each time. Reuses the existing
detailBlockId prop-swap mechanism already exercised by swap-tone (same
blockId, new tone) rather than any new unmount/remount boundary, so it
doesn't touch tone-3000#82/tone-3000#114's scroll-restore work at all.

Stepping is lane-local and skips insert slots, clamped at the lane's
ends (no wraparound); a branch only taps the signal into the other lane,
it never reorders or merges the two arrays, so this is correct in
stereo too regardless of branching. Both chevrons and the arrow-key
shortcut disable while a model switch is in flight (switchModel has no
cancel handle, so a step mid-switch is ignored rather than left to
race), and the arrow listener ignores keydowns while an input/textarea/
select/editable element has focus so it doesn't fight normal typing or
dropdown navigation.

showEq/eqView deliberately survive a step (not reset) so you can compare
EQ curves block to block - but the EQ body otherwise looks identical
regardless of which block it's showing, so a step left no visible sign
of which block you landed on. Fix: a small tone-title label in the
shared card header, shown only while the EQ view is open (the non-EQ
body already shows the title prominently). It reads straight off the
`tone` prop, so it updates automatically on every step with no new
state or effect.

Fixes tone-3000#83

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01URpcSgm9HiuypH6TfWfqMg
@woodybury
woodybury self-requested a review September 11, 2026 20:00

@woodybury woodybury left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shayshez LGTM couple notes:

please rebase with the edits i made to scroll position
i'd rather just hide left/right arrows when viewing the EQ

@Shayshez

Shayshez commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey @woodybury
while working through this navigation problem, I ended up prototyping a different approach: instead of prev/next chevrons, a persistent strip showing the whole chain (block types, empty insert slots, bypass state) that you can click into directly from any position - no stepping through one block at a time.

Chain-Map.mov

Quick demo attached - if this direction looks good to you, I'd extract just this feature cleanly onto its own branch off main before opening a PR. (Note: this is running on my personal experimental branch with several other features I'm trying out)

I think this solves the underlying problem this PR is aiming at more completely, and also connects to #84 (chain view real estate) as an alternative way to keep the chain visible while working inside a block. Happy to clean this up and open it as its own PR if you think it's a better direction than the chevrons here - otherwise happy to leave this PR as-is, your call.

Shayshez added a commit to Shayshez/tone3000-plugin that referenced this pull request Sep 12, 2026
End-of-day handoff doc: what shipped today (and honest verification
status), which features on this branch are mature vs. still
experimental, and the open threads (PR tone-3000#117 awaiting woodybury, issue
tone-3000#121, the pending ChainMapStrip extraction) - so a future session with
no memory of this one can get oriented quickly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019zyKffHTFLVePeRVV88SM6
@woodybury

Copy link
Copy Markdown
Member

@Shayshez neat i'll share this with our designer and get thoughts. since this is a bigger chain will likely take some design iteration

@Shayshez

Copy link
Copy Markdown
Contributor Author

@woodybury

Recorded another clip showing more progress on this: quick access to the EQ (at the bottom of each chip), drag-to-reorder, and double-click to toggle bypass. Also added scrolling support for when the chain gets long.

Makes a real difference for usability and speed once you've got more than a few blocks stacked up. It also hooks into the tooltip bar at the bottom of the plugin, so hovering a block always shows its name there (same as everywhere else in the UI).

ChipsUI.mov

This branch has not been deployed

No deployments
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.

[Feature]: Add Previous / Next navigation buttons in expanded block view

2 participants