Repository navigation
feat(activity-feed): open the version a timestamped comment was made on and seek to it - #4918
Conversation
…on and seek to it Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughComment timestamps now retain their file-version IDs. The activity feed routes timestamp selection and markers to the matching preview pane or file version. Sidebar navigation passes version selections to ChangesVersion-aware comment timestamps
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant FeedItemRow
participant ActivityFeedV2
participant ComparedPreview
participant ActivitySidebar
participant ContentPreview
FeedItemRow->>ActivityFeedV2: Select comment timestamp and file version
ActivityFeedV2->>ComparedPreview: Seek when the timestamp version matches the compared pane
ActivityFeedV2->>ActivitySidebar: Request another version when it is represented in the feed
ActivitySidebar->>ContentPreview: Pass the selected version and timestamp
Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
Merge Queue Status
This pull request spent 4 hours 14 minutes 56 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
Summary
Clicking the timestamp on a comment made on a previous version of an audio or video file now opens that version and starts playback at the comment's timestamp. Before, it seeked within whichever version was on screen.
Timestamped comments already record their version in the markup (
#[timestamp:ms,endTimestamp:ms,versionId:id]). This PR reads that version id and uses it in the activity feed and in preview.Changes
Opening a comment's version
extractTimestampMarkupreturns the comment'sversionId, and the transformer exposes it asannotationTimestampVersionId.ActivityFeedV2calls a newonCommentVersionSelectprop.ActivitySidebarroutes to that version the same way it opens an annotation from another version: through the annotations path, or throughinternalSidebarNavigationHandlerwhen the router is disabled. It then passes the timestamp up.ContentPreviewsetsstartAtfor the next load, so the version opens at the timestamp.Clearing
startAtContentPreviewnow clearsstartAtafter one load, and whenever the file changes, so a later load (including the annotation path) doesn't reuse an old seek.Markers per version
ActivityFeedV2into auseCommentMarkerViewerhook. The hook re-attaches when Preview replaces the viewer for another version, and detaches from destroyed viewers.Side-by-side compare
getComparedPreviewprop. It's passed only while comparing.Previous version on screen
Known limitations
Testing
startAtafter one load and when the file changesstartAtwhile comparingSummary by CodeRabbit