Skip to content

feat(dev): realistic dev-seed fixtures (Git LFS) + generator - #2

Merged
morepriyam merged 4 commits into
mainfrom
feat/dev-seed-fixtures
Jun 8, 2026
Merged

morepriyam merged 4 commits into
mainfrom
feat/dev-seed-fixtures

Conversation

@morepriyam

@morepriyam morepriyam commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

Makes the dev-seed path real so the timeline editor (next milestone) is exercisable on a simulator with no camera (§1.0b). Replaces the placeholder devSeedDraft (which pointed at non-existent dev/a.mp4 / dev/b.mp4) with six bundled clips and an idempotent seedDraft() that builds one "Dev sample" draft through the production addSegment path.

The fixtures are chosen to match the video surfaces the app actually meets, not synthetic edge cases:

clip display coded rot fps codec container
portrait-1080p-30fps-h264 1080×1920 1920×1080 90° 30 H.264 QuickTime
portrait-1080p-30fps-hevc 1080×1920 1920×1080 90° 30 HEVC QuickTime
portrait-1080p-60fps-hevc 1080×1920 1920×1080 90° 60 HEVC QuickTime
portrait-4k-60fps-hevc 2160×3840 3840×2160 90° 60 HEVC QuickTime
landscape-1080p-30fps-h264 1920×1080 1920×1080 — 30 H.264 MP4
landscape-4k-30fps-hevc 3840×2160 3840×2160 — 30 HEVC QuickTime
  • Portrait-primary (short-form, the recorder/iPhone surface). The portrait clips are stored the way iOS actually stores portrait — a coded-landscape buffer + 90° rotation matrix in a QuickTime container named .mp4 — not baked-portrait pixels, so the rotation/normalization path is genuinely exercised. portrait-1080p-30fps-h264 mirrors this recorder's exact output (H.264/AAC 1080p30).
  • Landscape clips stand in for video added later from Photos/shared, to normalize into the portrait timeline (one plain .mp4 H.264, one 4K HEVC QuickTime).
  • Derived from Big Buck Bunny (Blender, CC-BY 3.0), a different scene each, with a burned-in progress bar + playhead for trimming.

