Skip to content

fix(annotator): stop the save indicator naming the session you left - #107

Merged
gbradham merged 1 commit into
mainfrom
fix/annotator-stale-save-indicator
Aug 6, 2026
Merged

fix(annotator): stop the save indicator naming the session you left#107
gbradham merged 1 commit into
mainfrom
fix/annotator-stale-save-indicator

Conversation

@gbradham

@gbradham gbradham commented Aug 6, 2026

Copy link
Copy Markdown
Member

What

The save indicator sits in the header row directly beside the video title:

[ 191L.mp4 ]              [ saved · t2_d2DLC_exp-7_annotations.csv ]   [ jump ]
   ↑ the clip on screen      ↑ the session we LEFT

It was written only inside _save_annotations_for_video() and never cleared.
Navigating persists the clip being left, which stamps the indicator with that
session's filename a moment before the title updates to the session being
entered.

Read as a pair, the header says the clip belongs to a session it doesn't.

Why it showed up now

Two things made an old staleness bug easy to hit:

  • Review mode crosses sessions constantly. A sampled queue tends to dwell
    in one video; walking 1,248 saved zones changes video every few clips.
  • Jump-to-clip (feat(annotator): jump to a clip by number #106) makes the jumps bigger — one keystroke can cross
    sessions, so the mismatched pair is on screen immediately.

Reported as "the clip numbers are not matched": clip 1 showed a t2_d2…
filename while playing 191L.mp4. The numbering was correct all along.

Nothing was mis-saved

Verified the video → pose CSV → annotations mapping across all 34 sessions:
0 mismatched. Labels always went to the right file. This was only ever the
label above them — but it is exactly the kind of thing that makes someone
distrust correct data, or worse, trust the wrong session.

The fix

Derive the indicator from the current clip rather than writing it at save time.
It now:

  • names the annotation file for the session on screen
  • upgrades to saved · <file> while you are still in the session just written,
    so the confirmation isn't lost to context
  • reports unreadable only for the session it applies to
  • reports a save failure until the next successful save

Tests

6 cases: names the session shown; follows navigation across sessions; a save in
one session does not follow you to the next (the regression, exercised through
_go_to exactly as it was hit); a save in the current session is still
confirmed after a refresh; an unreadable file is reported for the right session
and not inherited by a healthy one; no clips does not raise.

Four of the six fail on main before the change.

2858 passed, 1 skipped; ruff clean.

Separately: evaluation.py and test_evaluation.py (merged in #105) are not
black-formatted — my miss, I ran ruff but not black on that branch. black --check therefore fails on main right now. Fixing in its own PR since it is
unrelated to this change.

The indicator sits in the header beside the video title, and was written only
at save time and never cleared. Navigating persists the clip being left, which
stamped it with that session's annotation filename immediately before the title
switched to the session being entered -- so the header showed one video's name
next to another video's file.

Read as a pair, that says the clip belongs to a session it does not. During a
review pass over saved zones, where the video changes every few clips, it says
so constantly; jumping by clip number crosses sessions in a single keystroke,
which is how it surfaced.

Derive the text from the current clip instead of writing it at save time. It
now shows the annotation file for the session on screen, upgrades to
"saved · <file>" while you are still in the session that was written, and
reports an unreadable file only for the session it belongs to.

Nothing was ever written to the wrong file -- the video to pose to annotations
mapping is correct, and this was only ever the label above it.
@gbradham
gbradham merged commit 99efaaa into main Aug 6, 2026
3 of 4 checks passed
@gbradham
gbradham deleted the fix/annotator-stale-save-indicator branch August 6, 2026 14:18
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