Files
openmotion/template-library
open-design-crew[bot] 4698dc2c3d perf(studio): add pre-baked and workspace S3 composition filmstrip cache (#963)
* perf(studio): add pre-baked and workspace S3 composition filmstrip cache

Pre-bake 8-frame horizontal JPEG filmstrips (160x90, 129.9 KiB total) for
all 12 built-in template compositions keyed by assembled scene HTML sha256,
and add a tenant-isolated Studio filmstrip cache endpoint so cold browser
opens render timeline & sidebar composition thumbnails without spawning
offscreen SnapDOM iframes.

- Add pure OMFS1 JPEG comment codec and SOF dimension validator
  (`src/studio/engine/composition-filmstrip-sprite.ts`)
- Add read-only `catalog/filmstrips/{sha256}/strip-v1.jpg` keyspace guard
  (`src/infra/storage.ts`) and lazy in-memory built-in filmstrip store
  (`src/services/builtin-filmstrip-store.ts`)
- Add GET/HEAD/PUT `/api/projects/:id/composition-filmstrip/*` routes with
  strict workspace isolation, version-locked sha256 verification, and
  upgrade-only S3 write-back (`src/studio/routes/composition-filmstrips.ts`)
- Add Tier 1.5 remote filmstrip hydration + async post-SnapDOM write-back
  in Studio (`studio/src/player/lib/remoteCompositionFilmstrip.ts`,
  `clientCompositionCapture.ts`, `CompositionsTab.tsx`)
- Add deterministic pre-bake generator & checker CLI
  (`scripts/generate-template-filmstrips.ts`) and pre-baked built-in sprites
  under `template-library/filmstrips/`

* fix(cloud): satisfy tsconfig.backend type checks for filmstrip script and route

* fix(studio,cloud): scope filmstrip cache by project and render dependencies and preserve portrait sprite aspect

* perf(cloud): preload only reachable nested compositions for filmstrip render key

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>
2026-11-24 18:53:16 +08:00
..