Public: anyone can read this; the crew can change it.

Video-edit timelines open as a cut list: .otio and .edl show tracks, clips, in and out times and the total length #12780

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

.otio and .edl files now open as a cut list on the file page, one table per track. I ran bun x tsc --noEmit, scripts/gate.ts, scripts/design-lint.ts and the render tests (render-timelines, render-kinds, fuzz-renderers); all are green.

Notes

shipped production is serving it deploy e5f3b40

opened this

.otio and .edl files now open as a cut list on the file page, one table per track. I ran bun x tsc --noEmit, scripts/gate.ts, scripts/design-lint.ts and the render tests (render-timelines, render-kinds, fuzz-renderers); all are green. I didn't run the full suite, and the page itself was not loaded in a browser or against a preview.

What changed

  • Registry and renderers: two new kinds, otio and edl, are registered in src/web/render/kinds.ts and renderers.ts the same way as calendar and notebook. Each is allowlisted by extension only, and the media type stays octet-stream.
  • .otio: each track becomes a table of clips with name, source URL, in, out and duration. Gaps show as (gap), and the total is the longest track, in timecode and seconds. It handles both media_reference and the newer media_references.
  • .edl (CMX3600): events are grouped by track (V, A, A2 …) and read from the FROM CLIP NAME and SOURCE FILE comments. The frame rate comes from a FRAME RATE: or FPS: header line. Without one, the page says it assumed a rate: 30 for FCM: DROP FRAME, otherwise 24.
  • Failures: a truncated or malformed file falls back to the source view with a reason. For an EDL, a half-cut event line counts as truncated.
  • Safety and size: every value is escaped and no script is added. Each kind is capped at 1 MB, so a 5 MB file is refused for the source view in well under 50 ms.
  • Shared code: timeline-table.ts holds the table drawing both kinds use, with a cap of 50 tracks and 500 rows per track.
  • Tests: test/render-timelines.test.ts covers a good file, a truncated file, a 5 MB file, an assumed frame rate and escaping. Fixtures are in test/fixtures/timelines/, and render-kinds.test.ts has a sample for each new extension.

Left out

  • Drop-frame timecode: I count nominal frames, so a drop-frame EDL duration can be off by a frame or two.
  • OTIO nesting and transitions: a nested stack shows as one row, and transitions are skipped. Each in/out is the clip's source range, not its position on the timeline.
  • EDL dissolves: dissolves and wipes show as plain events.
  • Dependencies: none added.

Try it: commit a .otio or .edl file (the fixtures work) and open it in the repository file view.

The first push was refused by the pre-push hook until a commit said how to try the change, so the branch has an empty "Try:" commit for that.

Closes #12768

5 earlier comments · 1 event
commented

.otio and .edl files now open as a cut list on the file page, one table per track. I ran bun x tsc --noEmit, scripts/gate.ts, scripts/design-lint.ts and the render tests (render-timelines, render-kinds, fuzz-renderers); all are green. I didn't run the full suite, and the page itself was not loaded in a browser or against a preview.

What changed

  • Registry and renderers: two new kinds, otio and edl, are registered in src/web/render/kinds.ts and renderers.ts the same way as calendar and notebook. Each is allowlisted by extension only, and the media type stays octet-stream.
  • .otio: each track becomes a table of clips with name, source URL, in, out and duration. Gaps show as (gap), and the total is the longest track, in timecode and seconds. It handles both media_reference and the newer media_references.
  • .edl (CMX3600): events are grouped by track (V, A, A2 …) and read from the FROM CLIP NAME and SOURCE FILE comments. The frame rate comes from a FRAME RATE: or FPS: header line. Without one, the page says it assumed a rate: 30 for FCM: DROP FRAME, otherwise 24.
  • Failures: a truncated or malformed file falls back to the source view with a reason. For an EDL, a half-cut event line counts as truncated.
  • Safety and size: every value is escaped and no script is added. Each kind is capped at 1 MB, so a 5 MB file is refused for the source view in well under 50 ms.
  • Shared code: timeline-table.ts holds the table drawing both kinds use, with a cap of 50 tracks and 500 rows per track.
  • Tests: test/render-timelines.test.ts covers a good file, a truncated file, a 5 MB file, an assumed frame rate and escaping. Fixtures are in test/fixtures/timelines/, and render-kinds.test.ts has a sample for each new extension.

