fix(activity-feed-v2): preserve timestamp markup when editing video comment#4638
Conversation
…omment Video comments encode the frame timestamp inline as a #[timestamp:NNN,versionId:NNN] markup prefix on the comment message. The transformer strips that prefix for display, but the editor only contains the visible text, so editing the comment dropped the markup from the payload and the badge was lost. Capture the original markup token in extractTimestampMarkup, store it on TransformedCommentItem, and re-prepend it to the serialized text when the root comment is edited. Replies and non-timestamped comments are unchanged.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughAdds an ChangesTimestamp Markup Preservation on Comment Edit
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merge Queue Status
This pull request spent 9 seconds in the queue, including 1 second running CI. Required conditions to merge
|
…omment (box#4638) Video comments encode the frame timestamp inline as a #[timestamp:NNN,versionId:NNN] markup prefix on the comment message. The transformer strips that prefix for display, but the editor only contains the visible text, so editing the comment dropped the markup from the payload and the badge was lost. Capture the original markup token in extractTimestampMarkup, store it on TransformedCommentItem, and re-prepend it to the serialized text when the root comment is edited. Replies and non-timestamped comments are unchanged. Co-authored-by: Jackie Jou <jackiejou@users.noreply.github.com>
Summary
#[timestamp:NNN,versionId:NNN]markup prefix on the comment message. The transformer strips that prefix for display, so the editor only contains the visible text and editing the comment dropped the markup from the payload, which lost the badge on the comment.extractTimestampMarkup, expose it onTransformedCommentItemasannotationTimestampMarkup, and re-prepend it to the serialized text when the root of a video comment is edited. Replies and non-timestamped comments are unchanged. Annotations are not affected because they store the timestamp ontarget.location, separate from the message.Test Plan
yarn test --watchAll=false --testPathPattern="activity-feed-v2"(217 passed)Summary by CodeRabbit
Bug Fixes
Tests