Skip to content

fix(main): thumbnail the timeline's true first frame#61

Merged
thisiscsim merged 1 commit into
mainfrom
fix/thumbnail-first-frame
Jul 20, 2026
Merged

fix(main): thumbnail the timeline's true first frame#61
thisiscsim merged 1 commit into
mainfrom
fix/thumbnail-first-frame

Conversation

@thisiscsim

Copy link
Copy Markdown
Owner

Summary

  • Project thumbnails were cut from the first video asset declared in the EDL at a fixed -ss 0.8 — but asset order doesn't follow timeline order, so the poster could show a completely different clip (and always a different frame) than the rendered video opens on. Verified on real data: day-trip-to-napa-valley opens with IMG_8538.MOV at in=1.2s, yet the thumb came from IMG_8413.MOV at 0.8s.
  • ensureThumbnail now resolves the earliest clip across all video tracks (start-time ties go to the later track, which renders on top) and seeks to that clip's exact in offset. Image openers are supported. Fallbacks (any video asset, then assets/ scan) keep pre-EDL projects working.
  • Thumb cache file is versioned (.thumb-v2.jpg) so existing stale posters regenerate on next load; old .thumb.jpg files are cleaned up opportunistically.

Test plan

  • npm run typecheck && npm test && npm run build
  • Compared old vs new opener resolution against both real projects on disk
  • Manual: homepage tiles show the same frame the preview opens on

Main-process change — requires restarting npm run dev (HMR only covers the renderer).

Made with Cursor

… at 0.8s

The poster was cut from the first video asset declared in the EDL at a fixed
0.8s seek — asset order doesn't follow timeline order, so the thumbnail could
show a different clip (and always a different frame) than the video opens on.
Now picks the earliest clip across video tracks (ties go to the top-rendered
layer) at its exact `in` offset, supports image openers, and versions the
cache file so stale v1 thumbs regenerate.

Co-authored-by: Cursor <cursoragent@cursor.com>
@thisiscsim
thisiscsim merged commit 3207ba9 into main Jul 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant