Mark annotated frames on the timeline - #28
Closed
emlcpfx wants to merge 1 commit into
Closed
Conversation
Ported from reviewapp Timeline.set_markers. A reviewer scrubbing a shot can now see where the notes are instead of hunting for them. Colours and shape follow reviewapp: a 3px tick per annotated frame, blue for a frame holding comments and purple for one holding only drawings. A frame with both reads as a comment, because the words are the reviewable part and the drawing marker must not hide them. The markers are drawn under the playhead, so a note never hides the frame the reviewer is actually sitting on. Annotations are keyed by the player LOCAL frame while the timeline is a global range during playlist playback, so every marker is mapped across with _timeline_frame_for_local. Without that the notes for one shot land on another. Drawing a stroke changes what the timeline should show and only the viewer knows it happened, so ViewerWidget gains an annotations_changed signal, emitted when a stroke is completed, undone, redone or cleared. Comment add/delete/resolve and the sidecar load already funnel through single call sites, so the refresh hangs off those. 10 tests. The timeline is a plain QWidget, so they render it offscreen and probe the real pixels: the marker colours, a both-kinds frame reading as a comment, an unannotated frame staying clean, out-of-range markers not smearing onto the track ends, and the playhead winning the pixel it shares with a marker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TexnzYbmCjjTDB8zzZuUPb
Owner
|
Superseded by #33. The replacement preserves the contributed timeline marker UI and adds playlist-wide aggregation, duplicate-shot mapping, stale-marker clearing, validated lightweight sidecar reads, and regression coverage. Thank you for the contribution. |
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.
Annotated frames now show as ticks on the timeline, so a reviewer scrubbing a shot can see where the notes are instead of hunting for them.
Ported from reviewapp's
Timeline.set_markers, keeping its colours and shape:#4fc3f7) — the frame holds comments#ab47bc) — the frame holds only drawingsA frame with both reads as a comment: the words are the reviewable part, and the drawing marker mustn't hide them. (reviewapp arrives at the same result — its
has_c and has_dbranch returns the same blue ashas_c.)Markers are drawn under the playhead, so a note never hides the frame the reviewer is actually sitting on.
The bit that would have been wrong
Annotations are keyed by the player's LOCAL frame, but the timeline is a global range during playlist playback. Markers are mapped across with
_timeline_frame_for_local, exactly as the[/]note navigation already does. Without it, the notes for one shot land on top of a different shot — and it would look plausible right up until someone tried to click one.Keeping the markers honest
Comment add / delete / resolve and the sidecar load already funnel through single call sites, so the refresh hangs off those.
Strokes had no such hook: drawing changes what the timeline should show, and only the viewer knows it happened. So
ViewerWidgetgains anannotations_changedsignal, emitted when a stroke is completed, undone, redone or cleared. Without it the markers would be right until you drew something, then quietly drift until the next source reload — the worst kind of wrong, because it looks fine.Tests
10 new tests, 248 on the branch, compile clean.
The timeline is a plain
QWidget(not the GL viewer), so the tests render it offscreen and probe the real pixels rather than trusting what the widget believes it stored:Also driven end to end through a real
MainWindowwith a decoded clip: adding a comment adds its marker, completing a stroke adds its marker, undo takes it away again, and deleting the comment clears it.Branches off current
main.