Skip to content

feat(recording): export smooth 60 FPS captures#29

Merged
kitlangton merged 3 commits into
mainfrom
recording-60fps
Jul 19, 2026
Merged

feat(recording): export smooth 60 FPS captures#29
kitlangton merged 3 commits into
mainfrom
recording-60fps

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Export MP4 recordings at 60 FPS by default while keeping visible OpenCode TUI sessions free of Drive service and progress output. Development checkouts now reuse the installed OpenTUI preload through a local symlink instead of reinstalling it into every artifact directory.

How

  • packages/drive/src/recording: defaults replay and encoding to 60 FPS, reuses unchanged terminal snapshots, avoids repeatedly serializing full frames for deduplication, and emits an exact one-frame tail for off-grid final states.
  • packages/drive/src/instance/runtime.ts: keeps service stdio in artifact logs and links the checkout's existing @opentui/solid preload into development artifacts.
  • packages/drive/src/cli/start.ts and src/log.ts: continue writing lifecycle progress to opencode-drive.log without painting over a visible TUI.
  • Two patch changesets cover the recording and visible-launch behavior.

Scope

This does not replace the in-memory replay API with a streaming API. It bounds the expensive part of quiet 60 FPS recordings by sharing immutable snapshots and deduplication keys while preserving the existing public result shape.

Testing

  • bun run --bun vitest run test/recording/replay.test.ts test/recording/export.test.ts (19 passed)
  • bun run test:effect (127 passed)
  • bun test test/cli/integration.test.ts -t "creates a type-checkable Effect script without overwriting it|keeps service and progress output out of a visible client terminal" (2 passed)
  • MP4 regression test verifies 60/1, 0.466667s, 28 frames, and the off-grid final frame pixels.
  • bun run typecheck passed.
  • bun run lint completed with three pre-existing warnings outside this diff.

Flow

flowchart LR
  Timeline[Recorded timeline] --> Replay[60 FPS replay]
  Replay --> Shared[Shared unchanged snapshots]
  Shared --> Encode[Deduplicated PNG frames]
  Encode --> MP4[60 FPS H.264 MP4]
Loading

@kitlangton
kitlangton merged commit 63d3464 into main Jul 19, 2026
1 check passed
@kitlangton
kitlangton deleted the recording-60fps branch July 19, 2026 15:45
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