fix(annotator): stop the save indicator naming the session you left - #107
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The save indicator sits in the header row directly beside the video title:
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:
in one video; walking 1,248 saved zones changes video every few clips.
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:
saved · <file>while you are still in the session just written,so the confirmation isn't lost to context
unreadableonly for the session it applies toTests
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_toexactly as it was hit); a save in the current session is stillconfirmed 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
mainbefore the change.2858 passed, 1 skipped; ruff clean.