fix(timeline): resolve duplicate trailing timestamps and key collisions on frames strip#1072
Conversation
|
@trivikramkalagi91-commits is attempting to deploy a commit to the magic-peach1's projects Team on Vercel. A member of the Team first needs to authorize it. |
✅ PR Format Check Passed — @trivikramkalagi91-commitsBasic format checks passed. A maintainer will review your code changes. This does not mean the PR is approved — it just means the format is correct. |
👋 Thanks for your PR, @trivikramkalagi91-commits!Welcome to Reframe — a browser-based video editor built for everyone 🎬
What happens next
Quick checklist
Useful links
Happy coding! 🎉 |
|
Hi @magic-peach I've submitted this PR to resolve issue #1069. It fixes the systemic rounding flaw causing duplicate trailing timestamps on shorter video timelines. Local tests, linting, and type-checking all pass successfully. Ready for your review (and Vercel authorization). |
Description
This PR resolves a systemic rounding flaw in the
ThumbnailStripcomponent where trailing video frames output duplicate formatted timestamps (e.g., displaying0:10twice on an 11-second video or creating structural layout duplication).The mathematical bounding constraints previously introduced collision states when video durations did not divide cleanly into the set interval steps. This fix introduces a string-based tracking layout using a native
Setagainst the formatted output offormatTime(), ensuring every generated frame is strictly unique in both value and presentation.Related Issue
Fixes #1069
Type of Contribution
Participant Info
Screenshots:



BEFORE:
one extra frame
AFTER:
only 3 frames
Checklist
bun run lintpasses (no ESLint errors)bunx tsc --noEmitpasses (no TypeScript errors)aria-label/ accessible namesconsole.logstatements left in