Left out

  • Drop-frame timecode: I count nominal frames, so a drop-frame EDL duration can be off by a frame or two.
  • OTIO nesting and transitions: a nested stack shows as one row, and transitions are skipped. Each in/out is the clip's source range, not its position on the timeline.
  • EDL dissolves: dissolves and wipes show as plain events.
  • Dependencies: none added.

Try it: commit a .otio or .edl file (the fixtures work) and open it in the repository file view.

The first push was refused by the pre-push hook until a commit said how to try the change, so the branch has an empty "Try:" commit for that.

commented

The check failed on two gate rules, "both doors" and "before/after looks". I fixed both with commit lines, not code. bun scripts/gate.ts now passes locally and the push went through. I did not re-run tsc or the tests, because only an empty commit was added.

  • No terminal screen: the pull adds src/web/render/edl.ts, otio.ts and timeline-table.ts, and the "both doors" rule wants a screen for those. A commit line gives No door: as the reason: the renderers only change how a .otio or .edl file shows in the repository file view, and the terminal already lists files as plain text. If you want a screen anyway, say so.
  • No before/after pictures: no page in app.looks shows a .otio or .edl file; one would need a repository that holds one. A commit line gives No look: with that reason. Say so if you want a sample repository added to app.looks.

The forge will re-run the check on this push.

🤖 Generated with Claude Code

commented

The only failure that came from this pull was the 50 ms wall-clock assertion in test/render-timelines.test.ts, which test/flake.test.ts rejects as a tight bound. I removed that assertion. The 5 MB test still checks that rendererFor returns undefined for the oversized file. bun test test/render-timelines.test.ts test/flake.test.ts passes (42 tests, 0 failures) and the fix is pushed.

The other 11 failures in the check log are not from this change. The log marks test/release-handover-keepalive.test.ts, test/apps-open-host.test.ts, test/ask-to-reach.test.ts and test/check-install.test.ts as red on main too. I don't know why the N+1 dashboard test in the surfaces-adversarial suite failed. I did not run it, so it may be a flake or a timing issue under load.

The pull adds .otio and .edl renderers that show a timeline as a cut list in the repository file view.

🤖 Generated with Claude Code

Changes requested — before the latest push

The renderers work and escape correctly, but the pull misses the checklist in three places. Fix these in one round.

  1. No how-to. Add docs/features/timeline-cut-list.md (what .otio and .edl show, the 1 MB cap, the assumed frame rate, the drop-frame caveat). README stays untouched.
  2. Both doors. 'No door' was written into a commit line, which is not a door. The terminal file view should show a cut list for these two kinds (a screen in src/tui/, entry where AGENTS.md says), or the pull must show why the terminal already reuses these renderers. Please check AGENTS.md and do one of the two.
  3. Box 3 is only half proved. The 5 MB test asserts rendererFor returns undefined but never that the source view is what the page shows, and the timing check was dropped. Assert the fallback or source-view path (not a wall-clock bound) for both kinds. The cap comment in kinds.ts says 'page reads at most 5 MB' - say plainly that 1 MB is the render cap.

Also: timeline-table.ts builds markup as raw strings with a hand-rolled aria-label on top of a <caption> (nothing explains itself twice, principle 1); keep the caption and drop the aria-label. Put the tables through the html helper rather than raw() concatenation so escaping is by construction. No before/after look exists: the preview has no .otio or .edl file, so I could not see it on a phone. A 6-column table at 360px needs an overflow wrapper or horizontal scroll; confirm the data-dense table does that.

Minor: Parsed in otio.ts uses a redundant Omit<Timeline,'title'>&{title} type; use Timeline.

commented

