Skip to content

feat(annotator): jump to a clip by number - #106

Merged
gbradham merged 1 commit into
mainfrom
feature/annotator-clip-goto
Aug 6, 2026
Merged

feat(annotator): jump to a clip by number#106
gbradham merged 1 commit into
mainfrom
feature/annotator-clip-goto

Conversation

@gbradham

@gbradham gbradham commented Aug 6, 2026

Copy link
Copy Markdown
Member

What

Reviewing a flagged subset means arriving with a list of clip numbers in hand.
The annotator could only step one clip at a time, so reaching clip 812 of 1160
meant holding an arrow key — and there was no way to confirm you had landed on
the right one.

[ ← prev ]  [ next → ]    clip [  47 ] / 1160

Type a number, press Enter, jump. Ctrl+G focuses the box with the value
selected, so a number can be replaced without clearing it first.

Details

Counts from 1, matching the sidebar's existing clip N / M rather than
introducing a second convention next to it.

It is a position readout too — the box follows prev/next, skip and
labelling, not only typing in it. The clip total sits beside it, which the nav
row never showed.

Out-of-range clamps rather than refusing. A number carried over from a
stale queue should still land somewhere useful instead of erroring.

Jumping persists the current trim first, the same guarantee prev/next
already give. Without it a jump would silently drop an adjustment to the clip
being left, which is the kind of loss you notice much later.

editingFinished, not valueChanged — otherwise typing "47" would stop
off at clip 4 on the way.

Scope

It knows nothing about any particular review queue or CSV. This is plain
navigation, so it stays useful for every labelling job rather than one
workflow.

Tests

12 cases. The index arithmetic is a module-level clamp_clip_index() rather
than a method so it is testable without a display — the convention the rest of
the annotator's logic already follows. Covers 1-based↔0-based mapping, clamping
above and below range, the empty-clip-list case returning None (distinct from
"go to the first one"), and at the widget level: jumping, clamping, the box
tracking other nav controls, range matching the clip count, trim persisted
before the jump, an empty list not crashing, and the number agreeing with the
sidebar.

2814 passed, 1 skipped; ruff and black clean.

The one deselected test is
test_delay_node_precision.py::test_delay_node_is_accurate_under_realistic_loop_pressure,
a timing flake that fails ~2 of 4 runs on unmodified main and is unrelated
to this change. Noted on #104/#105 as well; it deserves its own fix.

Reviewing a flagged subset means arriving with a list of clip numbers in hand.
The window could only step one clip at a time, so reaching clip 812 of 1160
meant holding an arrow key, and there was no way to confirm you had landed on
the right one.

Adds a go-to box to the nav row: type a number, press Enter, jump. Ctrl+G
focuses it with the value selected, so a number can be replaced without
clearing it first. Counting starts at 1, matching the sidebar's "clip N / M"
rather than introducing a second convention.

The box is also a position readout -- it follows prev/next, skip and
labelling, not just typing in it -- and shows the clip total beside it, which
the nav row never displayed.

Out-of-range clamps instead of refusing: a number carried over from a stale
queue should still land somewhere useful. Jumping persists the current trim
first, the same guarantee prev/next give, so a jump cannot silently drop an
adjustment to the clip being left.

The index arithmetic is a module-level clamp_clip_index() rather than a method,
so it is testable without a display -- the convention the rest of the
annotator's logic already follows.

Deliberately knows nothing about any particular review queue. It is plain
navigation, so it stays useful for every labelling job rather than one.
@gbradham
gbradham merged commit 19db824 into main Aug 6, 2026
4 checks passed
@gbradham
gbradham deleted the feature/annotator-clip-goto branch August 6, 2026 12:51
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