8000 fix(triage): stop bar ruler from marking the boundary bar as primary by johannboehme · Pull Request #57 · johannboehme/tk-1 · GitHub
[go: up one dir, main page]

Skip to content

fix(triage): stop bar ruler from marking the boundary bar as primary - #57

Merged
johannboehme merged 1 commit into
mainfrom
fix/triage-ruler-endbar
Jun 20, 2026
Merged

johannboehme merged 1 commit into
mainfrom
fix/triage-ruler-endbar

Conversation

@johannboehme
Copy link
Copy Markdown
Owner

Problem

When a chunk of exactly N bars is selected in triage, the bar ruler marked N+1 as a primary (hot-colored, full-height, labeled) tick. E.g. a 4-bar chunk showed bar 5 marked primary, when only bars 1–4 should be.

Cause

usePerChunkBarTicks treated the chunk span [startS, endS] as closed. The downbeat sitting exactly on endS opens the next bar (bar 5 of a 4-bar chunk), but t > endS is false at that exact boundary, so it was classified as inside the chunk and drawn as primary instead of as a dimmed extension tick.

Fix

Treat the span as half-open — the closing downbeat now falls into the dimmed extension grid (still rendered as a snap target, just not primary):

const extension = t < startS - 1e-9 || t > endS - 1e-9;

A 4-bar chunk now marks bars 1–4 as primary; the bar-5 boundary downbeat is dimmed.

🤖 Generated with Claude Code

A chunk's grid treated [startS, endS] as closed, so the downbeat sitting
exactly on endS (which opens the *next* bar — e.g. bar 5 of a 4-bar chunk)
was classified as inside the chunk and drawn as a primary, hot-colored,
labeled tick. Treat the span as half-open: the closing downbeat now falls
into the dimmed extension grid, so a 4-bar chunk marks bars 1–4 as primary.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@johannboehme
johannboehme merged commit 92185db into main Jun 20, 2026
1 check passed
@johannboehme
johannboehme deleted the fix/triage-ruler-endbar branch June 20, 2026 12:58
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

0