Skip to content

feat(editor): track regions — draw the region strip + region selection - #333

Merged
byrongamatos merged 1 commit into
mainfrom
track-regions-p2
Jul 21, 2026
Merged

byrongamatos merged 1 commit into
mainfrom
track-regions-p2

Conversation

@ChrisBeWithYou

Copy link
Copy Markdown
Contributor

PR 2 of the track-regions arc — the region strip + selection

Stacked on #332 (the region data model) — merge #332 first. Base is track-regions-p1, so this shows only PR 2's diff.

Renders each track's content inside a region block in the Tracks (Parts) view, and adds region-level selection — the first visible step of the region layer. No move/trim yet.

What's here

  • Each lane wraps its content (waveform / note silhouette) in a region block: a kind-colour spine down the left edge, a hairline border (accent when selected), and the region name when the lane is tall enough. Today every track has one full-span region, so the block spans the whole content; bounded blocks arrive with the move/trim PRs and need no renderer change (the span pure resolves them).
  • Clicking a lane selects the region under the pointer (S.selectedRegionId) — the move/trim target a later PR acts on.
  • New tested pure helpers in src/region.js: _regionTimeSpanPure, _regionBlockRectPure, _regionHitPure.

Rides the existing rAF Parts-view draw + timeToX; no new listeners or timers, no per-frame work added.

Tests

tests/region_layout.test.mjs (4), fails on main. Full suite green: JS 297/0 · lint 0 errors. Runtime-verified in the real host — region blocks render and the selection accent works.

Next

PR 3 is the import-into-existing-project driver (place / move / delete a region — the drums-only-GP case).

🤖 Generated with Claude Code

https://claude.ai/code/session_017xGPjDBF8NTwTK7VQvizix

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@byrongamatos, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7736c822-5589-47d5-9798-33520ceba909

📥 Commits

Reviewing files that changed from the base of the PR and between 2d8ea40 and 85e3a58.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • src/parts-view.js
  • src/region.js
  • src/state.js
  • src/track-session.js
  • tests/region_layout.test.mjs
  • tests/selected_region_reset.test.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch track-regions-p2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@byrongamatos
byrongamatos changed the base branch from track-regions-p1 to main July 21, 2026 11:32
#333)

Includes review fix: clear selectedRegionId on track/song switch and drum-tab delete.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@byrongamatos
byrongamatos merged commit 25a3403 into main Jul 21, 2026
3 of 4 checks passed
@byrongamatos
byrongamatos deleted the track-regions-p2 branch July 21, 2026 11:34
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.

2 participants