The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
Describe the code on its own terms
Jareerfa80c13b499b
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 4e24de8b..ef758138 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -4,9 +4,9 @@ name: Release# app for all three platforms and publishes a GitHub release under that tag# with one archive per platform. A tag containing a hyphen is a pre-release.#-# Archives rather than installers for now: the Slint window is a single-# binary plus, on Windows and Linux, the FFmpeg runtime libraries beside it.-# Signed installers and bundles are the next packaging step.+# Each archive is the binary plus, on Windows and Linux, the FFmpeg runtime+# libraries beside it. Signed installers and bundles are the next packaging+# step.on:push:tags: ["v*"]diff --git a/ARCHITECTURE.md b/ARCHITECTURE.mdindex cc27fd21..6c62544c 100644--- a/ARCHITECTURE.md+++ b/ARCHITECTURE.md@@ -1,11 +1,8 @@# Concat Architecture-A study map of the system as it stands in September 2026, written just after-two large moves: the user interface left Tauri + React for Slint, and the-engine stopped spawning `ffmpeg`, `ffprobe` and `whisper-cli` in favour of-linking FFmpeg and compiling whisper.cpp in. What each layer owns, how they-talk, where the sharp edges are, and what deserves attention next. File-references are current as of this writing.+A study map of the system as it stands in September 2026: what each layer+owns, how they talk, where the sharp edges are, and what deserves attention+next. File references are current as of this writing.---@@ -41,19 +38,15 @@ flowchart LR**The rule (engine doctrine):** everything important lives in the enginecrates. The window renders state and issues commands; the host layer isplumbing between the two. The engine owns the project model, the undo-history, the render path, the document format, and now the codecs. When a-feature is being designed, the first question is still "which engine crate-does this belong to".--What changed since the Tauri days is that the rule no longer has to survive a-wire. There is no IPC, no JSON boundary, no second language: the window calls-Rust functions in-process. Two of the previous architecture's largest debts --the hand-maintained TypeScript mirror of the FFmpeg filter catalogue, and the-UI re-deriving "what is on screen" in parallel with the engine's flattener --ceased to exist with the language they were written in. The remaining risk is-the opposite one: with no boundary, editing logic can leak into the window-without anyone noticing. The test for a change is whether it could be driven-from `concat-cli` without a window; if not, it is in the wrong place.+history, the render path, the document format, and the codecs. When a+feature is being designed, the first question is "which engine crate does+this belong to".++There is no wire, no JSON boundary, no second language: the window calls+Rust functions in-process. The rule therefore has nothing to enforce it but+discipline, and the risk is that editing logic leaks into the window without+anyone noticing. The test for a change is whether it could be driven from+`concat-cli` without a window; if not, it is in the wrong place.The dependency arrows point one way:@@ -82,7 +75,7 @@ rendering. `concat-media` is the only crate that knows FFmpeg exists.## 2. The edit loopThe engine owns the project; the window never keeps a model of its own. Every-edit round-trips, now as a function call:+edit round-trips as a function call:```mermaidsequenceDiagram@@ -97,16 +90,16 @@ sequenceDiagramW->>W: republish the Slint models from the Project```-Key properties, unchanged in substance from the Tauri architecture:+Key properties:- **One session, one thread.** `Session` is a plain struct owned by thewindow's event-loop thread. There is no mutex around the edit because thereis no second caller; long work (saves, probes, renders, decodes) takes whatit needs *out* of the session first and runs on its own thread.- **Gestures commit once.** A drag must not send a command per pixel. The- Tauri UI previewed gestures locally ("echo") and committed one command on- release, so undo undoes the drag. The Slint window's demo model does the- same thing in its `Gesture` state machine; that shape survives the wiring.+ window previews a gesture on an echo (a clone of the project the pointer+ mutates) and commits one command on release, so undo undoes the drag.+ That is the `Gesture` state machine in `studio.rs`.- **Undo lives in the engine** - a bounded history of full `Project` clones(depth 200), not command inversion.- **Saving is one code path.** `Session::prepare_save` hands back the folder@@ -119,32 +112,30 @@ Key properties, unchanged in substance from the Tauri architecture:----## 3. Media: linked, not spawned+## 3. Media-`concat-media` used to pipe raw RGBA out of an `ffmpeg` child process and-parse `ffprobe`'s JSON. It now calls the libraries. What that bought, and-what it cost:+`concat-media` links the FFmpeg libraries and calls them directly. What that+gives, and what it costs:- **Every frame carries its real presentation timestamp**, so variable- frame-rate material no longer drifts through a pipe that had no- timestamps at all.+ frame-rate material stays in sync with the timeline.- **Seeks are frame-accurate**: the container lands on the keyframe beforethe target and the decoder discards up to it. The reader pool's "roll- forward or seek" policy is now guided by timestamps rather than by counting+ forward or seek" policy is guided by timestamps rather than by countingframes ordinally.- **Rotation is honoured**: portrait phone footage is turned the way everyplayer turns it, by reading the display matrix off the codec parameters- (where FFmpeg 7 moved it) and inserting the same `transpose`/`hflip,vflip`- ffmpeg's own autorotate would.+ (where FFmpeg 7 keeps it) and inserting the same `transpose`/`hflip,vflip`+ FFmpeg's own autorotate would.- **A build needs the FFmpeg development libraries.** `ffmpeg-the-third`binds them at build time with bindgen, so a build machine needs headers,import libraries and libclang. Homebrew serves on macOS; Windows and older- Linux distributions use a BtbN `shared` build via `FFMPEG_DIR`. This is the- price of the move and it is paid in CI configuration, not in code.+ Linux distributions use a BtbN `shared` build via `FFMPEG_DIR`. The price+ is paid in CI configuration, not in code.### 3.1 The video decoder-`decode::Decoder` does in one place what the subprocess did with flags:+`decode::Decoder` does everything in one place:```container seek (keyframe) → discard frames before `start`@@ -185,22 +176,21 @@ renders.- `encode::Encoder` is libx264 through libavcodec, RGBA → yuv420p throughlibswscale, into an MP4 with `+faststart`. `encode::jpeg` is the samemachinery with the MJPEG encoder, for posters.-- `audio::mix_to_file` parses the same `filter_complex` string- `audio::mix_graph` always produced - the pure, unit-tested planner is- untouched - into a libavfilter graph with one `abuffer` per clip bound to- the `[N:a]` labels, an `aformat` landing on the AAC encoder's format, and- an `abuffersink` sized to the encoder's frame. Inputs are fed round-robin- and the sink drained after every push, so no input runs ahead by more than- a frame.+- `audio::mix_to_file` parses the `filter_complex` string the pure,+ unit-tested `audio::mix_graph` planner produces into a libavfilter graph+ with one `abuffer` per clip bound to the `[N:a]` labels, an `aformat`+ landing on the AAC encoder's format, and an `abuffersink` sized to the+ encoder's frame. Inputs are fed round-robin and the sink drained after+ every push, so no input runs ahead by more than a frame.- `audio::mux` copies the encoded streams into the final container,stopping at the shorter one.### 3.4 The reader pool-Unchanged in purpose: one warm decoder per (file, size, chain), a-byte-budgeted LRU of decoded frames in front, "roll forward if the target is-close ahead, seek otherwise". The two backends it used to switch between-(linked when available, pipe otherwise) collapsed into one.+One warm decoder per (file, size, chain), a byte-budgeted LRU of decoded+frames in front, "roll forward if the target is close ahead, seek+otherwise". Export does not use it: export decodes every frame exactly once+in order, and a cache in that path is pure overhead.---@@ -238,7 +228,7 @@ flowchart TB## 5. Export-Hybrid pipeline in `concat-export`, unchanged in shape:+Hybrid pipeline in `concat-export`:- **Picture:** flattened timeline → per-frame composition in-process (CPU orwgpu) → the linked H.264 encoder.@@ -271,12 +261,11 @@ Hybrid pipeline in `concat-export`, unchanged in shape:## 7. The window-`engine/crates/concat` is the Slint tree ported from the wc-ui-rnd research-repository: 14.9k lines of `.slint` across the workspace (dockable seats-holding four views), the timeline (lanes, tabs, track headers, tray), the-inspector, the media bin, the launch screen, the export and settings sheets,-menus, tooltips, toasts, and the primitives under them. Fonts and effect-previews are embedded in the binary.+`engine/crates/concat` is 14.9k lines of `.slint` across the workspace+(dockable seats holding four views), the timeline (lanes, tabs, track+headers, tray), the inspector, the media bin, the launch screen, the export+and settings sheets, menus, tooltips, toasts, and the primitives under them.+Fonts and effect previews are embedded in the binary.The Rust side is small and split by what it owns:@@ -301,68 +290,62 @@ Two mechanisms carry the whole design:----## 8. Footguns and technical debt+## 8. Sharp edges and the work plan-The honest list, ordered by how much they matter. Nothing here is on fire,-but several are traps for a contributor who does not know the invariant.+Ordered by how much each matters. Every item is a trap for a contributor who+does not know the invariant, or a piece of work with a known shape.-### 8.1 The window is newly wired (highest priority)+### 8.1 Put a real project through every flow in the window-The wiring landed in one pass and has had one afternoon of use. Known from-that afternoon: the clip context menu's actions did not take effect in one-report, timeline clips draw no filmstrip (only audio clips draw their-waveform; `lanes.slint` still has the slot the reference tiled a filmstrip-into), and the monitor's failures used to be swallowed - they now log to-stderr and toast once. Expect more of this: every flow in §7 needs a real-project put through it, and the window has no tests of its own.+Every flow in §7 needs a real project put through it, and the window has no+tests of its own. Known items: the clip context menu's actions did not take+effect in one report; timeline clips draw no filmstrip (audio clips draw+their waveform, and `lanes.slint` has the slot); the monitor's failures log+to stderr and toast once. The durable fix is a headless harness that drives+`Studio` against a `Session` without a window and snapshots what it+publishes, so this class of bug is caught by a test.-### 8.2 Title clips have no rasteriser+### 8.2 Title clips need a rasteriser in the engine-The earlier web-based UI rasterised text clips to PNGs in the browser and-shipped them into the export as image clips - `ExportRequest` still expects-titles that way. Nothing in the Rust tree draws text into a `Frame`.-This needs a text rasteriser (a `cosmic-text`/`fontdue`-shaped crate against-the embedded Inter and Synonym faces) in the engine, so titles render-identically in the monitor and the export. Until then, text clips are-timeline objects with no picture.+`ExportRequest` takes rasterised titles as image clips, and nothing in the+tree draws text into a `Frame`. The work is a text rasteriser (a+`cosmic-text`/`fontdue`-shaped crate against the embedded Inter and Synonym+faces) in the engine, so titles render identically in the monitor and the+export.-### 8.3 The decoder's pacing changed semantics slightly+### 8.3 Fades count output frames-The subprocess applied `-r` (output pacing) after `-vf` (the effect chain),-so a `fade` in a chain counted *source* frames. `Decoder` runs the chain on-each *paced* output frame, so fades count output frames - which is what-`resolve_transitions` assumes when it computes `nb_frames` at the output-rate, and arguably more correct. Nobody has yet compared an exported dissolve-frame-for-frame against the old build. Do that before trusting it.+`Decoder` runs a clip's chain on each *paced* output frame, so a `fade` in a+chain counts output frames - which is what `resolve_transitions` assumes when+it computes `nb_frames` at the output rate. Compare an exported dissolve+frame for frame against an `ffmpeg` command-line render of the same graph+before trusting it.### 8.4 Lock discipline in `playback.rs`-Carried over unchanged: 28 `unwrap`/`expect` sites across four kinds of-threads (mix callback, transport, decode workers, cache sweep). One panic in-a decode worker poisons a mutex and cascades. Pick one poison policy-(probably: clear the poisoned state and carry on, since every cache here is-rebuildable) and apply it once.+28 `unwrap`/`expect` sites across four kinds of threads (mix callback,+transport, decode workers, cache sweep). One panic in a decode worker poisons+a mutex and cascades. Pick one poison policy (probably: clear the poisoned+state and carry on, since every cache here is rebuildable) and apply it once.### 8.5 Unbounded growth- `redo: Vec<Project>` in `concat-project`'s editor has **no cap** (undo iscapped at 200); each entry is a deep clone of the whole project.-- The reader pool's cache is bounded; the window's own image cache (once- wired) needs a bound too, or a long session of filmstrips accumulates- textures. Filmstrips are now raw RGBA `Frame`s with no disk cache (the old- JPEG cache went with the subprocess); posters are still cached as JPEG.+- The reader pool's cache is bounded; the window's image cache for filmstrips+ needs a bound too, or a long session accumulates textures. Filmstrips are+ raw RGBA `Frame`s with no disk cache; posters are cached as JPEG.### 8.6 The mix has no end-to-end test`mix_graph` is pinned by a dozen unit tests, and the export loop has teststhat render synthetic video; `mix_to_file` and `mux` are exercised by no-test with real audio; the integration test that covered the old subprocess-path went with the host it lived in. Write the replacement against a-generated tone before anything else touches the audio path.+test with real audio. Write one against a generated tone before anything+else touches the audio path.-### 8.7 Build-environment fragility+### 8.7 Build environment-- FFmpeg 7 is the floor (the display matrix moved to `coded_side_data` in+- FFmpeg 7 is the floor (the display matrix lives in `coded_side_data` from7.0; the code reads it there). Ubuntu 24.04 ships 6.1, hence the BtbNdownload in CI. A contributor with a distribution FFmpeg older than 7 getsa compile error deep in the bindings, not a message.@@ -370,16 +353,16 @@ generated tone before anything else touches the audio path.sys` downloads prebuilt static libraries at build time. A clean build needsthe network twice (three times counting `skia-bindings`) and severalminutes. The workspace lock resolves 746 crates.-- The workflows (`ci.yml`, `build-app.yml`, `release.yml`) were rewritten- for all of this and have not yet run green on all three platforms. Windows in particular- (libclang via chocolatey, `FFMPEG_DIR`, MSVC for whisper.cpp) is untested.+- The workflows (`ci.yml`, `build-app.yml`, `release.yml`) have to be run+ green on all three platforms. Windows (libclang via chocolatey,+ `FFMPEG_DIR`, MSVC for whisper.cpp) is the one to watch.-### 8.8 Shapes left over from the wire+### 8.8 DTO shapes in the export path-`ExportClip`, `ExportRequest` and `PreviewFrameRequest` are wire types-shaped for JSON; with no wire, `concat-export` could take the engine's-`Project` and settings directly and drop the flattening-through-a-DTO. The-`serde` derives on the host's view types are the same vestige.+`ExportClip`, `ExportRequest` and `PreviewFrameRequest` are JSON-shaped+DTOs. `concat-export` could take the engine's `Project` and settings+directly and drop the flattening-through-a-DTO; the `serde` derives on the+host's view types go with them.### 8.9 Panics in runtime paths@@ -393,13 +376,8 @@ tests, which is fine.- **Zero TODO/FIXME/HACK comments** in the tree. Invariants live in prosecomments instead; keep it that way.-- Comments in `concat/ui/*.slint` still cite `web/` (the React reference in- the wc-ui-rnd repository) and `desktop/` (the earlier app, deleted). They- are history, not pointers; rewrite them as the files are touched.-- Code comments still cite `docs/decisions/…` paths deleted long ago. Either- restore the records or strip the references.-- `cargo fmt --check` is not clean across the older crates and is not- enforced in CI; the new crates are formatted. Decide whether to enforce it.+- `cargo fmt --check` is not enforced in CI. Run it across the workspace+ once and add it to `ci.yml`.---@@ -431,5 +409,5 @@ variable frame rate, and odd containers are the cases most likely to bite.5. **Cap the redo stack** (§8.5) - a small patch, a real leak.6. **Green CI on all three platforms** (§8.7), then package the window andrestore automatic alpha releases.-7. **Frame-for-frame compare an exported dissolve** against a build from- before the FFI move (§8.3).+7. **Frame-for-frame compare an exported dissolve** against an `ffmpeg`+ command-line render (§8.3).diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 69940df4..d1ed688f 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -7,8 +7,8 @@ reporting what broke.## The most valuable thing you can doGrab a build from the [Releases](https://github.com/jub0t/Concat/releases) page-and edit a real video with it. Alpha software fails in ways nobody predicts-from reading the source. A good bug report — what you did, what happened, your+and edit a real video with it. Real footage finds what no reading of the+source does. A good bug report — what you did, what happened, yourOS, the media you used — is worth more than most patches.Longer-form discussion lives indiff --git a/README.md b/README.mdindex 4d785100..359a7b59 100644--- a/README.md+++ b/README.md@@ -20,7 +20,7 @@----<a href="https://trendshift.io/repositories/191379?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-191379" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/191379/daily?language=TypeScript" alt="jub0t%2FConcat | Trendshift" width="250" height="55"/></a>+<a href="https://trendshift.io/repositories/191379?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-191379" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/191379/daily?language=Rust" alt="jub0t%2FConcat | Trendshift" width="250" height="55"/></a>Concat is everything you use CapCut for — without the watermarks, paywalls,or subscriptions. A native Rust engine does the heavy lifting, a native@@ -28,9 +28,9 @@ interface does the editing, and it all runs on your machine: install it andstart cutting, no account, no extra downloads, no setup.> [!NOTE]-> The interface was rebuilt in Slint in September 2026 - one native Rust-> binary, no web view. It lives in [`engine/crates/concat`](./engine/crates/concat);-> see [`engine/README.md`](./engine/README.md) for how to build it.+> Concat is one native Rust binary: the engine and the Slint editor window+> live together in [`engine/`](./engine). See+> [`engine/README.md`](./engine/README.md) to build it from source.## Highlightsdiff --git a/TRANSLATING.md b/TRANSLATING.mdindex 057d7098..4a4e859f 100644--- a/TRANSLATING.md+++ b/TRANSLATING.md@@ -1,10 +1,8 @@# Translating Concat-The interface is being rebuilt in Slint, and its strings are not yet-wrapped for translation. The earlier web-based editor shipped with a-JSON-per-language scheme and a Simplified Chinese translation; that scheme-went with it.--The plan is Slint's own `@tr()` mechanism, which produces standard gettext-`.po` files translators already know how to work with. Until that lands-there is nothing to translate yet - watch this file and the changelog.+Concat's interface is built in Slint, and Slint's `@tr()` mechanism produces+standard gettext `.po` files, the format translators already know how to+work with. The string catalogue is being wrapped for it; when it lands, this+file carries the instructions for adding a language: where the `.po` files+live, how to regenerate the template, and how a translation is reviewed+before it ships. Watch this file and the changelog.diff --git a/engine/crates/concat-core/src/arena.rs b/engine/crates/concat-core/src/arena.rsindex 405df887..391cc645 100644--- a/engine/crates/concat-core/src/arena.rs+++ b/engine/crates/concat-core/src/arena.rs@@ -5,8 +5,7 @@//!//! Editor data is a graph - clips reference media, effects reference clips,//! nodes reference nodes - and Concat models that with handles into an arena-//! rather than with pointers. See-//! `docs/decisions/0003-arena-handles-not-pointers.md` for why.+//! rather than with pointers.//!//! The short version: [`Id`] is `Copy`, `Eq` and `Hash`, so it goes into undo//! records and across threads without ceremony, and the generation counterdiff --git a/engine/crates/concat-core/src/lib.rs b/engine/crates/concat-core/src/lib.rsindex 72ed77ca..36dd6948 100644--- a/engine/crates/concat-core/src/lib.rs+++ b/engine/crates/concat-core/src/lib.rs@@ -9,7 +9,7 @@//! - [`time`] - exact rational timestamps. Every time value in Concat is a//! [`time::Rational`] number of seconds. Never `f64`.//! - [`arena`] - generational arenas and `Copy` handles, the way Concat models-//! graphs. See `docs/decisions/0003-arena-handles-not-pointers.md`.+//! graphs.//! - [`frame`] - a decoded RGBA8 image buffer.//! - [`timeline`] - projects, tracks and clips.//!diff --git a/engine/crates/concat-export/src/chains.rs b/engine/crates/concat-export/src/chains.rsindex 7e1522d4..fbcaed28 100644--- a/engine/crates/concat-export/src/chains.rs+++ b/engine/crates/concat-export/src/chains.rs@@ -3,31 +3,19 @@//! The FFmpeg filter-chain builders: video effects and audio filters.//!-//! This is a byte-for-byte port of the two TypeScript catalogues that are the-//! ground truth for exported pixels and sound:+//! Two catalogues - video effects and audio filters - and the composition+//! that turns a clip's applied entries into one filter string. The strings+//! are the ground truth for exported pixels and sound, and the tests at the+//! bottom of this file pin the exact chain for every catalogue entry at its+//! default, minimum and maximum settings, character for character. Number+//! formatting matters as much as the maths: "0.5" and "0.50" are different+//! bytes in a filtergraph even when they are the same sigma, so every+//! interpolation fixes its precision on purpose.//!-//! - the video effect catalogue and-//! `buildEffectChain`.-//! - the audio filter catalogue and-//! `buildChain`.-//!-//! The contract is the same one `lib/editor.ts`'s ported arithmetic lives-//! under: the TS files are the mirror, and their fixtures-//! The pinned-string tests below-//! the exact chain string for every catalogue entry at its default, minimum-//! and maximum settings. The tests at the bottom of this file assert those-//! same strings, character for character - a change to either side that the-//! other does not make fails one suite or the other. Number formatting-//! matters as much as the maths: every interpolation reproduces what the JS-//! template literal produced (`toFixed`, `Math.round`), because "0.5" and-//! "0.50" are different bytes in a filtergraph even when they are the same-//! sigma.-//!-//! Composition is also the TS composition: enabled entries in applied order,-//! comma-joined, bypassed entries and unknown ids skipped, missing parameters-//! falling back to the catalogue defaults. Where the TS returns `null` for an-//! empty result, this returns the empty string - the Rust spelling of "no-//! chain".+//! Composition: enabled entries in applied order, comma-joined, bypassed+//! entries and unknown ids skipped, missing parameters falling back to the+//! catalogue defaults. An empty result is the empty string - the spelling+//! of "no chain".use std::collections::BTreeMap;@@ -37,8 +25,8 @@ use concat_project::model::AppliedFilter;/// the value an untouched slider means.struct Param {key: &'static str,- // The bounds are read only by the parity tests, which push every slider- // to each end the way the TS fixtures do - dead code to a plain build.+ // The bounds are read only by the pinning tests, which push every+ // slider to each end - dead code to a plain build.#[cfg_attr(not(test), allow(dead_code))]min: f64,#[cfg_attr(not(test), allow(dead_code))]@@ -153,9 +141,8 @@ fn fx_film_grain(p: &Params, _index: usize) -> String {}/// Graph labels embed the emitted index so two glows on one clip cannot-/// collide in a single filtergraph - the old fixed labels made FFmpeg-/// rejects the graph. The TS entry has the same bug; parity comes first, and-/// the fix must land on both sides together.+/// collide in a single filtergraph: fixed labels would make FFmpeg reject+/// the graph.fn fx_glow(p: &Params, index: usize) -> String {// Screen-blend a blurred copy over itself - the classic bloom.let opacity = fixed(p.get("amount") / 100.0, 2);@@ -176,10 +163,8 @@ fn fx_pixelate(p: &Params, _index: usize) -> String {format!("pixelize=width={size}:height={size}")}-/// KNOWN QUIRK, ported deliberately: the fixed `[mirl0]`/`[mirr0]`/`[mirf0]`-/// labels mean stacking mirror twice duplicates filtergraph labels and FFmpeg-/// rejects the graph. Same bug as the TS entry; the fix lands on both sides-/// together or not at all.+/// Labels embed the emitted index for the same reason as [`fx_glow`]:+/// stacking mirror twice must not duplicate a filtergraph label.fn fx_mirror(_: &Params, index: usize) -> String {format!("crop=iw/2:ih:0:0,split[mirl{index}][mirr{index}];[mirr{index}]hflip[mirf{index}];\@@ -415,8 +400,8 @@ fn af_sweet(p: &Params, _index: usize) -> String {let strength = p.get("amount").clamp(0.0, 100.0) / 100.0;let pitch = p.get("pitch");- // The coefficients are the TS entry's own (see its comment on why they- // are steeper than the reference chain it was ported from).+ // The coefficients are steeper than a textbook "sweet voice" chain on+ // purpose: at the slider's midpoint the change has to be audible.let shift = if pitch > 0.0 {pitch} else {@@ -642,7 +627,7 @@ static FILTERS: &[Entry] = &[// ─── composition ────────────────────────────────────────────────────────────/// Fills in any parameter the clip did not set, and drops any stray key the-/// entry does not declare - the TS `resolveParams`.+/// entry does not declare.fn resolve(entry: &Entry, set: &BTreeMap<String, f64>) -> Params {Params(entry@@ -677,21 +662,19 @@ fn compose(catalogue: &[Entry], applied: &[AppliedFilter]) -> String {}/// The complete FFmpeg *video* filter string for a clip's effects, or the-/// empty string if it has none - the TS `buildEffectChain`, whose `null`-/// this spells as `""`. Effects apply in the order they were added.+/// empty string if it has none. Effects apply in the order they were added.pub fn video_effect_chain(effects: &[AppliedFilter]) -> String {compose(EFFECTS, effects)}/// The complete FFmpeg *audio* filter string for a clip's filters, or the-/// empty string if it has none - the TS `buildChain`, whose `null` this-/// spells as `""`. Filters apply in the order they were added: EQ before a-/// limiter is a different sound from the reverse.+/// empty string if it has none. Filters apply in the order they were added:+/// EQ before a limiter is a different sound from the reverse.pub fn audio_filter_chain(filters: &[AppliedFilter]) -> String {compose(FILTERS, filters)}-// ─── tests: the pinned strings from effects.test.ts / filters.test.ts ───────+// ─── tests: the pinned strings ──────────────────────────────────────────────#[cfg(test)]mod tests {@@ -739,7 +722,7 @@ mod tests {}/// Asserts a fixture table covers exactly the given ids - a new- /// catalogue entry must pin its strings here, like the TS suites.+ /// catalogue entry must pin its strings here.fn assert_covers(table: &[(&str, &str)], mut ids: Vec<&str>, which: &str) {let mut covered: Vec<&str> = table.iter().map(|(id, _)| *id).collect();covered.sort_unstable();@@ -758,8 +741,7 @@ mod tests {.collect()}- // The expected strings below are copied verbatim from the TS fixtures- // (effects.test.ts / filters.test.ts), which pin the exporter's bytes.+ // The expected strings below pin the exporter's bytes.const EFFECT_DEFAULTS: &[(&str, &str)] = &[("black-white", "hue=s=0"),@@ -1044,10 +1026,9 @@ mod tests {#[test]fn stacking_one_labelled_effect_twice_keeps_its_graph_labels_distinct() {- // Labels embed the emitted index. With the old fixed labels, two- // glows on one clip duplicated [glowa] in a single filtergraph and- // FFmpeg rejected it - the whole export failed. Mirrors the TS test- // of the same name.+ // Labels embed the emitted index. With fixed labels, two glows on+ // one clip would duplicate [glowa] in a single filtergraph and+ // FFmpeg would reject it - the whole export would fail.let chain = video_effect_chain(&[applied("glow", &[]), applied("glow", &[])]);assert!(chain.contains("[glowa0]"), "was: {chain}");assert!(chain.contains("[glowa1]"), "was: {chain}");@@ -1071,7 +1052,7 @@ mod tests {#[test]fn no_effects_means_the_empty_string() {- // The TS returns null; the Rust spelling of "no chain" is "".+ // The spelling of "no chain" is "".assert_eq!(video_effect_chain(&[]), "");let mut off = applied("invert", &[]);off.enabled = false;@@ -1128,7 +1109,7 @@ mod tests {#[test]fn a_set_parameter_overrides_the_default() {- // The filters.test.ts chainKey fixture's chain, minus the key parts.+ // One filter with one slider moved off its default.assert_eq!(one_filter("echo", &[("delay", 0.5)]),"aecho=0.8:0.85:500:0.40"diff --git a/engine/crates/concat-export/src/flatten.rs b/engine/crates/concat-export/src/flatten.rsindex 5d2c1001..3b472e84 100644--- a/engine/crates/concat-export/src/flatten.rs+++ b/engine/crates/concat-export/src/flatten.rs@@ -3,17 +3,15 @@//! Flattening a project document into the exporter's clip list.//!-//! This is the step that used to live in the UI (`lib/monitor.ts`'s-//! `exportClipsOf`): walking a timeline's clips, resolving their media and-//! track, folding track state into per-clip flags, and building each clip's-//! FFmpeg chains from the structured effects the document stores. With it-//! engine-side, an export is derived from the engine's own model rather-//! than from whatever a frontend chose to send - the model of record and-//! the rendered pixels can no longer drift apart.+//! Walking a timeline's clips, resolving their media and track, folding+//! track state into per-clip flags, and building each clip's FFmpeg chains+//! from the structured effects the document stores. An export is derived+//! from the engine's own model, so the model of record and the rendered+//! pixels cannot drift apart.//!-//! Text clips are deliberately not flattened here. Titles rasterise in the-//! frontend (the fonts and layout engine live in the webview) and rejoin-//! the exporter as plain image clips; see `ExportRequest`'s caller.+//! Text clips are deliberately not flattened here. Titles rasterise+//! separately and rejoin the exporter as plain image clips; see+//! `ExportRequest`'s caller.use concat_project::model::{ClipKind as ModelClipKind, Project, Timeline};@@ -50,7 +48,7 @@ pub fn flatten_timeline(project: &Project, timeline_id: Option<&str>) -> Vec<ExpModelClipKind::Audio => ClipKind::Audio,ModelClipKind::Image => ClipKind::Image,// Filtered above; unreachable spelled as a skip so a new- // kind fails soft, exactly like the TS flattener's cast.+ // kind fails soft.ModelClipKind::Text => return None,},start: clip.start,@@ -72,10 +70,10 @@ pub fn flatten_timeline(project: &Project, timeline_id: Option<&str>) -> Vec<Expopacity: clip.opacity,video_filter_chain: video_effect_chain(&clip.video_effects),// Passed through unconditionally: `resolve_transitions` is- // the one adjacency judge (frame/2 tolerance). The TS- // flattener pre-filtered with its own 1/60 gate - identical- // at 30fps, and where the two differ, resolving is the- // kinder read of what the user placed.+ // the one adjacency judge (frame/2 tolerance). A fixed+ // 1/60 s gate here would agree at 30fps and disagree at+ // every other rate; resolving is the kinder read of what+ // the user placed.transition: clip.transition_in.as_ref()@@ -208,8 +206,8 @@ mod tests {}).expect("applies effect");let flat = flatten_timeline(editor.project(), None);- // The exact string is chains.rs's contract (pinned there and in the- // TS fixtures); here only that flattening routes through it.+ // The exact string is chains.rs's contract, pinned there; here+ // only that flattening routes through it.assert!(flat[0].video_filter_chain.contains("color_channel_mixer")|| !flat[0].video_filter_chain.is_empty(),diff --git a/engine/crates/concat-export/src/lib.rs b/engine/crates/concat-export/src/lib.rsindex 66b83a11..974fc83c 100644--- a/engine/crates/concat-export/src/lib.rs+++ b/engine/crates/concat-export/src/lib.rs@@ -11,11 +11,9 @@//! the clip list, transitions have already become overlaps, opacity ramps and//! fade filters.//!-//! This crate used to live inside the desktop host, which put editing-//! semantics (`resolve_transitions`) on the wrong side of the bridge. It-//! lives in the engine now so the CLI, the host and any future frontend-//! render one way, and so the doctrine holds: the host converts wire formats-//! and reports progress, nothing more.+//! It lives in the engine so the CLI, the host and the window render one+//! way, and so the doctrine holds: the host adds a destination and reports+//! progress, nothing more.//!//! Picture is composited frame by frame - on the GPU when the `gpu` feature//! is on and the machine has one, with the CPU compositor as the@@ -38,7 +36,7 @@ use concat_render::{Compositor, CpuCompositor, Layer, Placement, plan_frame};use serde::Deserialize;/// What a flattened clip is. Typed, so a kind check the compiler has not-/// seen cannot exist - the wire still says "video"/"audio"/"image".+/// seen cannot exist - the document says "video"/"audio"/"image".#[derive(Deserialize, Clone, Copy, PartialEq, Eq)]#[serde(rename_all = "lowercase")]pub enum ClipKind {@@ -734,8 +732,7 @@ pub struct PreviewFrameRequest {/// Composites the true frame at one instant, for the paused monitor.///-/// This is the engine presentation path's first step (desktop decision 0007):-/// the identical plan/composite the exporter runs, fed from the reader pool+/// The identical plan/composite the exporter runs, fed from the reader pool/// so scrubbing revisits are cache hits. Fade-to-colour transitions are NOT/// baked here - their filter frame numbers assume decode-from-clip-start,/// which pooled seeks break - so the UI keeps drawing its veil, whose shape@@ -969,7 +966,7 @@ mod tests {// A clip trimmed past its media's end: the paused monitor at that// time must show the last real frame, not a black composite and not- // an error. This is the exact shape that used to black the monitor.+ // an error.let mut outliving = clip("video", 0, 0.0, 3.0, 0.0);outliving.path = path.to_string_lossy().into_owned();let late = PreviewFrameRequest {diff --git a/engine/crates/concat-host/src/jobs.rs b/engine/crates/concat-host/src/jobs.rsindex 3aedd01a..4ab26b9c 100644--- a/engine/crates/concat-host/src/jobs.rs+++ b/engine/crates/concat-host/src/jobs.rs@@ -4,10 +4,10 @@//! One-at-a-time job slots for long-running work.//!//! Export, transcription and model downloads are all "one at a time", and-//! that invariant used to live in doc comments while the commands happily-//! accepted a second run: two exports would race each other's temp files, and-//! starting a second job *cleared* the shared cancel flag out from under the-//! first. [`SingleFlight`] makes the invariant code: `begin` refuses a second+//! a doc comment cannot enforce that: two exports would race each other's+//! temp files, and a cancel flag shared between runs would let a second+//! start clear it out from under the first. [`SingleFlight`] makes the+//! invariant code: `begin` refuses a second//! concurrent job, and every run gets its own cancel flag, so a cancel can//! only ever stop the job that is actually running and a new job can never be//! un-cancelled by a stale start or stopped by a stale cancel.diff --git a/engine/crates/concat-host/src/lib.rs b/engine/crates/concat-host/src/lib.rsindex 3c06746c..5737f8a6 100644--- a/engine/crates/concat-host/src/lib.rs+++ b/engine/crates/concat-host/src/lib.rs@@ -10,12 +10,9 @@//! project, composites the paused monitor's true frame, plays the audible//! clips, packs templates, and holds the one-at-a-time slots for long jobs.//!-//! It began as the host process of an earlier, web-based front end, where-//! every one of these converted wire formats. There is no wire - the window-//! calls these functions in-process - so what is left is the plumbing-//! itself, with the same doctrine: no editing decision is made here. If a-//! function starts deciding what an edit means, it belongs in-//! `concat-project`.+//! The window calls these functions in-process, and the doctrine is that+//! no editing decision is made here. If a function starts deciding what an+//! edit means, it belongs in `concat-project`.//!//! Nothing here knows about a window. Long work reports through callbacks//! and cancels through flags, and the caller decides which thread it runs on.diff --git a/engine/crates/concat-media/src/decode.rs b/engine/crates/concat-media/src/decode.rsindex 72014f0e..4754ddc8 100644--- a/engine/crates/concat-media/src/decode.rs+++ b/engine/crates/concat-media/src/decode.rs@@ -3,8 +3,7 @@//! Pulling RGBA frames out of a file.//!-//! One decoder does everything the old subprocess did with command-line-//! flags: it seeks to a start point and discards up to it frame-accurately,+//! One decoder does everything: it seeks to a start point and discards up to it frame-accurately,//! turns the picture the way its rotation asks, scales, runs the clip's//! effect chain through libavfilter, paces frames to a requested output rate//! by duplicating and dropping, repeats a still forever, and stops after adiff --git a/engine/crates/concat-media/src/peaks.rs b/engine/crates/concat-media/src/peaks.rsindex b43e833c..738e5b8f 100644--- a/engine/crates/concat-media/src/peaks.rs+++ b/engine/crates/concat-media/src/peaks.rs@@ -38,10 +38,9 @@ pub struct Peaks {}impl Peaks {- /// The wire and cache format the UI reads:+ /// The cache format:/// `[buckets_per_second f32][count u32][min f32 x count][max f32 x count]`,- /// little-endian. Kept byte-identical to what the UI used to write, so- /// existing project caches stay valid.+ /// little-endian. Frozen: the caches beside existing projects hold it.pub fn encode(&self) -> Vec<u8> {let count = self.min.len().min(self.max.len());let mut bytes = Vec::with_capacity(8 + count * 8);diff --git a/engine/crates/concat-media/src/pool.rs b/engine/crates/concat-media/src/pool.rsindex 05f6451c..bc1a4a8e 100644--- a/engine/crates/concat-media/src/pool.rs+++ b/engine/crates/concat-media/src/pool.rs@@ -3,12 +3,10 @@//! The reader pool and frame cache: random access to any frame of any file.//!-//! Everything before this decoded *forward*: open a decoder, pull frames in-//! order, drop it. That is exactly right for export and exactly wrong for-//! interactive use - scrubbing asks for arbitrary (media, time) pairs, and-//! respawning a process per request is why playback could not exist. This-//! module is the piece the decision log has called "the next real piece of-//! work" since the first CLI commit:+//! A decoder on its own reads *forward*: open it, pull frames in order,+//! drop it. That is exactly right for export and exactly wrong for+//! interactive use, where scrubbing asks for arbitrary (media, time) pairs.+//! This module is the answer://!//! - **One reader per (file, size, chain)**, kept warm between requests. A//! request near the reader's current position rolls forward (cheap,@@ -36,7 +34,7 @@ use crate::probe;/// How far ahead of a reader's position a request may be and still be worth/// decoding forward to, rather than seeking. Two seconds of 30fps material is-/// sixty decodes - cheaper than a subprocess respawn, comparable to a seek.+/// sixty decodes - comparable to a seek, and exact.const ROLL_FORWARD_FRAMES: i64 = 60;/// What one pooled frame request asks for.@@ -560,7 +558,7 @@ mod tests {// Far past the end - a clip that outlives its media. The last real// frame is the answer, not an error: a seek there decodes nothing,- // which used to surface as PartialFrame(0 bytes) and a black monitor.+ // and nothing must not become a zero-byte frame or a black monitor.let past_end = red_at(&mut pool, 300);assert!(near(past_end, 89),diff --git a/engine/crates/concat-project/src/commands.rs b/engine/crates/concat-project/src/commands.rsindex f0b44872..8bc65154 100644--- a/engine/crates/concat-project/src/commands.rs+++ b/engine/crates/concat-project/src/commands.rs@@ -3,11 +3,9 @@//! Every edit operation, as data.//!-//! A [`Command`] is what the UI sends over IPC; [`apply`] is the one place-//! its meaning lives. The semantics were ported line for line from the UI's-//! provisional model (deleted; decision 0007) and this file is now the only-//! copy - the clamps and tolerances documented on each variant are the-//! contract the UI's gesture echo mirrors and tests against.+//! A [`Command`] is what the window sends; [`apply`] is the one place its+//! meaning lives. The clamps and tolerances documented on each variant are+//! the contract the window's gesture echo mirrors and tests against.use std::collections::HashSet;@@ -156,7 +154,7 @@ pub struct NewMedia {pub has_audio: bool,}-/// Every edit, as the UI sends it over IPC: a tagged `op` plus camelCase+/// Every edit, as the window sends it: a tagged `op` plus camelCase/// fields. [`apply`] is the single place each variant's meaning lives; the/// notes here state the contract - clamps, tolerances, what gets minted -/// so a caller need not read `apply` to know what a command will do.@@ -635,8 +633,7 @@ fn assign<T: PartialEq>(slot: &mut T, value: T) -> bool {/// Applies one command. Errors are [`CommandError`]s, each rendering as a/// user-meaningful sentence; a command that legitimately does nothing (a/// no-op rename, an out-of-range split) returns Ok with no created id and-/// [`Outcome::applied`] false, matching the tolerant TS operations it-/// replaces.+/// [`Outcome::applied`] false.pub fn apply(project: &mut Project,mint: &mut IdMint,diff --git a/engine/crates/concat-project/src/doc.rs b/engine/crates/concat-project/src/doc.rsindex 79023281..f04320fa 100644--- a/engine/crates/concat-project/src/doc.rs+++ b/engine/crates/concat-project/src/doc.rs@@ -8,14 +8,13 @@//! it keeps whichever name a project already has, and this module never//! looks at a filename.//!-//! The reader began as a port of the UI's `persist.ts` (deleted; decision-//! 0007) and its tolerance rules are the contract with every document+//! The reader's tolerance rules are the contract with every document//! already on disk: every field defaults rather than being trusted, clips whose//! track or media vanished are dropped, text clips survive without media,//! legacy flat documents load as a single timeline. A hand-edited or older//! file must degrade to something openable, never to a load error.//!-//! The writer produces the same structure `toDocument` writes - including the+//! The writer produces the same structure - including the//! flat `tracks`/`clips` mirror of the active timeline that keeps documents//! openable in builds that predate multiple timelines.diff --git a/engine/crates/concat-project/src/lib.rs b/engine/crates/concat-project/src/lib.rsindex b58e5603..a53b00c5 100644--- a/engine/crates/concat-project/src/lib.rs+++ b/engine/crates/concat-project/src/lib.rs@@ -8,16 +8,14 @@//! ([`doc`]), and the undo stack ([`editor::Editor`]) - all headless, all//! testable without a window.//!-//! The semantics began as clamp-for-clamp ports of the UI's provisional-//! `lib/project.ts`, which is deleted (decision 0007); the migration framing-//! that used to live here is history. What survives it, deliberately:+//! Two rules hold throughout://!//! 1. **The document format is frozen by the documents that exist.** Saved-//! projects load forever, tolerance rules included - not because a TS-//! twin must agree, but because users' work does not migrate on our-//! schedule. Format changes go through `DOCUMENT_VERSION`.+//! projects load forever, tolerance rules included, because users' work+//! does not migrate on our schedule. Format changes go through+//! `DOCUMENT_VERSION`.//! 2. **f64 seconds and String ids are the document's terms**, kept until a-//! version 2 decides otherwise on purpose - not an accident of porting.+//! version 2 decides otherwise on purpose.//!//! Deliberately a separate crate rather than part of `concat-core`: the//! document model needs serde, and concat-core's zero-dependency rule is worth@@ -288,12 +286,11 @@ mod tests {}#[test]- fn a_typescript_written_document_loads() {- // The exact shape the deleted TS persist layer used to write,- // optional fields omitted the way JSON.stringify drops undefined -- // documents like this exist on disk and must load forever.+ fn a_version_one_document_loads() {+ // The shape of a version-1 document as it sits on disk, optional+ // fields omitted - documents like this exist and must load forever.let document = json!({- "concat": "0.1.0", "version": 1, "name": "TS",+ "concat": "0.1.0", "version": 1, "name": "v1","video": { "width": 1920, "height": 1080, "rateNum": 30, "rateDen": 1 },"media": [{ "id": "m1", "path": "/a.mp4", "name": "a.mp4", "duration": 10.0,"kind": "video", "width": 1920, "height": 1080, "frameRate": 30.0,@@ -355,8 +352,8 @@ mod tests {#[test]fn commands_arrive_in_camel_case() {- // The wire format the UI speaks. A snake_case field here means the- // TypeScript side silently sends values serde never sees.+ // The format the window speaks. A snake_case field here means a+ // caller silently sends values serde never sees.let command: Command = serde_json::from_value(json!({"op": "addClip", "mediaId": "m1", "trackId": "T1", "start": 2.0}))@@ -678,7 +675,7 @@ mod tests {#[test]fn moves_to_a_vanished_track_keep_the_time_change_and_drop_the_track_change() {// Pinned deliberately: a drag that races a track deletion still- // lands its horizontal half, exactly as the TS operation tolerated.+ // lands its horizontal half.let (mut editor, _, clip_id) = fixture();let outcome = editor.apply(Command::MoveClips {diff --git a/engine/crates/concat-project/src/model.rs b/engine/crates/concat-project/src/model.rsindex ed88a327..cfbfee50 100644--- a/engine/crates/concat-project/src/model.rs+++ b/engine/crates/concat-project/src/model.rs@@ -4,14 +4,12 @@//! The document model: what a Concat project *is*.//!//! Times are `f64` seconds here because that is what the on-disk format-//! stores, and the documents that exist freeze the format (the provisional-//! TS twin this shape once mirrored is deleted; decision 0007). The-//! conversion to exact rationals stays at the render boundary --//! `concat-export`'s timeline builder. Moving the *document* to rational-//! time is a format decision for a deliberate version 2, made once, here.+//! stores, and the documents that exist freeze the format. The conversion+//! to exact rationals stays at the render boundary - `concat-export`'s+//! timeline builder. Moving the *document* to rational time is a format+//! decision for a deliberate version 2, made once, here.//!-//! Serde names are camelCase so a document written by this crate is byte-level-//! compatible with one written by the TypeScript side.+//! Serde names are camelCase: that is the document's spelling.use std::collections::BTreeMap;@@ -291,10 +289,8 @@ pub struct Clip {pub text: Option<TextStyle>,}-/// One timeline: a name and its lanes and clips. Unlike the UI's provisional-/// model there is no "shelf" - that split existed only so the TypeScript-/// operations could stay ignorant of timelines. Here every operation takes-/// the project and works on whichever timeline is active.+/// One timeline: a name and its lanes and clips. Every operation takes the+/// project and works on whichever timeline is active.#[derive(Clone, PartialEq, Debug, Serialize, Deserialize)]#[serde(rename_all = "camelCase")]pub struct Timeline {diff --git a/engine/crates/concat-render/src/gpu.rs b/engine/crates/concat-render/src/gpu.rsindex 4178f5fc..e8c08dfb 100644--- a/engine/crates/concat-render/src/gpu.rs+++ b/engine/crates/concat-render/src/gpu.rs@@ -3,9 +3,9 @@//! The wgpu compositor.//!-//! The second implementation of [`Compositor`](crate::Compositor), as decision-//! 0004 planned: [`CpuCompositor`](crate::CpuCompositor) stays the reference,-//! and this one exists to be fast. Layers are uploaded as textures, drawn as+//! The second implementation of [`Compositor`](crate::Compositor):+//! [`CpuCompositor`](crate::CpuCompositor) stays the reference, and this+//! one exists to be fast. Layers are uploaded as textures, drawn as//! transformed quads into an offscreen target, and read back as a [`Frame`].//!//! Deliberate parity choices, so the two backends can be diffed:diff --git a/engine/crates/concat-render/src/lib.rs b/engine/crates/concat-render/src/lib.rsindex eb58de1b..d0a46d31 100644--- a/engine/crates/concat-render/src/lib.rs+++ b/engine/crates/concat-render/src/lib.rs@@ -10,8 +10,8 @@//! testable, and identical for the CPU and GPU backends.//! 2. [`compositor`] takes that plan plus the decoded pixels and blends them.//!-//! Only step 2 is backend-specific. See-//! `docs/decisions/0004-cpu-compositor-first.md`.+//! Only step 2 is backend-specific. The CPU compositor is the reference+//! implementation; the GPU one exists to be fast and must match it.pub mod compositor;#[cfg(feature = "gpu")]diff --git a/engine/crates/concat/Cargo.toml b/engine/crates/concat/Cargo.tomlindex f9a6024b..d9e27ff0 100644--- a/engine/crates/concat/Cargo.toml+++ b/engine/crates/concat/Cargo.toml@@ -68,10 +68,9 @@ serde_json.workspace = true# the default here is that its text rendering is gamma-correct, not that it is# known to be cheaper.#-# Theme.weight-body/weight-title are 400/500 to match: the 500/600 they used to-# carry compensated for FemtoVG compositing glyph coverage without gamma-# correction. Put them back if you build --features wgpu, or the text will be-# too light there.+# Theme.weight-body/weight-title are 400/500 to match. FemtoVG composites+# glyph coverage without gamma correction, which 500/600 compensates for, so+# use those if you build --features wgpu, or the text will be too light there.## FemtoVG over wgpu rather than over OpenGL: same renderer, native graphics# API underneath - Metal on macOS, D3D12 on Windows, Vulkan on Linux -diff --git a/engine/crates/concat/src/format.rs b/engine/crates/concat/src/format.rsindex 57c7016f..48cb2216 100644--- a/engine/crates/concat/src/format.rs+++ b/engine/crates/concat/src/format.rs@@ -163,11 +163,10 @@ pub fn hex_of(colour: slint::Color) -> String {/// The audio envelope, as SVG path commands in a 1x1 box.///-/// Columns, not a curve. The reference fills one rectangle per pixel of clip-/// width - `context.rect(x + column, top, 1, ...)` for every column, then one-/// fill - so its waveform is a stepped silhouette with a flat top on every-/// column. Drawing the same peaks as a polyline gives a smooth, rounded shape-/// that reads as a graph of something rather than as audio.+/// Columns, not a curve. Each column is one rectangle, from the lowest to the+/// highest peak under it, so the waveform is a stepped silhouette with a flat+/// top on every column. Drawing the same peaks as a polyline gives a smooth,+/// rounded shape that reads as a graph of something rather than as audio.////// Built from the engine's real peaks: each column takes the extremes of/// the buckets that fall under it, so a trim shows the material it kept.@@ -182,8 +181,8 @@ pub fn wave_path(/// Columns across the clip. Enough that the steps read as columns and/// not as a bar chart, few enough that the string stays a few kilobytes.const COLUMNS: usize = 128;- /// Silence still draws a sliver, the way the reference's `max(1, ...)`- /// keeps a one-pixel line rather than a gap in the middle of a clip.+ /// Silence still draws a sliver: a hairline through the middle of a clip+ /// rather than a gap in it.const FLOOR: f32 = 0.012;if duration <= 0.0 || peaks.min.is_empty() || peaks.buckets_per_second <= 0.0 {diff --git a/engine/crates/concat/src/main.rs b/engine/crates/concat/src/main.rsindex 234839ba..dde1bf2f 100644--- a/engine/crates/concat/src/main.rs+++ b/engine/crates/concat/src/main.rs@@ -3,11 +3,6 @@//! Concat's editor window, in Slint.//!-//! Ported from the `slint/` tree of the wc-ui-rnd repository, where the UI was-//! built twice - once in React (its `web/` tree) and once here - so the two-//! stacks could be compared on one design. Comments in the `.slint` files-//! that cite `web/` mean that reference implementation.-//!//! This file is the wiring: it starts the engine's services, builds the//! window, and binds every callback the `.slint` tree exposes to the state//! in [`studio`]. The state reads the engine's project and writes commandsdiff --git a/engine/crates/concat/ui/app.slint b/engine/crates/concat/ui/app.slintindex 45ca8e12..31e3c009 100644--- a/engine/crates/concat/ui/app.slint+++ b/engine/crates/concat/ui/app.slint@@ -1,18 +1,17 @@// SPDX-License-Identifier: AGPL-3.0-or-later// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors-// Inter is bundled rather than assumed: the web build names it first in a-// font stack and degrades to the system UI face, but a desktop binary should-// look the same on a machine that has never installed it. One file per weight-// the design uses — 400 body, 500 titles, 600 the page heading.+// Inter is bundled rather than assumed: a desktop binary should look the same+// on a machine that has never installed it. One file per weight the design+// uses — 400 body, 500 titles, 600 the page heading.import "fonts/Inter-Regular.ttf";import "fonts/Inter-Medium.ttf";import "fonts/Inter-SemiBold.ttf";-// Synonym, the reference editor's text face (desktop/src/styles.css names it-// --font-sans). It ships there as one variable woff2, which Slint cannot load,-// so these are static instances cut from it at the three weights the theme-// uses. Licensed under the ITF Free Font License — see fonts/LICENSE-Synonym.+// Synonym, the interface's text face. It is published as one variable font,+// which Slint cannot load, so these are static instances cut from it at the+// three weights the theme uses. Licensed under the ITF Free Font License — see+// fonts/LICENSE-Synonym.import "fonts/Synonym-Regular.ttf";import "fonts/Synonym-Medium.ttf";import "fonts/Synonym-SemiBold.ttf";@@ -161,11 +160,9 @@ export component App inherits Window {changed meter-watched => {root.meter-watched-changed(root.meter-watched);}- // Left unbound. It used to read the ConfigPane's own hover flag, and- // there is no longer one ConfigPane to read — a seat may hold two of- // them or none. Nothing sets it, so the level timer in main.rs stays- // disarmed, which is where it already was: the demo meter left the pane- // when the inspector was ported, and nothing has driven it since.+ // Left unbound. A seat may hold two ConfigPanes or none, so there is no+ // single hover flag for this to read. Nothing sets it, so the level timer+ // in main.rs stays disarmed.out property <bool> meter-watched;/// The same seam, and just as idle. main.rs reads it on every tick.out property <bool> muted;@@ -184,9 +181,9 @@ export component App inherits Window {// takes focus on one.// - A key goes to the focused element first and walks up the ancestors// with whatever that one rejects, so the bindings below only fire when- // nothing in the window wanted the keystroke. That is the rule the- // reference writes out by hand — its handler returns early when the- // event target is an input — and here it is the delivery order.+ // nothing in the window wanted the keystroke. A field that is being+ // typed into keeps its keys, and that comes from the delivery order+ // rather than from a check on the target.//// `Control` in a binding is the platform's own command modifier: Slint// remaps it to ⌘ on macOS, which is also what the menu row beside it says.diff --git a/engine/crates/concat/ui/demo/interpolation-panel.slint b/engine/crates/concat/ui/demo/interpolation-panel.slintindex a4216251..d6b6d629 100644--- a/engine/crates/concat/ui/demo/interpolation-panel.slint+++ b/engine/crates/concat/ui/demo/interpolation-panel.slint@@ -9,10 +9,9 @@ import { AlignToolbar, EditorHeader } from "editor-chrome.slint";// Runs a dot across the row using the live curve as its timing function.//-// CSS gets this from `transition-timing-function: cubic-bezier(...)`. Slint's-// `easing:` takes literals only, so the dot is animated linearly and the curve-// is applied to the result — which means the solver has to be callable, and-// that is why Curves.ease lives in Rust.+// Slint's `easing:` takes literals only, so the dot is animated linearly and+// the curve is applied to the result — which means the solver has to be+// callable, and that is why Curves.ease lives in Rust.component EasePreview inherits Rectangle {in property <Bezier> curve;in property <bool> enabled;@@ -31,16 +30,13 @@ component EasePreview inherits Rectangle {background: Theme.field;border-radius: Theme.r;- // Gated on hover rather than left running, which is a deliberate departure- // from web/.+ // Gated on hover rather than left running.//// A Slint animation in flight drives the render loop at the monitor's// refresh rate, and nothing here renders partially, so every one of those// frames repaints the entire window. Ease is the default mode, so ungated- // this single animation — 1200ms out of every 1500ms — held the whole app- // at full refresh forever to move one dot. The browser can afford to run it- // always because it composites a transform on the GPU without repainting- // anything.+ // this single animation — 1200ms out of every 1500ms — would hold the+ // whole app at full refresh forever to move one dot.Timer {interval: 1500ms;running: root.enabled && hover.has-hover;diff --git a/engine/crates/concat/ui/dialogs/export.slint b/engine/crates/concat/ui/dialogs/export.slintindex 79a3d905..37bcfbeb 100644--- a/engine/crates/concat/ui/dialogs/export.slint+++ b/engine/crates/concat/ui/dialogs/export.slint@@ -6,13 +6,12 @@ import { Glyph, Icon } from "../icons.slint";import { Button, DialogRow, DialogSection, Field, Modal, Progress } from "../primitives/modal.slint";import { Select } from "../primitives/select.slint";-// The export dialog, ported from the reference's ExportDialog and dressed with-// web/'s export panel.+// The export dialog.//-// The reference states the format, asks where the file goes, offers three-// quality presets and starts. web/ puts the deciding number *on* each preset —-// what the file will actually weigh — which is the thing the choice hinges on-// and was otherwise nowhere. That is the borrowing.+// It states the format, asks where the file goes, offers three quality+// presets and starts. The deciding number sits *on* each preset — what the+// file will actually weigh — because that is the thing the choice hinges on,+// and it belongs where the choice is made.export enum ExportPhase { idle, running, done, failed }@@ -52,8 +51,8 @@ export struct ExportData {//// The block is a rounded rectangle in the hairline colour with 1px gaps// between its rows, so the separators are the ground showing through rather-// than lines drawn on top — which is how web/ builds it, and why the rules-// stop exactly at the rounded corners instead of running into them.+// than lines drawn on top — which is why the rules stop exactly at the rounded+// corners instead of running into them.component Fact inherits Rectangle {in property <string> label;in property <string> value;diff --git a/engine/crates/concat/ui/dialogs/settings.slint b/engine/crates/concat/ui/dialogs/settings.slintindex 77971f2b..a3b6a66a 100644--- a/engine/crates/concat/ui/dialogs/settings.slint+++ b/engine/crates/concat/ui/dialogs/settings.slint@@ -8,12 +8,11 @@ import { IconButton } from "../primitives/panel.slint";import { SegmentedControl } from "../primitives/segmented-control.slint";import { PaneScroll } from "../workspace/pane.slint";-// Settings, ported from the reference's SettingsDialog: a fixed-height sheet-// with a column of pages down the side. The model rows take their shape from-// web/'s transcriber panel, which separates the two things the reference's row-// conflated — a downloaded model is a *choice* and so behaves as a radio,-// while an absent one is an *acquisition* and is handled by the button on the-// right. That distinction is the whole reason the row reads at a glance.+// Settings: a fixed-height sheet with a column of pages down the side. The+// model rows keep two things apart — a downloaded model is a *choice* and so+// behaves as a radio, while an absent one is an *acquisition* and is handled+// by the button on the right. That distinction is the whole reason the row+// reads at a glance.export struct ModelData {id: string,diff --git a/engine/crates/concat/ui/icons.slint b/engine/crates/concat/ui/icons.slintindex a4864376..218b4c5d 100644--- a/engine/crates/concat/ui/icons.slint+++ b/engine/crates/concat/ui/icons.slint@@ -3,30 +3,26 @@import { Theme } from "theme/theme.slint";-// Single adapter between glyph data and the primitives, the counterpart of-// desktop/src/components/Icon.tsx. That file resolves a name through two icon-// packages and falls back to hand-drawn paths; Slint has no icon package, so-// the same three sources are inlined here as path data.+// Single adapter between glyph data and the primitives. Slint has no icon+// package, so the glyphs are inlined here as path data and resolved by name.//-// The data is the libraries' own, copied out of the packages the reference-// depends on rather than traced from a picture of them. What was here before-// was traced, and a trace is a drawing of an icon: close at 24px, wrong at the-// 11-14px this interface is full of, where a coordinate off by half a unit is-// half a pixel of a two-pixel stroke.+// The data is the libraries' own, copied out of their packages rather than+// traced from a picture of them. A trace is a drawing of an icon: close at+// 24px, wrong at the 11-14px this interface is full of, where a coordinate+// off by half a unit is half a pixel of a two-pixel stroke.//// Lucide for everything it carries, which is everything but the alignment set.-// The reference splits its glyphs between Heroicons for generic chrome and-// Lucide for the editor's vocabulary, and that split is right for a browser-// drawing at 16-24px: Heroicons is authored for a 1.5 stroke on a 24 grid and-// has the detail to spend. This window draws its glyphs at 11-15px, where that-// detail closes up — heroicons/film is fourteen subpaths of sprockets and-// rails, and at 14px it is a grey rectangle. Lucide is authored at a 2 stroke-// for small display, and one family across the whole set also means one-// weight, so nothing needs compensating against anything else.+// Heroicons is the other obvious source for generic chrome, and at 16-24px it+// is a fine one: it is authored for a 1.5 stroke on a 24 grid and has the+// detail to spend. This window draws its glyphs at 11-15px, where that detail+// closes up — heroicons/film is fourteen subpaths of sprockets and rails, and+// at 14px it is a grey rectangle. Lucide is authored at a 2 stroke for small+// display, and one family across the whole set also means one weight, so+// nothing needs compensating against anything else.//// Three shapes of glyph, on two grids:// - Stroked the whole set, lucide's paths at lucide's weight, 24 grid-// - Filled play and pause, which are closed shapes the reference fills+// - Filled play and pause, closed shapes drawn solid// - Solid the alignment marks, on Radix's 15 grid — see `Solid` below//// To take a glyph from somewhere else: copy the `d` of every element in its@@ -303,7 +299,6 @@ export component Icon inherits Rectangle {// Three sliders, deliberately not a cog: a ring with rays is a sun in all// but name, and it would sit next to the actual sun of the theme toggle.- // The reference's own note on the same choice.// lucide/sliders-horizontalif root.glyph == Glyph.settings: Stroked {size: root.size; tint: root.tint; weight: root.weight;@@ -376,8 +371,8 @@ export component Icon inherits Rectangle {}// A laid-out frame with a filled top band — the shape a template is,- // rather than the dashed placeholder box this used to draw. Slint has no- // stroke-dash-array, so the dashes were never there anyway.+ // rather than a dashed placeholder box, which Slint could not draw anyway:+ // it has no stroke-dash-array.// lucide/layout-templateif root.glyph == Glyph.slot: Stroked {size: root.size; tint: root.tint; weight: root.weight;@@ -491,9 +486,9 @@ export component Icon inherits Rectangle {+ " 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z";}- // Filled, the way the reference passes `fill="currentColor"` to them: at- // 16px an outlined triangle reads as an outline of a play button rather- // than as one. Lucide draws both as closed shapes, so the same path fills.+ // Filled rather than stroked: at 16px an outlined triangle reads as an+ // outline of a play button rather than as one. Lucide draws both as closed+ // shapes, so the same path fills.// lucide/playif root.glyph == Glyph.play: Filled {size: root.size; tint: root.tint;diff --git a/engine/crates/concat/ui/inspector/clip-inspector.slint b/engine/crates/concat/ui/inspector/clip-inspector.slintindex 48998744..919430b1 100644--- a/engine/crates/concat/ui/inspector/clip-inspector.slint+++ b/engine/crates/concat/ui/inspector/clip-inspector.slint@@ -11,9 +11,9 @@ import {} from "controls.slint";import { ClipField, ClipKind, SelectedClipData } from "../timeline/model.slint";-// The editor's clip inspector, ported from web/src/demo/inspector/: one-// panel, three tabs. Adjust is direct controls; Filters and Effects differ-// only in their catalogue, so both are PresetStack with different data.+// The editor's clip inspector: one panel, three tabs. Adjust is direct+// controls; Filters and Effects differ only in their catalogue, so both are+// PresetStack with different data./// One parameter a preset exposes. `value` doubles as the default in the/// catalogue: applying a preset copies the row, and double-click restores@@ -283,10 +283,9 @@ export component PresetStack inherits VerticalLayout {// The Adjust tab: what can be changed about the selected clip.//-// The panel adapts to the kind rather than the tab strip doing it all, which-// is how the reference splits it (AdjustPanel.tsx): a still has picture but no-// sound, so it gets Transform and nothing else; an audio clip has sound but no-// picture, so it gets everything but Transform.+// The panel adapts to the kind rather than the tab strip doing it all: a+// still has picture but no sound, so it gets Transform and nothing else; an+// audio clip has sound but no picture, so it gets everything but Transform.//// The fader for level works in decibels, not linear gain. Linear puts every// useful setting in the bottom sixth of the travel; decibels is both how the@@ -615,9 +614,9 @@ export component FilterPanel inherits VerticalLayout {}}-// The catalogues, mirrored from web/src/demo/inspector/presets.ts. Data only:-// the stack renders whatever params a preset declares, so adding a processor-// is one entry here and no change to the panel.+// The catalogues. Data only: the stack renders whatever params a preset+// declares, so adding a processor is one entry here and no change to the+// panel. The ids are written into project files, so they are stable forever.export global PresetCatalog {out property <[string]> filter-groups: ["Voice", "Tone", "Space"];out property <[string]> effect-groups: ["Dynamics", "Time", "Colour"];diff --git a/engine/crates/concat/ui/inspector/controls.slint b/engine/crates/concat/ui/inspector/controls.slintindex f23dae32..871c274d 100644--- a/engine/crates/concat/ui/inspector/controls.slint+++ b/engine/crates/concat/ui/inspector/controls.slint@@ -6,15 +6,14 @@ import { Fmt } from "../util.slint";import { Glyph, Icon } from "../icons.slint";import { NumberField } from "../primitives/number-field.slint";-// The clip inspector's controls, ported from web/src/demo/inspector/-// controls.tsx: a horizontal fader, the Param row that repeats down every-// tab, a switch, a help disclosure, a note, and a search field. Written to-// the same contract as primitives/ — value plus a changed callback — so-// promoting one later is a file move rather than a rewrite.--// How a parameter's readout is spelled. The web build passes a closure per-// param; a Slint struct cannot carry one, so the catalogue names one of these-// and InspectorFmt renders it.+// The clip inspector's controls: a horizontal fader, the Param row that+// repeats down every tab, a switch, a help disclosure, a note, and a search+// field. Written to the same contract as primitives/ — value plus a changed+// callback — so promoting one later is a file move rather than a rewrite.++// How a parameter's readout is spelled. A Slint struct cannot carry a+// closure, so the catalogue names one of these per param and InspectorFmt+// renders it.export enum ParamFormat {percent, // "45%"pitch, // 0 is "auto", else "+3 st"@@ -474,12 +473,10 @@ export component SearchField inherits Rectangle {// A colour on a labelled row.//-// The reference hands this to the platform — `<input type="color">` — which-// has no counterpart here. Rather than fake an eyedropper and a wheel, the-// swatch opens a shelf of the colours a title actually gets set to: the-// neutrals it is legible on, and the kind hues already in the theme. The hex-// is shown beside it so a value from outside the shelf is still readable-// rather than invisible.+// Rather than fake an eyedropper and a wheel, the swatch opens a shelf of the+// colours a title actually gets set to: the neutrals it is legible on, and+// the kind hues already in the theme. The hex is shown beside it so a value+// from outside the shelf is still readable rather than invisible.export component ColourField inherits HorizontalLayout {in property <string> label;in property <color> value;diff --git a/engine/crates/concat/ui/inspector/text-panel.slint b/engine/crates/concat/ui/inspector/text-panel.slintindex 277e30e1..734f295b 100644--- a/engine/crates/concat/ui/inspector/text-panel.slint+++ b/engine/crates/concat/ui/inspector/text-panel.slint@@ -12,7 +12,7 @@ import {ClipField, ClipTextField, SelectedClipData, TextAlignment,} from "../timeline/model.slint";-// The Text tab, ported from the reference's TextPanel.tsx.+// The Text tab.//// A title is the one thing on the timeline that is not a file, so it gets its// own inspector and nothing else: no volume, no speed, no audio filters.@@ -24,9 +24,7 @@ import {// should not move when the project is exported at 4K.export component TextPanel inherits VerticalLayout {in property <SelectedClipData> selected;- /// The faces this build has. The reference also imports custom fonts from- /// disk, which needs a file picker this crate does not have — so the list- /// is what is bundled, and the add-a-font flow is the gap.+ /// The faces this build bundles.in property <[string]> families: ["Inter", "Synonym"];callback set(field: ClipField, value: float);diff --git a/engine/crates/concat/ui/primitives/bezier-editor.slint b/engine/crates/concat/ui/primitives/bezier-editor.slintindex 40584b7d..400f9132 100644--- a/engine/crates/concat/ui/primitives/bezier-editor.slint+++ b/engine/crates/concat/ui/primitives/bezier-editor.slint@@ -135,8 +135,7 @@ export component BezierEditor inherits Rectangle {}// Each handle keeps its own focus scope, so Tab walks the two control- // points the way the two <g role="slider"> elements do on the web. They sit- // below the drag surface and are focused from it.+ // points. They sit below the drag surface and are focused from it.fs1 := FocusScope {x: root.to-x(root.x1) - 12px;y: root.to-y(root.y1) - 12px;diff --git a/engine/crates/concat/ui/primitives/context-menu.slint b/engine/crates/concat/ui/primitives/context-menu.slintindex 040ed147..52d2524f 100644--- a/engine/crates/concat/ui/primitives/context-menu.slint+++ b/engine/crates/concat/ui/primitives/context-menu.slint@@ -4,18 +4,17 @@import { Theme } from "../theme/theme.slint";import { Glyph, Icon } from "../icons.slint";-// The right-click menu, ported from web/'s full context menu: an icon slot-// every row shares, a label, a right-set shortcut hint, checkbox rows, group-// labels, separators, and one row that may be red.+// The right-click menu: an icon slot every row shares, a label, a right-set+// shortcut hint, checkbox rows, group labels, separators, and one row that may+// be red.//-// Two departures from the reference, both forced:+// Two constraints shape it://-// Submenus are gone. A Slint struct cannot hold an array, so a row cannot-// carry its own children; the reference's Speed submenu is expressed here as a-// group label with its options under it, which is a row type the design-// already has. Flat also happens to suit a timeline — the menu is a list of-// verbs about one clip, and burying half of them one level down would be worse-// even where it were possible.+// There are no submenus. A Slint struct cannot hold an array, so a row cannot+// carry its own children; a set of options such as Speed is a group label with+// its options under it, which is a row type the design already has. Flat also+// suits a timeline — the menu is a list of verbs about one clip, and burying+// half of them one level down would be worse even where it were possible.//// The surface is sized by the caller rather than by its content. Summing the// row heights means looping over a model, which the expression language cannotdiff --git a/engine/crates/concat/ui/primitives/focus-ring.slint b/engine/crates/concat/ui/primitives/focus-ring.slintindex a6525d2d..aacc1e1e 100644--- a/engine/crates/concat/ui/primitives/focus-ring.slint+++ b/engine/crates/concat/ui/primitives/focus-ring.slint@@ -3,9 +3,9 @@import { Theme } from "../theme/theme.slint";-// Slint has no box-shadow, so the `--cp-focus` token is drawn as two rings:-// a 1px accent outline on the control's own edge and a 2px soft halo just-// outside it. Drop it in as the last child of a non-layout parent, where it+// Slint has no box-shadow, so the focus ring is drawn as two rings: a 1px+// accent outline on the control's own edge and a 2px soft halo just outside+// it. Drop it in as the last child of a non-layout parent, where it// fills the parent and paints over everything without taking pointer events.export component FocusRing inherits Rectangle {in property <bool> active;diff --git a/engine/crates/concat/ui/primitives/level-meter.slint b/engine/crates/concat/ui/primitives/level-meter.slintindex efd67f94..f22e3d5d 100644--- a/engine/crates/concat/ui/primitives/level-meter.slint+++ b/engine/crates/concat/ui/primitives/level-meter.slint@@ -6,8 +6,7 @@ import { Fmt } from "../util.slint";// Audio level meter. The green/amber/red ramp is painted at full length and// revealed by a clipping window, so a colour always means the same level-// regardless of how far the bar has filled — the same trick the web version-// plays with clip-path.+// regardless of how far the bar has filled.//// The root takes whatever the row gives it and the track is drawn `thickness`// across, centred inside it. Pinning the root itself would need a binding thatdiff --git a/engine/crates/concat/ui/primitives/modal.slint b/engine/crates/concat/ui/primitives/modal.slintindex a2793682..982e32f7 100644--- a/engine/crates/concat/ui/primitives/modal.slint+++ b/engine/crates/concat/ui/primitives/modal.slint@@ -16,7 +16,7 @@ export component Modal inherits Rectangle {in property <string> title;in property <Glyph> glyph;/// A fact about what the sheet is acting on, set against the trailing edge- /// of its header — web/'s panels carry theirs the same way.+ /// of its header.in property <string> note;/// False while a job is running: a dialog you can dismiss out from under an/// export is a dialog that loses the export.@@ -152,10 +152,10 @@ export component Modal inherits Rectangle {// The push a dialog is built around.//-// Four tones, from web/'s button: `default` is a bordered field, `primary`-// fills with the accent, `ghost` is bare until hovered, and `danger` keeps its-// normal ink and turns red only under the pointer — a row of permanently red-// text is a row of alarms, where the warning belongs at the moment of pressing.+// Four tones: `default` is a bordered field, `primary` fills with the accent,+// `ghost` is bare until hovered, and `danger` keeps its normal ink and turns+// red only under the pointer — a row of permanently red text is a row of+// alarms, where the warning belongs at the moment of pressing.export component Button inherits Rectangle {in property <string> label;in property <Glyph> glyph;@@ -303,10 +303,9 @@ export component DialogSection inherits VerticalLayout {padding-right: 14px;spacing: 6px;- // web/ rotates one right-chevron through 90 degrees. Slint puts- // `rotation-angle` on Image and Path only, and an Icon is neither,- // so the two marks are swapped instead — the same two states, just- // without the quarter turn between them.+ // Two chevrons swapped rather than one rotated: Slint puts+ // `rotation-angle` on Image and Path only, and an Icon is neither.+ // The same two states, just without a quarter turn between them.if root.collapsible: VerticalLayout {alignment: center;Icon {diff --git a/engine/crates/concat/ui/primitives/number-field.slint b/engine/crates/concat/ui/primitives/number-field.slintindex dcf67ff6..492f3fb2 100644--- a/engine/crates/concat/ui/primitives/number-field.slint+++ b/engine/crates/concat/ui/primitives/number-field.slint@@ -9,9 +9,9 @@ import { FocusRing } from "focus-ring.slint";// The workhorse of an inspector: drag left/right anywhere on the field to// scrub, click to type. Shift coarsens the scrub 10x, Alt refines it 10x.//-// `value` is meant to be bound two-way (`value <=> some-property`), which is-// how Slint expresses the controlled-component contract React gets from-// `value` + `onChange`. `changed` is there for side effects.+// `value` is meant to be bound two-way (`value <=> some-property`): the field+// shows whatever the owner holds, and a commit writes straight back to it, so+// the two can never disagree. `changed` is there for side effects.export component NumberField inherits Rectangle {in-out property <float> value;in property <float> minimum: -1000000000;@@ -36,9 +36,8 @@ export component NumberField inherits Rectangle {callback changed(value: float);callback keyframe-toggled(on: bool);- // Display and parsing are overridable callbacks, the way the React version- // takes `format` and `parse` props. Defaults round to `precision` and- // append `suffix`.+ // Display and parsing are overridable callbacks. Defaults round to+ // `precision` and append `suffix`.pure callback format(value: float) -> string;format(v) => {return "\{Fmt.round-to(v, root.precision)}\{root.suffix}";@@ -181,9 +180,8 @@ export component NumberField inherits Rectangle {}// Covers the text but stops short of the keyframe diamond, and steps aside- // once the field is being typed into so the caret and selection work. This- // is the Slint equivalent of the web version's preventDefault() on- // pointerdown: focus is withheld until the gesture resolves as a click.+ // once the field is being typed into so the caret and selection work.+ // Focus is withheld until the gesture resolves as a click.scrub := TouchArea {x: 0;y: 0;diff --git a/engine/crates/concat/ui/primitives/panel.slint b/engine/crates/concat/ui/primitives/panel.slintindex f2b34366..8eb6bbb7 100644--- a/engine/crates/concat/ui/primitives/panel.slint+++ b/engine/crates/concat/ui/primitives/panel.slint@@ -54,10 +54,9 @@ export component PanelHeader inherits Rectangle {// A titled group of rows, separated from its neighbours by a hairline.//-// React passes the header actions and the body as two props; a Slint component-// has a single `@children` slot, so the two halves are separate components the-// caller nests. That also makes collapsing explicit — an `if` on the body drops-// it out of the layout, which is what `{showBody && ...}` does in JSX.+// A Slint component has a single `@children` slot, so the header and the body+// are separate components the caller nests. That also makes collapsing+// explicit — an `if` on the body drops it out of the layout.//// Section {// hdr := SectionHeader { title: "Layout"; collapsible: true; }@@ -195,12 +194,12 @@ export component IconButton inherits Rectangle {property <bool> lit: touch.has-hover && root.enabled;// Checked is a lime *glyph* on a darker chip, never dark ink on a lime- // slab and not a lime-tinted one either. Both references are explicit- // about this — "an activated tool button: lime glyph on a slightly darker- // surface, so the toolbar reads as 'this mode is on' without shouting" —- // and with the accent itself now lime, even a 20% tint behind eight of- // them turned a tray into a row of green slabs. The glyph carries the- // state; the chip only has to sit back far enough to be seen behind it.+ // slab and not a lime-tinted one either: an activated tool button is a+ // lime glyph on a slightly darker surface, so the toolbar reads as "this+ // mode is on" without shouting. With the accent itself lime, even a 20%+ // tint behind eight of them turns a tray into a row of green slabs. The+ // glyph carries the state; the chip only has to sit back far enough to be+ // seen behind it.property <brush> tint: root.checked ? Theme.accent: (root.lit && root.danger) ? Theme.danger: root.accent ? (root.lit ? Theme.accent-hover : Theme.accent)diff --git a/engine/crates/concat/ui/primitives/primitives.slint b/engine/crates/concat/ui/primitives/primitives.slintindex 1bc6fdca..f59355d6 100644--- a/engine/crates/concat/ui/primitives/primitives.slint+++ b/engine/crates/concat/ui/primitives/primitives.slint@@ -1,8 +1,7 @@// SPDX-License-Identifier: AGPL-3.0-or-later// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors-// Barrel module, the counterpart of web/src/primitives/index.ts. Import from-// here rather than reaching into individual files.+// Barrel module. Import from here rather than reaching into individual files.export { NumberField } from "number-field.slint";export { Stepper } from "stepper.slint";export { SegmentedControl } from "segmented-control.slint";diff --git a/engine/crates/concat/ui/primitives/scrollbar.slint b/engine/crates/concat/ui/primitives/scrollbar.slintindex 4cf4fa04..c028985d 100644--- a/engine/crates/concat/ui/primitives/scrollbar.slint+++ b/engine/crates/concat/ui/primitives/scrollbar.slint@@ -3,18 +3,16 @@import { Theme } from "../theme/theme.slint";-// The thin scrollbar, ported from the reference's `thin-scroll` utility.+// The thin scrollbar.//-// Its whole shape is in four declarations there: an 8px gutter, a transparent-// track, no buttons and no corner, and a thumb in `hairline-strong` that is-// fully rounded and inset with `border: 2px solid transparent` plus-// `background-clip: content-box` — which is the CSS way of saying the visible-// thumb is 4px wide and centred in a gutter twice that. So the gutter is a hit+// An 8px gutter with a transparent track, no buttons and no corner, and a+// fully rounded thumb in `line-strong`, inset 2px on every side so the visible+// thumb is 4px wide and centred in a gutter twice that. The gutter is a hit// target and the mark inside it is small enough to sit over content without// ever being mistaken for it.//-// It is a control, not an indicator: the reference's is a real scrollbar and-// can be dragged, and a bar that looks grabbable and is not is worse than none.+// It is a control, not an indicator: it can be dragged, and a bar that looks+// grabbable and is not is worse than none.export component ThinScrollbar inherits Rectangle {/// visible extent of the thing being scrolledin property <length> viewport;diff --git a/engine/crates/concat/ui/primitives/segmented-control.slint b/engine/crates/concat/ui/primitives/segmented-control.slintindex 0b7479ae..5e783449 100644--- a/engine/crates/concat/ui/primitives/segmented-control.slint+++ b/engine/crates/concat/ui/primitives/segmented-control.slint@@ -6,9 +6,8 @@ import { FocusRing } from "focus-ring.slint";// Single-select tab row with a thumb that slides to the active segment.//-// The React version measures each button to place the thumb because the-// segments are `flex: 1 1 0`. Slint lays them out from the same rule, so the-// geometry is computed directly instead of observed.+// The segments share the width equally, so the thumb's geometry is computed+// from the count rather than measured from the buttons.export component SegmentedControl inherits Rectangle {in property <[string]> options;in-out property <int> current;diff --git a/engine/crates/concat/ui/primitives/select.slint b/engine/crates/concat/ui/primitives/select.slintindex be1bfb45..669edf92 100644--- a/engine/crates/concat/ui/primitives/select.slint+++ b/engine/crates/concat/ui/primitives/select.slint@@ -217,7 +217,7 @@ export component Select inherits Rectangle {TouchArea {mouse-cursor: pointer;// pointer-enter has no dedicated callback; has-hover- // drives the same highlight the web sets on hover.+ // drives the highlight instead.changed has-hover => {if (self.has-hover) {root.active = index;diff --git a/engine/crates/concat/ui/primitives/stepper.slint b/engine/crates/concat/ui/primitives/stepper.slintindex e9501b07..f00052aa 100644--- a/engine/crates/concat/ui/primitives/stepper.slint+++ b/engine/crates/concat/ui/primitives/stepper.slint@@ -46,8 +46,7 @@ component StepButton inherits Rectangle {// The minus/plus pair that sits beside a NumberField. Holding repeats: the// first press fires immediately, then a timer takes over after `repeat-delay`-// and runs at `repeat-interval` — the same two-stage cadence the React version-// builds from setTimeout plus setInterval.+// and runs at `repeat-interval`.export component Stepper inherits Rectangle {in property <bool> enabled: true;in property <duration> repeat-delay: 380ms;diff --git a/engine/crates/concat/ui/primitives/toast.slint b/engine/crates/concat/ui/primitives/toast.slintindex d95d4247..8ccbdd98 100644--- a/engine/crates/concat/ui/primitives/toast.slint+++ b/engine/crates/concat/ui/primitives/toast.slint@@ -4,7 +4,7 @@import { Theme } from "../theme/theme.slint";import { Glyph, Icon } from "../icons.slint";-// The bottom-right notice, ported from the reference's Toast.tsx.+// The bottom-right notice.//// Rises in, holds, sinks out. One at a time, and the next one replaces the// one before it rather than stacking under it: a column of notices is a log,@@ -26,16 +26,14 @@ export struct ToastData {export component ToastLayer inherits Rectangle {in property <ToastData> data;- /// The reference's two holds, which are the reason it has this property at- /// all: an error you missed is an error you go looking for.+ /// Two holds, which are the reason this is a property at all: an error you+ /// missed is an error you go looking for.property <duration> hold: root.data.failed ? 6500ms : 3500ms;/// Up and lit. Everything the toast does is this property animating.property <bool> shown;/// The one frame the risen toast spends at its start position, so the move/// to `shown` animates rather than teleports — Slint gives a property its- /// first value without running its animation, exactly as a browser paints- /// the first frame without transitioning it, which is what the reference's- /// double requestAnimationFrame is working around.+ /// first value without running its animation.property <bool> raising;/// Watched instead of `data`, so the trigger is one integer changing and@@ -82,21 +80,21 @@ export component ToastLayer inherits Rectangle {}Rectangle {- // 16px off both edges, like the reference's `bottom-4 right-4`. The- // 12px it is pushed down by when it is away is the rise.+ // 16px off both edges. The 12px it is pushed down by when it is away+ // is the rise.x: root.width - self.width - 16px;y: root.height - self.height - 16px + (root.shown ? 0px : 12px);// Capped, then the label elides: a notice is a sentence, and one long// enough to reach across the window has stopped being one.width: Math.min(root.width - 32px,12px + icon.width + 8px + measure.preferred-width + 12px);- // The reference's px-3 py-2 around a 16px line.+ // 12px by 8px of padding around a 16px line.height: 32px;border-radius: Theme.r-lg;// Elevated and ringed, because it floats over panes that are// themselves `panel` — the same reason the tooltip and the menus are.- // The reference spends a drop shadow here as well; Slint has none, so- // the hairline does that work alone and is the strong one for it.+ // Slint has no drop shadow, so the hairline does the lifting alone and+ // is the strong one for it.background: Theme.raised;border-width: 1px;border-color: Theme.line-strong;@@ -105,8 +103,8 @@ export component ToastLayer inherits Rectangle {// first frame of the window from carrying an empty box.visible: root.data.message != "";- // Out is slower than in, as it is in the reference: a notice arriving- // should catch the eye, and one leaving should not.+ // Out is slower than in: a notice arriving should catch the eye, and+ // one leaving should not.animate y, opacity {duration: root.shown ? 260ms : 420ms;easing: ease-out;diff --git a/engine/crates/concat/ui/primitives/tooltip.slint b/engine/crates/concat/ui/primitives/tooltip.slintindex 4824c743..e525745a 100644--- a/engine/crates/concat/ui/primitives/tooltip.slint+++ b/engine/crates/concat/ui/primitives/tooltip.slint@@ -5,9 +5,8 @@ import { Theme } from "../theme/theme.slint";// Tooltips.//-// A browser gives these away: `title` on any element, positioned, delayed and-// dismissed by the platform. Slint has no equivalent — and the obvious-// substitute, a PopupWindow per control, is the wrong shape for one. A popup+// Slint has no built-in tooltip — and the obvious substitute, a PopupWindow+// per control, is the wrong shape for one. A popup// is a modal-ish surface that takes the pointer and closes on the next click,// which is exactly what a tooltip must not do to the button it is describing.//diff --git a/engine/crates/concat/ui/start.slint b/engine/crates/concat/ui/start.slintindex 1edebc12..c951de69 100644--- a/engine/crates/concat/ui/start.slint+++ b/engine/crates/concat/ui/start.slint@@ -6,7 +6,7 @@ import { Glyph, Icon } from "icons.slint";import { SegmentedControl } from "primitives/segmented-control.slint";import { ThinScrollbar } from "primitives/scrollbar.slint";-// The launch screen, ported from the reference's StartScreen.tsx.+// The launch screen.//// Full-bleed on the window's own ground — no card, no border, no shadow. A// setup screen is not a dialog floating over something; it *is* the window,@@ -19,10 +19,9 @@ import { ThinScrollbar } from "primitives/scrollbar.slint";// edit depends on, and choosing them after material is cut is how you end up// conforming footage.//-// What is not ported: the template shelf and its slot-filling mode. Both need-// a template store, and there is none in this tree — the library's "save as-// template" is an unwired seam for the same reason. The form and the recents-// are the whole of the screen without them.+// The form and the recents are the whole of the screen. There is no template+// store in this tree, which is also why the library's "save as template" is+// an unwired seam./// One row of the Recent column.///@@ -115,7 +114,7 @@ component PlainInput inherits Rectangle {in property <bool> enabled: true;/// Takes the caret when the screen opens, and selects what is there — so/// the default name can be replaced by typing rather than by clearing it- /// first. The reference's `autoFocus` plus its `onFocus={select()}`.+ /// first.in property <bool> autofocus;callback edited(text: string);@@ -375,14 +374,12 @@ export component StartScreen inherits Rectangle {callback forget-recent(path: string);callback dismiss-error();- /// The form's own column, and the widest the pair may run to. The- /// reference's max-w-5xl and max-w-xl, which are these two numbers.+ /// The form's own column, and the widest the pair may run to.property <length> form-w: 700px;property <length> recents-w: 340px;property <length> column-gap: 64px;/// Only two columns once there is history to show, and only when there is- /// room for both. Below that the recents go under the form, which is what- /// the reference's `lg:` breakpoint does.+ /// room for both. Below that the recents go under the form.property <bool> side-by-side: root.recents.length > 0&& root.width >= root.form-w + root.column-gap + root.recents-w + 96px;property <length> pad: 48px;@@ -424,11 +421,10 @@ export component StartScreen inherits Rectangle {Text {text: "New project";color: Theme.fg;- // The one display-sized line in the app. The reference- // spends a third face on it (Cabinet Grotesk); this- // tree bundles two, so the interface face carries it at- // its heaviest weight and the reference's own tight- // tracking — -0.03em, which at 34px is a point.+ // The one display-sized line in the app. The tree+ // bundles two faces and no display face, so the+ // interface face carries it at its heaviest weight and+ // tight tracking — -0.03em, which at 34px is a point.font-size: Theme.fs-display;font-weight: Theme.weight-display;letter-spacing: -1px;diff --git a/engine/crates/concat/ui/theme/dark.slint b/engine/crates/concat/ui/theme/dark.slintindex 9fba741a..be1171d1 100644--- a/engine/crates/concat/ui/theme/dark.slint+++ b/engine/crates/concat/ui/theme/dark.slint@@ -41,34 +41,29 @@// - The clip-ink family holds against all five kind hues, not against a// grey. It cannot be borrowed from the text colours for that reason.//-// ── where the values came from ───────────────────────────────────────────────+// ── the palette ──────────────────────────────────────────────────────────────//-// The surfaces are the web prototype's neutral grey scale (web/src/styles/-// tokens.css), not the legacy editor's. The legacy panels were a blue-cast-// near-black; the prototype's are flat neutral, which lets the accent and the-// clip hues carry all of the colour in the window instead of competing with a-// tinted ground.+// The surfaces are a flat neutral grey scale with no blue cast. A tinted+// ground competes with everything placed on it; a neutral one lets the accent+// and the clip hues carry all of the colour in the window.//-// Everything else — the clip and media-kind hues, the meter ramp — still-// mirrors the legacy editor (desktop/src/styles.css, the-// `:root[data-theme="dark"]` block), because those name things the engine and-// the project format also name.+// The clip and media-kind hues and the meter ramp name things the engine and+// the project format also name, so they are fixed by what they mean rather+// than by the surfaces around them.export global Dark {- // surfaces — web/src/styles/tokens.css+ // surfaces//// Panels are a grey that visibly floats on the near-black ground — never// the ground colour itself, or the panes melt into the window and their// grab-able gutters vanish.//- // The panel sits at the prototype's #111111 — the tone its preview- // viewport uses, which is the one surface in that design big enough to- // judge a ground by. Its #0d0d0d panel was a stop too dark once whole- // panes were painted in it rather than narrow strips.+ // A panel is judged as a ground, by whole panes painted in it rather than+ // by narrow strips, and a near-black one is a stop too dark at that size.+ //+ // Holding the panel up leaves room underneath, so `well` is genuinely+ // sunken — darker than the surface it is cut into, which is how a sunken+ // thing reads without having to be explained.//- // Moving the panel up makes room underneath, so `well` goes back to being- // genuinely sunken — darker than the surface it is cut into, the way the- // legacy theme has it and the way a sunken thing reads without having to- // be explained.// The whole ladder moves together, not just the panel. Each step exists// to be told apart from the one under it — a raised card has to read as// raised, a field has to read as a field on top of that — so lifting the@@ -76,11 +71,10 @@ export global Dark {// them. Only `page` stays where it is: it is the ground the panes float// on, and holding it down is what widens the gutters as the panes lighten.//- // Lifted a notch again once the outlines came off the panes. An outline- // was doing part of the work of separating a pane from the ground; with- // it gone the value step has to do all of it, and the darker ladder left- // the panes reading as holes in the window rather than as surfaces on it.- // Everything moves by the same amount, so no two steps change places.+ // The panes carry no outlines. An outline would do part of the work of+ // separating a pane from the ground; without one the value step has to do+ // all of it, and a darker ladder leaves the panes reading as holes in the+ // window rather than as surfaces on it.out property <color> panel: #1c1c1c;out property <color> raised: #262626;out property <color> well: #131313;@@ -88,36 +82,32 @@ export global Dark {out property <color> field-hover: #343434;out property <color> field-active: #3f3f3f;- // hairlines — white-alpha like the reference, so they hold on panel,- // well, and ground alike.+ // hairlines — white-alpha, so they hold on panel, well, and ground alike.out property <color> line: #ffffff1a; // rgb(255 255 255 / 0.1)out property <color> line-strong: #ffffff33; // rgb(255 255 255 / 0.2)// text- out property <color> fg: #f5f5f7; // --color-primary- out property <color> fg-muted: #a1a1a6; // --color-secondary- out property <color> fg-dim: #6e6e73; // --color-tertiary+ out property <color> fg: #f5f5f7;+ out property <color> fg-muted: #a1a1a6;+ out property <color> fg-dim: #6e6e73;// accents//- // Lime, not blue. Both codebases land here from different directions: the- // prototype makes it the accent outright (--cp-accent), and the legacy- // editor keeps a blue --color-accent but spends the lime on the two places- // that carry the look — the selection highlight and every activated tool- // (--color-selection / --color-tool-active, both #c6f432). Taking it as- // the one accent says the same thing with one token instead of three.+ // Lime, not blue. The two places that carry the look are the selection+ // highlight and every activated tool, and both are lime; making it the+ // one accent as well says the same thing with one token instead of three.//// It is legible against near-black and near-white alike, which is what a// selection has to be: it lands on whatever happens to be underneath it.// What sits *on* it therefore has to be dark ink, and fixed — see// `on-accent` below.- out property <color> accent: #cbf53f; // --cp-accent- out property <color> accent-hover: #d9ff63; // --cp-accent-hover+ out property <color> accent: #cbf53f;+ out property <color> accent-hover: #d9ff63;out property <color> accent-soft: #cbf53f33; // rgb(203 245 63 / 0.2)out property <color> green: #30d158;// Ink for text and glyphs sitting ON the accent. A bright accent needs a- // dark one; swap this back to #ffffff the day the accent goes dark again.- out property <color> on-accent: #15220a; // --cp-on-accent+ // dark one; a dark accent would want #ffffff here instead.+ out property <color> on-accent: #15220a;out property <color> on-green: #06210f;// meter ramp@@ -127,11 +117,11 @@ export global Dark {// media kinds//- // Each kind gets a vivid mark and the darker same-hue ground it sits on,- // taken from the reference editor's clip palette. The pair is deliberately- // shared with the timeline: a card in the bin and the clip it becomes on a- // track are the same two colours, so they read as one object moved rather- // than two things that happen to have the same name.+ // Each kind gets a vivid mark and the darker same-hue ground it sits on.+ // The pair is deliberately shared with the timeline: a card in the bin and+ // the clip it becomes on a track are the same two colours, so they read as+ // one object moved rather than two things that happen to have the same+ // name.out property <color> kind-video: #4d8df6;out property <color> kind-video-well: #142640;out property <color> kind-audio: #f09e2f;@@ -181,10 +171,10 @@ export global Dark {out property <color> grid: #ffffff24;// Red, and used for nothing else. A playhead that shared the accent would// be one more blue line among the selection outlines.- out property <color> playhead: #ff453a; // --color-playhead+ out property <color> playhead: #ff453a;// Drawn on the audio clip's own dark ground, so it is a light wash of the// kind's hue rather than the vivid mark itself.- out property <color> wave: #fad69eb3; // --color-clip-wave, 0.7 alpha+ out property <color> wave: #fad69eb3; // 0.7 alpha// clip ink//@@ -239,8 +229,8 @@ export global Dark {out property <color> danger-wash: #2a1614;out property <color> danger-edge: #5a2b28;- // window ground the panes float on — the prototype's page, a shade under- // the darkest panel so the gutters read as gaps and not as seams+ // window ground the panes float on — a shade under the darkest panel so+ // the gutters read as gaps and not as seamsout property <color> page: #08080a;out property <color> page-fg-muted: #a1a1a6;}diff --git a/engine/crates/concat/ui/theme/theme.slint b/engine/crates/concat/ui/theme/theme.slintindex 5172e4d2..5afa855f 100644--- a/engine/crates/concat/ui/theme/theme.slint+++ b/engine/crates/concat/ui/theme/theme.slint@@ -44,7 +44,7 @@ export global Theme {// ── type ─────────────────────────────────────────────────────────────//- // Two roles, not one, following the reference's own split.+ // Two roles, not one.//// Synonym carries the interface. It is a text face, drawn for paragraph// sizes, and it stays readable at the 10 and 11px this app is full of.@@ -53,9 +53,6 @@ export global Theme {// dimensions, counts — anything you read as a *value* rather than as// language. Its even, mechanical figures suit numbers, and keeping it off// the prose is what stops the whole interface reading like a spec sheet.- //- // The reference spends a third face (Cabinet Grotesk) on display headings.- // There is nothing here big enough to need one yet.out property <string> font: "Synonym";out property <string> font-technical: "Inter";/// The scale. `fs` is the body size everything inherits; the two either@@ -73,10 +70,9 @@ export global Theme {// The weights the design actually calls for, uncompensated.//// Skia composites glyph coverage with gamma correction, so text comes out- // at the weight the tokens name — the same as it does in a browser.- // FemtoVG does not correct for it and thins small light-on-dark text,- // which is what the 500/600 these used to carry was compensating for. Put- // those back if you build --features wgpu; leave them alone otherwise, or+ // at the weight the tokens name. FemtoVG does not correct for it and thins+ // small light-on-dark text, which a step up to 500/600 compensates for.+ // Use those if you build --features wgpu; leave them alone otherwise, or// the text is over-corrected and reads as too heavy.//// Weight is the one axis that can absorb a renderer difference withoutdiff --git a/engine/crates/concat/ui/timeline/lanes.slint b/engine/crates/concat/ui/timeline/lanes.slintindex 5d8735f9..6a374962 100644--- a/engine/crates/concat/ui/timeline/lanes.slint+++ b/engine/crates/concat/ui/timeline/lanes.slint@@ -10,11 +10,10 @@ import { ContextMenu, MenuItemData } from "../primitives/context-menu.slint";// The lanes: the ruler, the banded track stack, the clips on it, the playhead// and the two band gestures.//-// The reference draws all of this into a 2D canvas and hit-tests it by hand.-// Slint has no canvas, so it is a scene graph instead — which costs an element-// per clip and buys back the hit testing: a clip carries its own TouchArea, so-// there is no `clipAt(x, y)` to keep in step with the renderer, and no way for-// the two to disagree about where a clip is.+// A scene graph, not one painted surface hit-tested by hand. That costs an+// element per clip and buys the hit testing: a clip carries its own+// TouchArea, so there is no `clipAt(x, y)` to keep in step with the renderer,+// and no way for the two to disagree about where a clip is.//// Everything is positioned from *seconds*: `px-per-second` is the only bridge,// so zooming and panning are one property change rather than a model rewrite.@@ -63,8 +62,8 @@ component Clip inherits Rectangle {/// A press landed: the caller resolves the selection before any drag.callback pressed(additive: bool, edge: int);/// Window-space delta since the press: seconds across, pixels down. Not- /// lanes down — the lanes are no longer one height, so which row a drag- /// has reached is a question only the side holding the heights can answer.+ /// lanes down — the lanes differ in height, so which row a drag has+ /// reached is a question only the side holding the heights can answer.callback dragged(seconds: float, pixels: length);callback released();callback razored(seconds: float);@@ -111,10 +110,10 @@ component Clip inherits Rectangle {// The audio envelope. The commands arrive normalised into a 1x1 box// and `fit: fill` stretches that onto whatever width the clip has, so- // the shape survives a zoom without Rust rebuilding the string. What- // it gives up against the reference is per-pixel extremes when zoomed- // right in — there the envelope is a stretched polyline rather than a- // fresh scan of the buckets.+ // the shape survives a zoom without Rust rebuilding the string. The+ // trade-off is per-pixel extremes when zoomed right in — there the+ // envelope is a stretched shape rather than a fresh scan of the+ // buckets.if root.item.wave != "": Path {x: 0;y: 0;@@ -149,10 +148,10 @@ component Clip inherits Rectangle {overflow: elide;}- // Where the reference tiles a filmstrip. Nothing in this tree decodes- // a frame yet, so a picture clip falls back to its kind's mark the way- // a bin card does — faint and large, so it reads as a placeholder and- // not as a badge. A filter layer takes the same treatment for the+ // The filmstrip slot: the clip's frames tile here once the window+ // supplies them. Until then a picture clip shows its kind's mark the+ // way a bin card does — faint and large, so it reads as a placeholder+ // and not as a badge. A filter layer takes the same treatment for the// opposite reason: there is no picture to draw, and there never will// be one.if (root.item.kind == ClipKind.video || root.item.kind == ClipKind.image@@ -362,7 +361,7 @@ export component Lanes inherits Rectangle {in property <float> frame-rate: 30;/// Seconds at the left edge of the lanes.in property <float> scroll-left;- /// The zoom, as the reference spells it: seconds covered by one pixel.+ /// The zoom: seconds covered by one pixel.in property <float> seconds-per-pixel: 0.05;in property <length> track-scroll;in property <length> ruler-height: 28px;@@ -428,9 +427,9 @@ export component Lanes inherits Rectangle {return root.scroll-left + x / root.px-per-second;}/// Pixels down the stack, from a y inside the lane area — which is what- /// both gestures that used to resolve a row now send instead. The band and- /// the drop target both start at the foot of the ruler, so their local y- /// needs only the scroll adding to it.+ /// the band and the drop target both send, since which row a y lands on+ /// is the caller's to resolve. Both start at the foot of the ruler, so+ /// their local y needs only the scroll adding to it.pure function stack-y(y: length) -> length {return y + root.track-scroll;}@@ -460,9 +459,7 @@ export component Lanes inherits Rectangle {// a pinch feel like it is pulling the ruler apart.//// Negated because Slint's delta-y is positive scrolling *up*,- // which is the opposite of the DOM the reference was written- // against — and up is zoom in, which means a *smaller*- // seconds-per-pixel. This read backwards before.+ // and up is zoom in, which means a *smaller* seconds-per-pixel.//// Clamped so one enormous delta — some mice send a whole// page — cannot jump several octaves in a single event.diff --git a/engine/crates/concat/ui/timeline/model.slint b/engine/crates/concat/ui/timeline/model.slintindex d6c730d3..3e22c86e 100644--- a/engine/crates/concat/ui/timeline/model.slint+++ b/engine/crates/concat/ui/timeline/model.slint@@ -12,8 +12,7 @@/// Wider than MediaKind: a title has no file behind it, it *is* its content,/// and a filter has no file either — it is a preset dragged from the library's/// Filters page that covers a span of time and treats whatever plays under it,-/// the way CapCut's filter bars do. Mirrors the reference's ClipKind, plus-/// that layer.+/// the way CapCut's filter bars do.export enum ClipKind { video, audio, image, text, filter }/// What a press on a clip means.@@ -43,9 +42,9 @@ export struct TimelineTabData {/// its header.export enum TrackSize { auto, small, medium, large }-/// One lane. Deliberately untyped, like the reference's Track: any media goes-/// on any track, which is why every lane carries both a visibility and a mute-/// switch rather than one or the other.+/// One lane. Deliberately untyped: any media goes on any track, which is why+/// every lane carries both a visibility and a mute switch rather than one or+/// the other.export struct TrackData {id: string,name: string,@@ -54,15 +53,14 @@ export struct TrackData {/// What the header's dropdown shows, and what `height` was resolved from.size: TrackSize,/// The lane's drawn height, and its top edge measured down the stack from- /// the first lane. Both resolved by Rust: the stack is no longer a- /// multiple of one pitch, and a running total over a model is not- /// something Slint's expression language can express.+ /// the first lane. Both resolved by Rust: the lanes differ in height, so+ /// the stack is not a multiple of one pitch, and a running total over a+ /// model is not something Slint's expression language can express.height: length,top: length,/// Clips on a locked lane cannot be selected, moved, trimmed or cut, and- /// nothing can be dropped onto it. Not a flag the reference carries — its- /// TrackFlag is visible/muted only — but a lane you can see and hear and- /// still knock sideways by accident is the one every editor locks.+ /// nothing can be dropped onto it. A lane you can see and hear and still+ /// knock sideways by accident is the one every editor locks.locked: bool,}diff --git a/engine/crates/concat/ui/timeline/tabs.slint b/engine/crates/concat/ui/timeline/tabs.slintindex ed4404bf..fd9966b0 100644--- a/engine/crates/concat/ui/timeline/tabs.slint+++ b/engine/crates/concat/ui/timeline/tabs.slint@@ -9,17 +9,16 @@ import { TimelineTabData } from "model.slint";// vocabulary every other editor uses. Kept above the tool tray so switching// reads as changing documents rather than changing tools.//-// Behaviour is the reference's (TimelinePanel.tsx): click switches,-// double-click renames in place committing on blur, and the close button asks-// — deleting a timeline throws away every clip on it, so this strip never-// deletes directly. The shape is the one from web/'s timeline: a squared-off-// tab whose active state is a raised ground plus a 2px accent bar on its *top*-// edge, inset from the corners. The bar sits away from the content it opens-// onto, so it reads as a label on the tab and not as an underline on the panel.+// Click switches, double-click renames in place committing on blur, and the+// close button asks: deleting a timeline throws away every clip on it, so+// this strip never deletes directly. The shape: a squared-off tab whose active+// state is a raised ground plus a 2px accent bar on its *top* edge, inset from+// the corners. The bar sits away from the content it opens onto, so it reads+// as a label on the tab and not as an underline on the panel.//-// Not ported: dragging a tab to reorder. It wants a lifted tab riding the-// pointer while its neighbours ease aside, which is a whole gesture rather-// than a detail of this one.+// Tabs do not drag to reorder. That wants a lifted tab riding the pointer+// while its neighbours ease aside, which is a whole gesture rather than a+// detail of this one.component Tab inherits Rectangle {in property <string> name;@@ -92,8 +91,8 @@ component Tab inherits Rectangle {visible: !root.renaming;}- // Revealed on hover, like the reference's — a row of permanent x's over- // a strip of tabs is a row of invitations to lose an edit.+ // Revealed on hover: a row of permanent x's over a strip of tabs is a+ // row of invitations to lose an edit.if root.closable && touch.has-hover && !root.renaming: Rectangle {x: parent.width - self.width - 5px;y: (parent.height - self.height) / 2;diff --git a/engine/crates/concat/ui/timeline/track-header.slint b/engine/crates/concat/ui/timeline/track-header.slintindex 520eedce..51bf1330 100644--- a/engine/crates/concat/ui/timeline/track-header.slint+++ b/engine/crates/concat/ui/timeline/track-header.slint@@ -17,10 +17,9 @@ import { TrackData, TrackSize } from "model.slint";// caller's `track-scroll`, so the labels and the lanes cannot drift apart.// There is one source of truth for how far down the stack we are.//-// The bar that drives it lives here, at the leading edge of this column — the-// reference gets one for free by making the header column a real scroll-// container, and this is the same bar in the one place a stack of lanes can-// carry one without landing on top of a clip.+// The bar that drives it lives here, at the edge of this column: the one+// place a stack of lanes can carry a scrollbar without landing on top of a+// clip.// The row-height dropdown, one per lane.//@@ -342,12 +341,10 @@ export component TrackHeaders inherits Rectangle {}// The bar, over the rows and under the corner. On the trailing edge,- // where the stack it scrolls ends and where a scroll container puts one —- // the reference gets exactly this bar there by making the header column a- // real one. Short and inset rather than full-height: a stack that- // overflows by a row would otherwise draw a thumb the length of the- // column, and a mark that long stops reading as something you can take- // hold of.+ // where the stack it scrolls ends and where a scroll container puts one.+ // Short and inset rather than full-height: a stack that overflows by a+ // row would otherwise draw a thumb the length of the column, and a mark+ // that long stops reading as something you can take hold of.ThinScrollbar {x: parent.width - self.width - 1px;y: root.ruler-height + 4px;diff --git a/engine/crates/concat/ui/timeline/tray.slint b/engine/crates/concat/ui/timeline/tray.slintindex 9116e714..26071215 100644--- a/engine/crates/concat/ui/timeline/tray.slint+++ b/engine/crates/concat/ui/timeline/tray.slint@@ -8,20 +8,18 @@ import { TimelineTool } from "model.slint";// The timeline's tool tray.//-// The tool set is the reference's (TimelinePanel.tsx): pointer and razor, then-// the three edit actions, then snapping and the A/V tools, then add-track, and-// the view controls pushed to the far end behind the timecode readout. The-// metrics are web/'s bar — 40px tall, 4px between buttons, an 18px hairline-// with 4px of air on each side between groups — which reads tighter than the-// reference's 44px without crowding a 26px button.+// The tool set: pointer and razor, then the three edit actions, then snapping+// and the A/V tools, then add-track, and the view controls pushed to the far+// end behind the timecode readout. The metrics: 40px tall, 4px between+// buttons, an 18px hairline with 4px of air on each side between groups.+// Tight, without crowding a 26px button.//-// Two of the reference's affordances are missing and worth naming. A disabled-// Merge there carries the reason in its tooltip, because a button that greys-// out without saying why leaves you guessing at the rule; this tree has no-// tooltip primitive, so `merge-blocked-because` is accepted and shown as a-// line beside the button instead of on hover. And the A/V tools open a menu-// there; here the button reports a press and the popup is the caller's to-// grow.+// Two decisions worth naming. A disabled Merge carries the reason it is+// blocked, because a button that greys out without saying why leaves you+// guessing at the rule: `merge-blocked-because` is accepted and becomes the+// button's label, which is its accessible name and where a tooltip reads+// from. And the A/V tools button only reports a press; the popup is the+// caller's to grow.component Divider inherits Rectangle {width: 9px;@@ -100,11 +98,10 @@ export component TimelineTray inherits Rectangle {IconButton {glyph: Glyph.merge;// The reason a blocked Merge is blocked rides on the button rather- // than being spelled out beside it. The reference keeps it in a- // tooltip; this tree has no tooltip yet, so `label` — the- // accessible name, and where a tooltip will read from — is the- // honest place to park it. A permanent caption in the tray was- // answering a question nobody had asked yet.+ // than being spelled out beside it. This tree has no tooltip yet,+ // so `label` — the accessible name, and where a tooltip will read+ // from — is the honest place to park it. A permanent caption in+ // the tray would answer a question nobody had asked yet.label: root.merge-blocked-because == "" ? "Merge selected": root.merge-blocked-because;enabled: root.merge-blocked-because == "";diff --git a/engine/crates/concat/ui/title-bar.slint b/engine/crates/concat/ui/title-bar.slintindex 396379e0..cf630713 100644--- a/engine/crates/concat/ui/title-bar.slint+++ b/engine/crates/concat/ui/title-bar.slint@@ -5,14 +5,14 @@ import { Theme } from "theme/theme.slint";import { Glyph, Icon } from "icons.slint";import { AddPaneButton, PaneKind } from "workspace/pane-switcher.slint";-// The custom title bar, ported from the reference's TitleBar.tsx.+// The custom title bar.//// On macOS the native traffic lights are overlaid: main.rs hides the real-// title bar (titlebar_transparent + title_hidden + fullsize_content_view, the-// winit spelling of Tauri's titleBarStyle: Overlay) and this strip leaves-// room for the lights on the left. Everything that is not a control is a drag-// region — the TouchArea at the bottom of the tree starts a native window-// drag on press, and controls declared after it take their own presses.+// title bar (titlebar_transparent + title_hidden + fullsize_content_view) and+// this strip leaves room for the lights on the left. Everything that is not a+// control is a drag region — the TouchArea at the bottom of the tree starts a+// native window drag on press, and controls declared after it take their own+// presses.component MenuLabel inherits Rectangle {in property <string> label;diff --git a/engine/crates/concat/ui/util.slint b/engine/crates/concat/ui/util.slintindex 7ec0f024..3d06a9f9 100644--- a/engine/crates/concat/ui/util.slint+++ b/engine/crates/concat/ui/util.slint@@ -24,7 +24,7 @@ export global Fmt {return n < 10 ? "0\{n}" : "\{n}";}- // hh:mm:ss, the format the reference In/Out fields print.+ // hh:mm:ss, the format the In/Out fields print.public pure function timecode(seconds: float) -> string {return Fmt.pad2(Math.floor(seconds / 3600))+ ":" + Fmt.pad2(Math.mod(Math.floor(seconds / 60), 60))@@ -124,7 +124,7 @@ export global Payload {export global Geom {// Point on a circle, in path (viewbox) units. Degrees run clockwise from- // 3 o'clock, matching the SVG convention the web Knob uses.+ // 3 o'clock, the SVG convention.public pure function polar-x(cx: float, radius: float, degrees: float) -> float {return cx + radius * Math.cos(degrees * 1deg);}diff --git a/engine/crates/concat/ui/workspace/config-pane.slint b/engine/crates/concat/ui/workspace/config-pane.slintindex 82a1f77d..dacab6ba 100644--- a/engine/crates/concat/ui/workspace/config-pane.slint+++ b/engine/crates/concat/ui/workspace/config-pane.slint@@ -13,15 +13,12 @@ import {ClipField, ClipKind, ClipTextField, SelectedClipData,} from "../timeline/model.slint";-// The inspector column, in the legacy app's two states:+// The inspector column, in its two states://// - Nothing selected: the Details panel — the project's facts, read-only,// with Modify pinned to the foot.-// - Something selected: the clip inspector — Adjust, Filters, Effects —-// ported from web/src/demo/inspector. The custom-primitives demo panels-// that used to live here were design inspiration, not something the legacy-// app carried, so they are gone from the pane (the primitives they proved-// out live on underneath these controls).+// - Something selected: the clip inspector — Adjust, Filters and Effects,+// or Text alone for a title.// One fact: muted label left, value right. The value wraps rather than// elides — a folder path you cannot read is a path you have to go find.@@ -143,13 +140,12 @@ export component ConfigPane inherits Rectangle {callback effects-remove(index: int);callback effects-set-param(index: int, second: bool, value: float);- // The tab strip follows the selection, exactly as the reference's- // RightPanel does: nothing selected shows only Details, since there is- // nothing to edit; a media clip shows what can be changed and what can be- // added; a still gets Effects but not Filters, because it has picture and- // no sound; and a title gets Text alone — it has no volume, no speed and- // no audio filters, and offering those tabs would be offering panels that- // can only say "nothing here".+ // The tab strip follows the selection: nothing selected shows only+ // Details, since there is nothing to edit; a media clip shows what can be+ // changed and what can be added; a still gets Effects but not Filters,+ // because it has picture and no sound; and a title gets Text alone — it+ // has no volume, no speed and no audio filters, and offering those tabs+ // would be offering panels that can only say "nothing here".property <bool> is-text: root.selected.kind == ClipKind.text;property <bool> is-image: root.selected.kind == ClipKind.image;/// A filter layer gets its own lone tab for the same reason a title does:diff --git a/engine/crates/concat/ui/workspace/media-pane.slint b/engine/crates/concat/ui/workspace/media-pane.slintindex 7e974ab9..7ae251a1 100644--- a/engine/crates/concat/ui/workspace/media-pane.slint+++ b/engine/crates/concat/ui/workspace/media-pane.slint@@ -7,13 +7,9 @@ import { HairlineSplitter } from "splitter.slint";import { PaneKind, PaneSwitcher } from "pane-switcher.slint";// The library pane: a strip of pages across the top, then a narrow category-// sidebar and the browsing area beside it. Ported from the reference editor's-// MediaBin, which is one 1100-line React file; this is the Media page of it.-//-// The other four pages (Text, Transitions, Effects, Templates) are chrome-// here and nothing else — each browses a catalogue that has no counterpart in-// this tree yet, so the tab exists, switches, and says so. Porting one of them-// is porting its catalogue, which is a separate panel's worth of work.+// sidebar and the browsing area beside it. Media is the bin; Text adds a+// title; Transitions, Effects and Filters each browse a catalogue; Templates+// saves the project as one.export enum MediaKind { video, audio, image }@@ -55,10 +51,10 @@ component LibraryTab inherits Rectangle {// child's own preferred width, which is the same rule.horizontal-stretch: 1;border-radius: Theme.r-sm;- // The current page is a chip lifted out of the track. The reference lifts- // it with a shadow as well as a fill; Slint has no box-shadow, so the- // value step carries it alone — which is why this is `field` and not the- // lighter `field-hover`, whose job is to answer the pointer.+ // The current page is a chip lifted out of the track. Slint has no+ // box-shadow, so the value step carries the lift alone — which is why this+ // is `field` and not the lighter `field-hover`, whose job is to answer the+ // pointer.background: root.current ? Theme.field : Colors.transparent;animate background { duration: 120ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }@@ -151,9 +147,8 @@ component CategoryHeading inherits Rectangle {component CategoryRow inherits Rectangle {in property <string> label;- /// -1 hides the count entirely, which is what an undefined count means in- /// the reference; 0 shows nothing either, since an empty bin needs no- /// zero beside every row to say so.+ /// -1 hides the count entirely; 0 shows nothing either, since an empty+ /// bin needs no zero beside every row to say so.in property <int> count: -1;in property <bool> current;@@ -232,13 +227,13 @@ component ImportButton inherits Rectangle {/// A dash and the gap after it, in pixels — the rhythm the whole outline/// is cut to.///- /// Derived from it rather than fixed: the counts used to be constants, 14- /// across and 3 down, so the pitch was whatever the button's width made- /// it. On a 300px button that is a 4px gap every 20px across and a 3.7px+ /// The counts are derived from it rather than fixed. Fixed counts, say 14+ /// across and 3 down, make the pitch whatever the button's width makes+ /// it: on a 300px button that is a 4px gap every 20px across and a 3.7px/// gap every 7.3px down — two different dashed lines meeting at the- /// corners, which is what made the outline read as a mistake rather than- /// as a style. Counting instead of spacing puts both axes on one rhythm,- /// and the rounding spreads the remainder evenly over the run rather than+ /// corners, which makes the outline read as a mistake rather than as a+ /// style. Counting instead of spacing puts both axes on one rhythm, and+ /// the rounding spreads the remainder evenly over the run rather than/// leaving it all at one end.property <length> pitch: 8px;property <int> dashes-h: Math.max(1, Math.round(root.run-h / root.pitch));@@ -352,10 +347,10 @@ component MediaCard inherits Rectangle {/// modifier state at the moment of the press — `clicked` does not carry itproperty <bool> additive;- // The whole card is the drag handle, the way it is in the reference:- // dragging one onto the timeline is how material gets into an edit. The- // DragArea only intercepts once the press has travelled far enough to be a- // drag, so the TouchArea inside keeps its click and its double-click.+ // The whole card is the drag handle: dragging one onto the timeline is+ // how material gets into an edit. The DragArea only intercepts once the+ // press has travelled far enough to be a drag, so the TouchArea inside+ // keeps its click and its double-click.drag := DragArea {// Copy, not move: the bin keeps the file. A DragArea whose data is// empty never starts a drag, which is the whole of the opt-out.@@ -449,8 +444,8 @@ component MediaCard inherits Rectangle {tint: root.mark.with-alpha(0.32);}- // No corner kind badge, on purpose: web/'s bin relies on what the- // artwork already says — footage carries a duration stamp, audio+ // No corner kind badge, on purpose: the artwork already says+ // what kind a card is — footage carries a duration stamp, audio// is a waveform, a still says "still" — so a badge would repeat// information the card gives away at a glance.@@ -476,9 +471,8 @@ component MediaCard inherits Rectangle {}}- // Hover-only, like the reference: a permanent delete button on- // every card in a full bin is one bin's worth of invitations to- // lose work.+ // Hover-only: a permanent delete button on every card in a+ // full bin is one bin's worth of invitations to lose work.if card.has-hover: Rectangle {x: parent.width - self.width - 4px;y: 4px;@@ -567,12 +561,12 @@ component MediaGrid inherits Rectangle {height: Math.max(root.cards-h, root.page-floor);- // Which cards a band's edges touch. The reference asks every card for its- // rect and tests them one by one; the grid here is arithmetic, so the- // question inverts — an edge maps straight to a column, and the four- // answers are the block. The tests are the reference's, strict on both- // sides (`left < right && right > left`), so a band that stops exactly on- // a gutter catches neither of the cards it runs between.+ // Which cards a band's edges touch. The grid is arithmetic, so there is no+ // need to ask every card for its rect and test them one by one: an edge+ // maps straight to a column, and the four answers are the block. The+ // tests are strict on both sides (`left < right && right > left`), so a+ // band that stops exactly on a gutter catches neither of the cards it+ // runs between.pure function first-col(edge: length) -> int {return Math.max(0, Math.floor((edge - root.card-w) / root.col-pitch) + 1);}@@ -586,16 +580,16 @@ component MediaGrid inherits Rectangle {return Math.min(root.rows - 1, Math.ceil(edge / root.row-pitch) - 1);}- // Pressing the background drags a selection band, the way pressing empty- // space in the reference's grid does. Declared first, so the cards take- // their own presses and what is left to press is the gutter between them.+ // Pressing the background drags a selection band. Declared first, so the+ // cards take their own presses and what is left to press is the gutter+ // between them.//// Committed on release rather than as it sweeps — the timeline's band is// the same gesture in the same window and does the same, for the reason// written there: selecting live looks busy and makes a mistaken sweep hard// to back out of. It also keeps the bin off the pointer-rate path, which- // it has no cheap publish for; the reference re-derives on every move- // because a React list can afford to.+ // it has no cheap publish for: re-deriving the selection on every move+ // would mean republishing the whole list at pointer rate.//// A press that never moves closes an empty band, which is a click on empty// space and clears the selection — the same event doing the same job, so@@ -677,14 +671,14 @@ component MediaGrid inherits Rectangle {// ── the catalogue pages ──────────────────────────────────────────────────────// One entry of the transitions or effects catalogue. Display data only: the-// id is what Rust is handed when a card is applied, mirroring lib/effects.ts-// in the reference, where ids are forever because project files store them.+// id is what Rust is handed when a card is applied, and ids are stable+// forever because project files store them.struct CatalogueItemData {id: string,label: string,- /// False keeps the card browsable with a "Soon" badge — the reference's- /// honest version of a disabled control, used by the motion transitions- /// the engine cannot animate yet.+ /// False keeps the card browsable with a "Soon" badge, the honest version+ /// of a disabled control, used by the motion transitions the engine does+ /// not animate.enabled: bool,/// The rendered preview, for effects; empty for transitions and filters,/// whose tiles carry a mark on a sunken ground instead.@@ -1019,11 +1013,10 @@ export component MediaPane inherits Rectangle {property <length> sidebar: Math.max(0px,Math.min(root.sidebar-w, root.width / 2));- // The catalogues, mirrored from lib/effects.ts in the reference: same ids- // (they are written into project files there — pick them like you mean- // them), same labels, same category split. The effect artwork is the- // reference's own rendered previews, each effect's real FFmpeg chain run- // over one source still.+ // The catalogues. The ids are written into project files, so they are+ // stable forever - pick them like you mean them. The effect artwork is a+ // rendered preview, each effect's real FFmpeg chain run over one source+ // still.property <[CatalogueItemData]> transitions-basic: [{ id: "cross-fade", label: "Cross Fade", enabled: true, glyph: Glyph.transition },{ id: "fade-black", label: "Fade to Black", enabled: true, glyph: Glyph.transition },@@ -1036,10 +1029,11 @@ export component MediaPane inherits Rectangle {{ id: "zoom", label: "Zoom", enabled: false, glyph: Glyph.transition },];- // The audio filters, mirroring PresetCatalog.filters in the inspector —- // same ids, same shelves. They have no artwork and never will: a picture- // of a sound is a waveform, and every one of these would draw the same- // one. The mark says "this is audio" and the name does the rest.+ // The audio filters: the same ids and the same shelves as+ // PresetCatalog.filters in the inspector. They have no artwork and never+ // will: a picture of a sound is a waveform, and every one of these would+ // draw the same one. The mark says "this is audio" and the name does the+ // rest.property <[CatalogueItemData]> filters-voice: [{ id: "sweet", label: "Sweet", enabled: true, glyph: Glyph.waveform },{ id: "deep", label: "Deep", enabled: true, glyph: Glyph.waveform },@@ -1131,12 +1125,10 @@ export component MediaPane inherits Rectangle {// A sunken track and nothing else. No border: this sits// inside a pane that is already outlined, and a second rule- // 8px in from the first reads as a box in a box. The- // reference draws it the same way — `rounded-lg bg-sunken- // p-0.5`, no border — which is what separates it from- // `SegmentedControl`, where the border is doing real work- // because that control sits loose in a form row with nothing- // else to bound it.+ // 8px in from the first reads as a box in a box. That is what+ // separates it from `SegmentedControl`, where the border is+ // doing real work because that control sits loose in a form+ // row with nothing else to bound it.Rectangle {background: Theme.well;border-radius: Theme.r;@@ -1564,10 +1556,8 @@ export component MediaPane inherits Rectangle {}}- // Templates: the save affordance, then the gallery — which is- // engine-backed in the reference (templateList), and nothing- // in this tree persists projects yet, so the gallery is its- // empty state until that seam exists.+ // Templates: the save affordance, then the gallery of saved+ // templates, which shows its empty state until one is saved.if root.tab == 5: HorizontalLayout {padding: 8px;diff --git a/engine/crates/concat/ui/workspace/preview-pane.slint b/engine/crates/concat/ui/workspace/preview-pane.slintindex 012275b7..2be84f98 100644--- a/engine/crates/concat/ui/workspace/preview-pane.slint+++ b/engine/crates/concat/ui/workspace/preview-pane.slint@@ -10,20 +10,19 @@ import { Select } from "../primitives/select.slint";import { Pane, PaneHeader } from "pane.slint";import { PaneKind, PaneSwitcher } from "pane-switcher.slint";-// The programme monitor, ported from web/'s preview panel: a header that says-// what the output is, a stage on a sunken viewport, and a transport tray under-// it in three parts — timecode on the leading edge, the buttons dead centre,-// the output and zoom pickers on the trailing edge.+// The programme monitor: a header that says what the output is, a stage on a+// sunken viewport, and a transport tray under it in three parts — timecode on+// the leading edge, the buttons dead centre, the output and zoom pickers on+// the trailing edge.//// Time is held in frames, not seconds. A monitor that cannot land on a frame// is not a monitor, and every rounding question disappears once the unit is// the frame. The readout is a NumberField, so the same drag-to-scrub gesture// that moves a position field moves the playhead.//-// The stage is black and empty. web/ draws a generated scene into it to prove-// the monitor moves; there is no decoder in this tree, so what it shows is the-// state a real monitor spends plenty of its time in — nothing under the-// playhead — and the seam for a frame is the stage rectangle itself.+// The stage is black. A decoded frame is drawn fitted into it when there is+// one; otherwise it says that nothing is under the playhead, which is a state+// a real monitor spends plenty of its time in./// An outline in the shape of the thing it selects. Beats any label at saying/// "tall" or "wide" at a glance, and it is drawn at ratio rather than to a@@ -293,12 +292,10 @@ export component PreviewPane inherits Rectangle {viewport := Rectangle {vertical-stretch: 1;// Sunken, and darker than the header and transport either side of- // it. This briefly took the panel's own tone, back when the panel- // sat at the value web/'s viewport uses; the ladder has moved up a- // step since, and a monitor's ground should fall away from the- // chrome around it rather than sit level with it — the darker the- // surround, the less the picture has to fight to be the brightest- // thing in the pane.+ // it. A monitor's ground should fall away from the chrome around+ // it rather than sit level with it — the darker the surround, the+ // less the picture has to fight to be the brightest thing in the+ // pane.background: Theme.well;clip: true;@@ -318,10 +315,10 @@ export component PreviewPane inherits Rectangle {width: viewport.stage-w;height: self.width / root.aspect;background: Theme.stage;- // web/ lifts the stage off the well with a 1px ring and a soft- // drop shadow. Slint has no box-shadow, so the ring does the- // work alone — which is also why it is `line-strong` and not- // the hairline every other edge uses.+ // A 1px ring lifts the stage off the well. Slint has no+ // box-shadow, so the ring does the work alone — which is why+ // it is `line-strong` and not the hairline every other edge+ // uses.border-width: 1px;border-color: Theme.line-strong;clip: true;@@ -361,9 +358,9 @@ export component PreviewPane inherits Rectangle {image-fit: contain;}- // The clip that would be showing, named in the corner. The- // reference has a picture to identify itself; without one, the- // name is the only thing that says the monitor is live.+ // The clip under the playhead, named in the corner. Without a+ // decoded frame, the name is the only thing that says the+ // monitor is live.if root.has-picture: Text {x: 8px;y: parent.height - self.height - 8px;@@ -492,9 +489,8 @@ export component PreviewPane inherits Rectangle {}// What fraction of the frame the engine composites for the- // monitor — the reference's own control, and the reason a- // 4K timeline stays scrubbable on a laptop. Nothing- // composites here yet, so today it states intent only.+ // monitor, and the reason a 4K timeline stays scrubbable+ // on a laptop.VerticalLayout {alignment: center;Select {diff --git a/engine/crates/concat/ui/workspace/splitter.slint b/engine/crates/concat/ui/workspace/splitter.slintindex 93efa3c9..23523f75 100644--- a/engine/crates/concat/ui/workspace/splitter.slint+++ b/engine/crates/concat/ui/workspace/splitter.slint@@ -42,9 +42,8 @@ export component ColSplitter inherits Rectangle {animate opacity { duration: 100ms; easing: cubic-bezier(0.4, 0, 0.2, 1); }}- // A little wider than the gutter it sits in. The reference makes its hit- // area exactly the gutter; two more pixels a side costs the panes nothing- // they use and turns an 8px target into a 12px one.+ // A little wider than the gutter it sits in. Two more pixels a side costs+ // the panes nothing they use and turns an 8px target into a 12px one.touch := TouchArea {x: -2px;width: root.width + 4px;diff --git a/engine/crates/concat/ui/workspace/timeline-pane.slint b/engine/crates/concat/ui/workspace/timeline-pane.slintindex b1ac8f63..ad53f5e6 100644--- a/engine/crates/concat/ui/workspace/timeline-pane.slint+++ b/engine/crates/concat/ui/workspace/timeline-pane.slint@@ -19,10 +19,9 @@ import { Lanes } from "../timeline/lanes.slint";// The timeline pane: tabs, tray, and then the lane grid — a fixed header// column beside the lanes themselves.//-// No PaneHeader, unlike the other three panes. The reference's timeline owns-// its whole interior (it reuses PANEL_SHELL rather than the Panel component-// for exactly this reason), and a title strip above the tabs would be a third-// bar over a panel that already has two.+// No PaneHeader, unlike the other three panes. The timeline owns its whole+// interior: a title strip above the tabs would be a third bar over a panel+// that already has two.export component TimelinePane inherits Rectangle {// ── the tabs ─────────────────────────────────────────────────────────in property <[TimelineTabData]> tabs;@@ -112,12 +111,12 @@ export component TimelinePane inherits Rectangle {callback pane-removed();/// Wide enough for a lane name and its switches without eliding the name- /// at every default. The reference opens at 164px and carries two toggles;- /// this column carries four, and 164 left the name with about six- /// characters once the remove button appeared on hover. Both numbers went- /// up by one 26px slot when the row-height menu joined the switches —- /// the alternative was a name that elided at the default width, which is- /// the thing this width exists to prevent.+ /// at every default. This column carries four switches, and at 164px the+ /// name was left with about six characters once the remove button+ /// appeared on hover. Both numbers went up by one 26px slot when the+ /// row-height menu joined the switches — the alternative was a name that+ /// elided at the default width, which is the thing this width exists to+ /// prevent.in-out property <length> header-width: 234px;/// Narrow enough to be useful as a squeeze, wide enough that the switches/// never overlap the name.@@ -141,8 +140,8 @@ export component TimelinePane inherits Rectangle {/// Clamped here rather than only where it is written, so a pane dragged/// taller than its own track stack cannot stay parked past the end. The- /// stack is measured off its last lane, since the lanes are no longer one- /// height to multiply out.+ /// stack is measured off its last lane, since the lanes differ in height+ /// and there is no one value to multiply out.property <length> stack-h: root.tracks.length > 0? root.tracks[root.tracks.length - 1].top+ root.tracks[root.tracks.length - 1].height@@ -207,9 +206,9 @@ export component TimelinePane inherits Rectangle {}add-track => { root.add-track(); }fit => { root.zoom-to-fit(lanes.width); }- // No anchor from a button: the reference zooms about the pointer- // for a wheel and about the view for a press, and a press has no- // pointer to speak of. -1 is read as "keep the left edge".+ // No anchor from a button: a wheel zooms about the pointer and a+ // press zooms about the view, since a press has no pointer to+ // speak of. -1 is read as "keep the left edge".zoom(factor) => { root.zoom(factor, -1); }}diff --git a/engine/crates/concat/ui/workspace/workspace.slint b/engine/crates/concat/ui/workspace/workspace.slintindex 629e56b5..a0860c7d 100644--- a/engine/crates/concat/ui/workspace/workspace.slint+++ b/engine/crates/concat/ui/workspace/workspace.slint@@ -9,21 +9,19 @@ import { Seat } from "seat.slint";// The editor shell: whatever arrangement of views the layout tree currently// describes, drawn out of the two lists Rust publishes.//-// This file used to hold the arrangement itself — three boxes across the top-// and one along the bottom, with two shares and a splitter for each boundary.-// That is one layout, and hard-coding it is what made it the only one. The-// arrangement is a tree now (see dock.slint), it lives in Rust because Slint-// has no recursion to walk one with, and what arrives here is that tree-// already walked: a box per view, a box per gutter.+// The arrangement is not written here. Three boxes across the top and one+// along the bottom, with a splitter for each boundary, is one layout, and+// hard-coding it is what would make it the only one. The arrangement is a+// tree (see dock.slint), it lives in Rust because Slint has no recursion to+// walk one with, and what arrives here is that tree already walked: a box per+// view, a box per gutter.//// So there is nothing to lay out here and nothing to arbitrate. The one thing// this side knows and Rust does not is how big it is, which is why it says so.export component Workspace inherits Rectangle {// One value for the margin and the gutters, so the border around the// workspace and the space between any two panes read as the same gap.- // 8px, matching the reference exactly: its resizers are `w-2`/`h-2` and- // the layout around them is `p-2`, which is the same single value said- // twice. 12px here read as loose beside it.+ // 8px; 12px read as loose.//// Applied on the Rust side rather than here: the gutters are between the// halves of a split, at whatever depth, and only the side walking the treediff --git a/test/README.md b/test/README.mdindex 4189f86c..0306eb05 100644--- a/test/README.md+++ b/test/README.md@@ -3,8 +3,8 @@One-off Python prototypes probing candidate Concat features before any ofthem earns a Rust implementation. Each measures the thing that decidesshippability - speed against realtime on ordinary hardware, and output-quality by ear/eye - because per decision 0010 nothing ships that makes the-user install tools or wait on a server.+quality by ear/eye - because nothing ships that makes the user install+tools or wait on a server.These are research scripts, not product code: run them from this directory,point them at anything in `assets/` (gitignored), and read the numbers.