Contents

  • src/dev/seed.ts — seedDraft() / clearDrafts(), wired to Home + seed / clear (__DEV__). copyIntoSegments (byte copy, leaves bundled source intact) added alongside the move-based persistRecording via a shared segmentDest helper.
  • assets/dev/*.mp4 (6 clips, ~25 MB) + fixtures/bbb_master.mov (~400 MB) — stored in Git LFS. The master is excluded from normal clones via .lfsconfig (fetch on demand for regen).
  • scripts/make-dev-fixtures.sh — reproducible generator (downloads/LFS-pulls the master, reframes, sets fps/codec/container, stamps the rotation matrix).
  • Docs: assets/dev/README.md (full matrix + rationale), docs/implementation-status.md (status/Gap A/Phase B), README.md (Git LFS clone requirement).

Verification (iOS simulator, iPhone 16 Pro dev build)

  • + seed → "Dev sample · 6 clips · 1:56"; on disk drafts/dev-seed/segments/dev-seed-0…5.mp4; DB = 1 project / 6 segments / 116.0 s (= exact sum of clip durations).
  • ffprobe on the copied segments: all 6 correct; the 4 portrait clips keep rotation=90 (byte-copy preserved orientation metadata).
  • All in-app thumbnails render upright (Home card + filmstrip), incl. the portrait clips — rotation handled by the expo-video thumbnail path.
  • clear → draft dir gone, DB back to 0/0.
  • Idempotency probe: + seed ×3 → still 1 draft / 6 segments (no duplicates).

Reviewer notes

  • ⚠️ Git LFS required to check out — without it the .mp4s arrive as pointer stubs and + seed breaks. brew install git-lfs && git lfs install.
  • The timeline editor is still a stub ("Timeline editor — coming next"), so upright playback is confirmed only via thumbnails for now — the editor (next PR) is where the rotation matrix gets its real playback test.
  • The 1080p60 fixture opens on a black frame (a genuine dark scene in the source), so its filmstrip thumbnail looks empty — cosmetic, not a bug.

Replace the placeholder devSeedDraft (which inserted rows pointing at
non-existent dev/a.mp4 / dev/b.mp4) with a real, idempotent seed that
builds one curated "Dev sample" draft from clips bundled under
assets/dev/, so the timeline editor is exercisable on a simulator with
no camera (§1.0b).

- src/dev/seed.ts: seedDraft() copies each fixture onto disk via
  expo-asset -> copyIntoSegments, reads native duration, and inserts
  segments through the production addSegment path. Fixed draft id makes
  it idempotent; clearDrafts() also drops the seed clip dir.
- file-store: add copyIntoSegments (asset copy, leaves source intact)
  alongside move-based persistRecording via a shared segmentDest helper.
- index.tsx: wire the dev seed/clear buttons to the new module.
- drafts.ts: drop the old fake dev helpers.
- assets/dev/README.md: document the fixture contract (mismatched
  res/fps/codec, keep small). FIXTURES is empty until clips are added.
Replace the empty FIXTURES list with six real clips that mirror the video
surfaces the app actually meets, so the dev seed exercises the ingest /
normalization path on a simulator with no camera (§1.0b).

- Portrait-primary (short-form): four iPhone-accurate clips stored the way
  the recorder / iPhone Camera store portrait — a coded-landscape buffer
  (1920x1080 / 3840x2160) + a 90deg rotation matrix in a QuickTime container
  named .mp4, so the rotation/normalization path is actually tested (not
  baked-portrait pixels). Covers H.264 + HEVC, 1080p + 4K, 30 + 60fps. The
  portrait-1080p-30fps-h264 clip matches this recorder's exact output.
- Landscape (added later from Photos / shared): one plain H.264 .mp4 and one
  4K HEVC QuickTime, to normalize into the portrait timeline.
- All carry AAC audio, ~12-24s for trimming room, with a burned-in progress
  bar + playhead (this ffmpeg has no freetype). Stored via Git LFS.
- scripts/make-dev-fixtures.sh: reproducible generator (downloads the Big
  Buck Bunny master, CC-BY 3.0; reframes, sets fps/codec/container, stamps
  the rotation matrix; caches the master outside the repo).
- assets/dev/README.md: document the realistic matrix and rotation rationale.
- .gitattributes: track assets/dev/*.mp4 with Git LFS.
Add fixtures/bbb_master.mov (Big Buck Bunny 720p, CC-BY 3.0) — the source the
fixture generator reframes from — to Git LFS so it lives with the repo instead
of a throwaway /tmp download.

- .lfsconfig fetchexclude keeps the 400 MB master OUT of normal clones (only the
  ~25 MB assets/dev clips are fetched); pull on demand with
  'git lfs pull --include "fixtures/*.mov"'.
- make-dev-fixtures.sh: default master path is now fixtures/bbb_master.mov, and
  it lfs-pulls (or re-downloads) the master if the working copy is just a pointer.
- assets/dev/README.md: document LFS storage + on-demand master fetch.
@morepriyam
morepriyam merged commit 053ba0a into main Jun 8, 2026
1 check passed
@morepriyam
morepriyam deleted the feat/dev-seed-fixtures branch June 8, 2026 17:45
morepriyam added a commit that referenced this pull request Jun 13, 2026
feat(dev): realistic dev-seed fixtures (Git LFS) + generator
morepriyam added a commit that referenced this pull request Aug 12, 2026
…advisories

Bumps transitive dependency resolutions already permitted by existing
semver ranges declared by Expo's own packages and devDependencies:

- js-yaml 3.15.0 -> 3.15.1 (babel-plugin-istanbul, dev-only)
- js-yaml 4.3.0 -> 4.3.1 (@expo/xcpretty, eslint's @eslint/eslintrc)
- brace-expansion 5.0.7 -> 5.0.9 (minimatch used by @expo/cli,
  @expo/config, @expo/config-plugins, @expo/fingerprint,
  @expo/metro-config)
- brace-expansion 1.1.16 -> 1.1.18 (eslint's minimatch@3)

No package.json ranges were changed and no Expo/framework versions
were bumped or overridden - these are patch-level fixes already
allowed by the existing dependency graph.

Closes dependabot alerts #14, #13, #11, #8.

Note: the following dependabot alerts remain open and are not
fixable via a lockfile refresh:
- #17, #16 (image-size DoS): no patched version exists upstream;
  image-size is archived and pulled in transitively via metro, even
  on the latest metro/expo releases. Needs an upstream fix in Metro.
- #2 (uuid missing bounds check): the xcode package (used by
  @expo/config-plugins) pins uuid@^7.0.3 and has not bumped it in
  its latest release. Not practically exploitable here since xcode
  only calls uuid.v4() with no output buffer (the affected code path
  is v3()/v5()/v6() with a caller-supplied buffer).
- #1 (esbuild dev server): comes from drizzle-kit's deprecated
  @esbuild-kit/esm-loader dependency, unrelated to Expo/Metro's dev
  server (already patched). Dev-only, low real-world risk since
  @esbuild-kit only uses esbuild's transform API, not serve().
@morepriyam morepriyam self-assigned this Aug 14, 2026
@github-project-automation github-project-automation Bot moved this from Ready to Done in Scrum Team Jerry Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant