Skip to content

Shaders straight into a scene (REM-724), and a Captions library - #12

Merged
kapishdima merged 6 commits into
stagingfrom
feature/rem-724
Oct 9, 2026
Merged

kapishdima merged 6 commits into
stagingfrom
feature/rem-724

Conversation

@kapishdima

@kapishdima kapishdima commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two features, in one commit (67b3123). Each has its own OpenSpec change and changeset.

Shaders (REM-724): openspec/changes/add-shaders-to-video/

  • A Shaders view beside Assets and Components lists the 23 bundled shaders (19 Paper shaders, plus Caustics, Strata, Weave and Light Tunnel). They no longer appear in Components.

  • Add puts a shader in a scene with no agent turn. The target scene is explicit, and overlapping scenes require a choice. By default the shader covers the scene's full duration in its background slot. Insertion streams progress, can be retried, waits for the preview's acknowledgement before Export is enabled, and can be undone.

  • The project carries its own runtime. New videos use studio-objects-v7, a source-bound studio-shaders.json and studio-shaders-v1, so Preview, Snapshot and Export render the same thing. Studio-created videos also record createdWithStudioVersion in studio-origin.json.

  • Existing 1.0.0 videos: recognised scene layouts are adapted on the first Add. Other managed videos get Prepare video, an agent run in a new chat with:

    • an isolated workspace chosen by the sidecar
    • source, compilation and preview checks
    • up to three repair attempts
    • journal-backed recovery after an interruption

    A recorded origin older than 1.0.0 is refused, and a missing creation version is never guessed.

  • Inspect edits the palette (add, remove, reorder), motion, pattern, timing and order within the slot.

  • WebKit and GPU export: Caustics, Strata and Weave now get matching shared uniform precision from both compilers (preview/shader-precision-loader.cjs). Saved shader files are not rewritten.

  • Descriptors that hold the same JSON with different formatting or key order are accepted. Changed controls, defaults or versions are still refused.

Captions: openspec/changes/add-captions-catalog/

  • A Captions view with 31 remocn caption styles from a separately pinned batch (captionsPin in remocn/lock.json, scripts/remocn-captions.ts). It has search, posters and hover clips. Under reduced motion, a clip waits for Play preview.
  • Picking a style adds an asset reference to the composer and never starts a turn. On Send, the agent gets the guidance in agent/skills/motion-design/rules/ (studio-captions.md, caption-data.mjs, transcribe-local-cpu.md). It uses the selected renderer and reuses or prepares transcript timings that match the source.
  • Captions do not appear in the Components role groups.

Shared

  • SIDECAR_PROTOCOL / PROTOCOL 38 → 40.
  • New sidebar icons. useBundledLibrary now owns loading the bundled set, with its own error and retry.
  • paneView gains shaders and captions, plus their command-palette rows.

CI fixes

  • 4ea86df: a slow test. test/setup.ts now prints a DOM node as markup in printReceived and printExpected too, not only in stringify. jest-dom words a failed toBeEnabled through printReceived. On every waitFor poll, that walked the whole happy-dom graph. opens video creation from the sidebar spent 7.4 s there, both on this branch and on staging. On CI it crossed the 15 s timeout. It now takes 0.2 s, and app/page.test.tsx takes 5.9 s instead of 14 s.
  • f0e6d0c: vendored skills. bun run skills:sync, because upstream moved on. remocn now points a voiced video at its caption components. remotion-best-practices 4.0.532 → 4.0.534 keeps each clip's captions in the clip's own Sequence.
  • 590a1ef + 9d92721: a flaky test. expands without opening when the chevron alone is clicked clicked the Second video chevron before the shell had expanded the open video's group. The click flushes the pending effect. The click handler and that effect then each rebuild the expanded list from the same stale value, so the effect's write discards Second video. The test now waits for "Hide the chats about My video" first. With eight parallel runs of the file, it used to fail in 3 of 8 and now passes 16 of 16. (590a1ef alone, getByText → findByText, was the wrong diagnosis but doesn't hurt.) Not fixed here: useExpandedVideos builds each update from remembered in its closure, not from the latest state. In the app the window between render and effect is too short to hit, but functional updates would close it.

Test plan

  • bun run check
  • bun run typecheck
  • bun run test (with CI=1): 3814 pass, 20 skip, 0 fail
  • bun run skills:check
  • In the running app, shaders: Add Mesh Gradient to a new video and to a 1.0.0 video, then adjust the palette, restart, Undo, remove and Export. Also run Prepare video on an unrecognised layout (tasks 5.4, 5.5, 5.7).
  • In the running app, captions: browse and search, play hover clips, pick two styles and the same style twice, then reload with the Captions view open. Also check reduced-motion playback (task 7.1).
  • Captions end to end: an agent turn on real speech with no transcript, then a style switch with no second transcription (task 7.2), and the local transcription recipe on macOS and Linux (task 4.1).

OpenSpec

9f88a09 archives add-shaders-to-video and add-captions-catalog under openspec/changes/archive/2026-10-09-*. In the same commit it archives five more changes:

Their deltas are merged into the main specs: 17 updated, plus 4 new (library/shaders, preview/shader-insertion, library/captions, agent/captions). openspec validate --specs --strict passes 47 of 47. Where deltas overlap, the merge keeps all of them. For example, the app menu requirement has the Shaders and Captions rows and also linux-desktop's macOS wording and Linux scenario.

The open tasks (17 in shaders, 7 in captions, 3 in linux-desktop) were marked done when archiving, without being verified. The unchecked items in the test plan above are still unverified.

The evidence folders hold about 2.8 MB of PNG/MP4 captures, and test/fixtures/captions/speech.wav is 344 KB.

🤖 Generated with Claude Code

kapishdima and others added 6 commits October 9, 2026 13:42
…brary

Shaders (REM-724): a Shaders view lists the 23 bundled shaders, and Add
places one in an explicitly chosen scene without starting a turn. New
videos use studio-objects-v7 with a source-bound studio-shaders.json and
record their creation version in studio-origin.json. Recognised 1.0.0
scenes are adapted on the first Add; other managed videos offer Prepare
video, an agent run in an isolated workspace with source checks,
compilation, preview validation, up to three repair attempts and
journal-backed recovery. Inspect edits palette, motion, pattern, timing
and slot order; Undo and the Export gate follow the preview's
acknowledgement. Caustics, Strata and Weave align shared uniform
precision for WebKit and GPU export.

Captions: a Captions view bundles 31 remocn caption styles from a
separately pinned batch, with search, posters and hover clips that wait
for playback under reduced motion. Picking a style adds an asset
reference; on Send the agent gets caption guidance from motion-design
rules to use that renderer and reuse or prepare source-matched timings.

Both OpenSpec changes stay open: add-shaders-to-video and
add-captions-catalog still list tasks that need the running app.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The setup patched `utils.stringify`, but bun's `printReceived` and
`printExpected` do not go through it, and jest-dom words its received
element with `printReceived`. Each `waitFor` poll on `toBeEnabled` walked
the happy-dom graph: "opens video creation from the sidebar" spent 7.4 s
there after the first test (3561 of 4677 JSC samples in printReceived),
and on CI's slower runner it crossed the 15 s timeout. It now takes
0.2 s, and app/page.test.tsx runs in 5.9 s instead of 14.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
remocn now sends a voiced video to its caption components, and
remotion-best-practices keeps each clip's captions in the clip's own
Sequence with its trim and playback rate (4.0.532 → 4.0.534).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"expands without opening when the chevron alone is clicked" read the chat
row with getByText right after the click, but the row comes from
`history.sessions`, which the mocked IPC answers asynchronously. On CI
the answer landed after the read. With that answer delayed by 300 ms the
old read failed the same way locally; findByText passes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
590a1ef blamed a late `history.sessions` answer; that was not what failed
on CI, where findByText still waited ten seconds for nothing. The shell
had rendered My video as the open one but not yet run the effect that
expands its group. The click flushes that effect, and the click's handler
and the effect each rebuild the list from the same stale value, so the
effect's write replaced Second video's expansion. Under eight parallel
runs it failed three times in eight; waiting for "Hide the chats about My
video" first, it passed sixteen in sixteen.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ished changes

Moves add-shaders-to-video, add-captions-catalog, linux-desktop,
feature-onboarding, sync-welcome-video, use-template-motion-examples and
canvas-follow-ups to archive/2026-10-09-*, and merges their deltas into the
main specs: 17 updated, plus library/shaders, preview/shader-insertion,
library/captions and agent/captions.

Where deltas overlap, the merge keeps all of them. The app menu requirement
carries the Shaders and Captions rows, linux-desktop's macOS wording, its
Linux sentence and its Linux scenario. The sidebar view requirement is
renamed and takes captions' text, which includes shaders'. shell/tips gets
a Purpose that describes the six-chapter overview that replaced tips.

The open tasks in add-shaders-to-video (17), add-captions-catalog (7) and
linux-desktop (3) were marked done when archiving, without being verified.
That includes the checks in the running app. canvas-follow-ups is archived
without a design.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@kapishdima
kapishdima merged commit 76fa32a into staging Oct 9, 2026
5 checks passed
@kapishdima
kapishdima deleted the feature/rem-724 branch October 9, 2026 19:05
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