This round addresses all of juniper's points. The timeline tests, the render tests, bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts pass. I did not run the broader tests the fast tier names; it picked 2,077 of 3,238 files, too many for this sandbox. I ran the 13 workspace and render test files that cover the terminal change instead (149 pass). The forge's check runs the full suite on this push.

  • How-to: docs/features/timeline-cut-list.md covers what .otio and .edl show, the 1 MB render cap, the assumed frame rate and the drop-frame caveat. README is untouched.
  • Terminal door: I added a real one instead of the "No door" line. The terminal workspace in src/tui/screens/workspace.ts now draws these two kinds as one cut-list table with a Track column. It uses the web's parsers and the same 1 MB cap, and it gives the same reasons when a file isn't drawn.
  • Source-view proof: the 5 MB test now also asserts that timelineTable refuses the file for both kinds. Together with rendererFor returning undefined, that is the source-view outcome in browser and terminal. A new test checks a file just under 1 MB is drawn and one just over is not. The kinds.ts comment now says plainly that 1 MB is the render cap. The wall-clock bound stays out, since the flake test forbids it.
  • timeline-table.ts: the tables are built with the html helper, so escaping is by construction, and there is no raw() or string concatenation left. I dropped the aria-label and kept the caption. Each table sits in a table-scroll wrapper, which gives horizontal scroll at 360px. A test asserts the wrapper and the missing aria-label. I did not view it on a phone.
  • otio.ts: Parsed now uses Timeline.

There is still no before/after look: no page in app.looks shows a .otio or .edl file, so the commit carries a No look: line. If you want one, a sample repository holding a timeline would have to be added to app.looks.

🤖 Generated with Claude Code

commented

Two over-long comment lines that failed the gate are now rewrapped to 100 columns, and the fix is pushed.

  • What changed: the comment in src/web/render/kinds.ts (the 1 MB render-cap note) and the doc comment above the timeline table helper in src/tui/screens/workspace.ts. Nothing else changed.
  • Pipeline rule: the check also reported pipeline first (a feature with no pipeline change). I added a Direction: line to the commit message for it. I couldn't run that rule here, since it needs the pull's diff against main, so whether it clears is for the forge's check to say.
  • Checks run: bun scripts/gate.ts and bun x tsc --noEmit both came back clean. The timeline and render-kinds tests pass, 17 of 17.
  • Why only the two lines: the gate's workspace.ts:495 was the over-long doc comment, but its line numbers come from the merged tree, so I located it by content. workspace.ts has other lines over 100 columns that the gate didn't flag, and I left them alone.

The pull description from my earlier push stands.

commented

The check failed because docs/features/timeline-cut-list.md had no row in the feature index. I added one to docs/features/README.md, and both feature-orphans tests now pass.

Three other failures in the log don't look like they come from this change, so I left them alone:

  • counts.test.ts ("an issue listing costs the same for 5 rows as for 50"): it passes when run here. Its failure in the check was in shard 8 and may be load-related.
  • quotas-running.test.ts ("a fresh account's second preview is refused…"): it passes here. The check run took 421 seconds, so it looks like a timeout.
  • The crew test ("raised from one to two at boot's one, two agents run at once…"): I did not run it here. It sits in the crew-agent shard and has nothing to do with the timeline code.

bun x tsc --noEmit is clean. I did not run the full suite, as instructed.

Pushed as 93ee400e5 on the same branch, so the forge will re-run the check.

Approved

All four earlier asks are met: the aria-label is gone and the caption stays, with a table-scroll wrapper for 360px. Output is built with the html helper, Parsed uses Timeline, and the 5 MB test now asserts the source-view outcome for both kinds in the browser and the terminal. The terminal door and the docs/features how-to are in, and README is untouched. I read the diff and did not load the preview or the screenshots, so the phone scroll is untested.

Next two things: (1) Non-blocking: add a sample repository holding a .otio and an .edl to app.looks so the cut list has a before/after picture. (2) Non-blocking: handle drop-frame timecode properly so the durations match the editor's figure.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs