forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on b02f499d2ae83c64acfb72cd9ca0dc3b5e252bc5Filtered to crates/engine/src/project.rsClear filter

2026-10-23

🚚 edith moves to git.tahinli.comAhmet Kaan Gümüş · b02f499
🚚 edith moves to git.tahinli.com

The working tree as of 2026-10-23, as one commit on top of the last one
here. It carries the work up to that date plus the test-slimming work:
integration tests merged into one binary per crate, nextest config,
doctest = false, debug line tables only, perf tests behind --ignored,
and faster generators, reverse, undo, subtitle-export, hevc, stabilise
and hear tests.

2026-09-30

🐛 fix(test): the window guard's walk skipped no dot-directory, so a scratch clone spoke for the treeAhmet Kaan Gümüş · 308fc77
🐛 fix(test): the window guard's walk skipped no dot-directory, so a scratch clone spoke for the tree

`every_window_write_outside_set_window_is_named` walks the workspace root and
skipped only `target`, `.git` and `vendor`. This root also holds `.delta/` -- a
gitignored scratch area of clones and worktrees left by delta/A-B tooling -- and
the walk descended into it, so the guard was RED on main for ten window writes
inside a checkout nobody edits, with every reported path under
`.delta/worktrees/rfykqt93k1f7/`.

The noise was the smaller half. The same stale clone was also being counted
toward the coverage floor, so a foreign tree was propping up the assertion that
exists to prove the walk reaches real source -- the guard could read a file or
two of ours and still pass on the strength of a stranger's lines.

Skipping every dot-directory rather than naming `.delta`: a dot-dir is by
convention not part of the tree we make claims about, and the next scratch dir a
tool drops here is then skipped by the same rule.

Red before, green after, with `.delta` still on disk. Non-vacuity checked both
ways: a real `s.out_us` write injected into `crates/engine/src/sweep.rs` turns
the guard red on that path, and the file was restored byte-identically
(sha256 36d00f17d595dedfaa0d087ab924e7117698e0527d48ac22fdd904cfffc1af91). The
walk still reaches `crates/app` and now reads 86 files / 79,129 lines, which is
what the floor's own comment already claimed.
🔀 merge(edithloader): the .edith door bounds the caption window, band gain and transform positionAhmet Kaan Gümüş · 2c809fd
🔀 merge(edithloader): the .edith door bounds the caption window, band gain and transform position

# Conflicts:
#	crates/engine/src/project.rs
fix(engine): close the last two gaps in the window guard, and admit the restAhmet Kaan Gümüş · 04265e9
fix(engine): close the last two gaps in the window guard, and admit the rest

Two coverage gaps closed, one class documented as unmatchable, and a
third failure of this same guard found in the act of closing them.

**A `let` hid a struct literal.** The literal branch skipped any line
starting with `let `, so `let out_us = s.out_us;` was correctly a read
while `let tail = SubClip { in_us: cut, out_us: s.out_us, ..s };` -- a
plausible composer shape, and the shape `sub_clear` and `sub_open_room`
were written in before `set_window` existed -- went through green. The
exclusion is now per-occurrence and keyed on what FOLLOWS the name: `=`
is a local binding, `:` or `,` is a field. A tuple pattern
(`let (a, b) = ..`) is separated from a struct literal by the paren
rather than by the `let`, since the same comma means opposite things in
each.

**The walk skipped a file that never spelled the type.** Its filter was
`text.contains("SubClip")`, which is a name-based guess about which
files can reach the type -- the same mistake the hardcoded pair of file
names was, wearing a derived hat. A glob import and an alias defeat it
exactly as they defeated the list. The filter is gone: the walk now
opens EVERY `.rs` under `crates/` that is not test code, 86 files and
~77,600 lines, and the coverage floor moved with it (141 files and
~116,000 before `/tests/` and `mod tests` are cut).

**And the guard was silently asserting nothing.** While retuning that
floor, a clumsy edit deleted the `found.is_empty()` assertion -- the one
the whole test exists for. For a moment the test reported green while
`found` held a real offender, which is the fourth version of this guard
failing in the one way that looks exactly like success. Found by
instrumenting the walk rather than by reading the diff, which is the
only reason it was found at all. The assertion is back, with a comment
saying that if you retune anything here, check that line still exists.

**The unmatchable class, documented rather than chased.** `*a = *b;`,
`*a = other;`, `std::mem::swap(a, b)`, `a.clone_from(b)` and a macro
like `bump!(s.out_us, by)` all write a caption's window and none of them
spell the field name, so a field matcher returns nothing for all of
them. That is a property of the approach, not an oversight: a helper
that writes the field directly IS caught, and it is specifically the
whole-struct and macro forms that pass. The doc comment now names this
class FIRST, as the most likely route a real composer would take, ahead
of a rename of the fields, a writer inside a test, and a file outside
`crates/`. The five forms are pinned in a test asserted to be MISSED, so
the day one starts matching the test asks which side of the line moved
and the residual-risk list cannot quietly grow a claim the matcher has
not earned.

Guard verification, all from the tip, all red:

- the verifier's one-token `s.out_us += by(s.end(), to);` -> project.rs:5869
- a `let`-bound struct literal in place of `set_window` in `sub_open_room` -> project.rs:5807
- `regroup`'s two lines back to raw assignments -> project.rs:3491-3492
- a composer smuggled into `sweep.rs`, a third module -> sweep.rs:67
- a new module reaching the type by glob import and alias, never spelling it -> zz_glob_alias.rs:4
- clean -> green

`the_window_write_matcher_catches_the_ways_a_composer_hides` now pins
eight forms that must be caught (the five above plus `<<=`, a write
through an indirect `&mut`, and the shorthand), five reads that must not
fire, and five field-less forms asserted to be missed.

No production code changed: this is the `#[cfg(test)]` module only, and
all eight composers still route through `set_window`.
fix(engine): make the window guard match how a composer actually writesAhmet Kaan Gümüş · edc51b5
fix(engine): make the window guard match how a composer actually writes

The guard was certifying a claim it could not see. `s.out_us +=
by(s.end(), to);` is a ONE-TOKEN change from the real line, it left
`every_window_write_goes_through_set_window` green, and a grouped
caption's year-deep sibling really did end up 25,919,974,080,030us wide
-- 288,000,000us past the ceiling, which `open_project` then refused. A
guard that certifies a claim it cannot see is worse than a guard that
says what it is, so this fixes the matching and relabels the claim.

The old matcher knew four literal patterns: `.in_us = `, `.out_us = `,
`in_us:`, `out_us:`. It now knows:

- **every assignment operator**, not just `=` -- `+=`, `-=`, `*=`, `/=`,
  `%=`, `^=`, `&=`, `|=`, `<<=`, `>>=`. `==` and `<=` are excluded, and
  the first version of the new matcher got that wrong too: it counted
  `s.out_us <= s.in_us` as a write, which would have flagged every
  never-empty check in the file.
- **struct-literal fields and the shorthand form** (`out_us,`), not just
  `field: value`.
- **writes through a `&mut` the field access is indirect from**
  (`let x: &mut SubClip = q; (*x).in_us = 5;`), by skipping the `let`
  exclusion for the assignment forms and keeping it for the literal
  forms, so `let out_us = s.out_us;` is still not a write.
- **every module in the workspace that can NAME `SubClip`**, found by
  walking `crates/` rather than by hardcoding `project.rs` and
  `edith.rs`. The two-file version was silently certifying a claim about
  `crates/app` it had never opened; the walk now asserts it reached the
  app, and it flags the two `timeline_edit.rs` palette-row sites that
  feed `place_sub` as named allowlist entries rather than as files it
  does not read.

And it is labelled what it is: a **heuristic guard**, with the residual
risk written down -- a write through a helper taking `&mut SubClip` in a
form the matcher cannot see, a macro-mediated write, a `.rs` the walk
does not reach, a writer hidden inside a test, and above all a RENAME of
the fields, which would silence the matcher entirely while it stayed
green. Two tests hold that line:

- `the_window_write_matcher_catches_the_ways_a_composer_hides` pins six
  hiding forms, the verifier's `+=` among them, AND five reads that must
  not fire -- so the list above cannot be padded with reads to stay
  green.
- `every_window_write_outside_set_window_is_named` walks the tree and
  asserts a coverage floor, because the first two versions of this guard
  were vacuous: cutting at the first `#[cfg(test)]` read 160 lines of a
  10,800-line file, and cutting at the last landed inside the guard's
  own test module. A guard that reads nothing is worse than no guard
  because it reads as one, so the floor is asserted rather than assumed.

Both proved by mutation, from the tip:

- the verifier's one-token `s.out_us += by(s.end(), to);` -> the guard
  reds AND the grouped sibling reaches 25,919,974,080,030us;
- a composer smuggled into a THIRD module (`sweep.rs`, which the old
  two-file guard never opened) -> the guard reds by file and line;
- `regroup`'s two lines moved back to raw assignments -> reds;
- clean -> green.

**Why the compiler is still the better answer, and why it was not taken
here.** Making `in_us`/`out_us` private to this module would turn every
outside write into a compile error, which no one-token edit can defeat
-- that is what "let the compiler be the proof" would buy. Priced: 74
`SubClip` construction sites workspace-wide, 31 of them in this crate's
own integration tests, plus a public constructor to replace them, and it
reaches `crates/app`'s `timeline_math.rs` and `player/timeline_edit.rs`,
which other lanes own. That is a refactor of a door's public shape
rather than a bound, and the wrong size for a bug-hunt lane sharing a
machine with three siblings. The invariant itself is already structural
in the code -- all eight composers call `set_window` -- so what this
guard adds is the tripwire for the ninth, not the invariant.
fix(engine): make the caption-window bound structural, not per-armAhmet Kaan Gümüş · eb3f571
fix(engine): make the caption-window bound structural, not per-arm

Three rounds of review each found one more composer a per-arm check had
missed, and the third is the one that ends the sequence: the fix is not
another arm, it is the invariant's shape.

`grow_window` was not, in fact, the single writer of a window.

**A rejoin SUMS two legal halves.** `Project::regroup` keeps the left
half's `in_us` and takes the right half's `out_us` -- and `sub_joinable`
has just established that the halves are consecutive in the *source*,
so the joined width is the sum of two widths that each passed their own
door. Neither half is illegal; the whole is. Two 20-day windows and one
undo-a-split keystroke gave 40 days, which `save_project` wrote and
`open_project` refused. My sweep had disposed of this as "takes the
neighbour's own out_us" -- true, and beside the point: the ceiling bounds
a SUBTRACTION, not its operands.

**A head drag grows the width too.** The ceiling bounds a difference, so
falling `in_us` makes the window wider exactly as growing `out_us`
does. The Start arms clamped `in_us` from above (`in_us <= out_us - 1`),
which says nothing at all about the ceiling: a caption a year into its
source, dragged back 200 days, was 200 days wide with `out_us` never
moving.

So the bound is now one function every writer routes through:

    set_window(&mut SubClip, in_us, out_us)
    // 0 <= in_us < out_us  &&  out_us - in_us <= MAX_WINDOW_US

and `grow_window` is gone -- it was a helper around one arm, which is
what made the other arms look exempt. Everything goes through
`set_window` now: `trim_sub` both edges, `write_sub_edge` both edges,
`regroup`'s join, and the four halves `sub_clear` and `sub_open_room`
build. The doors still REFUSE on entry (parse, `with_subs`, `place_sub`)
and `set_window` still CLAMPS on composition, because that asymmetry is
the point: a door sees a value nobody was mid-gesture on, a composer is
an edit a person is watching happen.

**The closed set is now proved, not argued.** Reasoning about arms does
not scale to an unknown number of them, so
`project::tests::every_window_write_goes_through_set_window` reads both
files and fails if `in_us`/`out_us` is written anywhere outside
`set_window` and the parser's two door lines. It is deliberately a
source scan rather than a `debug_assert!`, because a `debug_assert!`
only fires on a path some test happens to walk.

That scan was vacuous the first two times and the test says so:
cutting at the first `#[cfg(test)]` scanned 160 lines of a 10,800-line
file (a smuggled writer in `write_sub_edge` sailed through), and
cutting at the last one landed inside the scan's own test module. It now
cuts at the test module and asserts how many lines it read, because a
guard that reads nothing is worse than no guard -- it reads as one.

**The ceiling's stated reason was wrong and is now right.** I had claimed
`window_at` needed the ceiling below 2^53 for f64 exactness. It does not:
it is pure i64 with a `saturating_mul`, so the f64 argument never
applied. The real arithmetic: `window_us() * into` with `into` up to
4.29e9 saturates for any window above `i64::MAX / u32::MAX` = 2.1e9us
(~35 minutes), so 30 days is 1200x past the point where the proportion
stops being exact -- which is the actual precision cost, and the reason
this is not "unlimited". f64 exactness IS the right argument for
`sub_lane_cues`'s cue mapping, where 30 days is ~3.5 orders inside
2^53. Nothing else derives anything from a window, so a wider value
costs no memory: the ceiling is a claim about meaning, not resource.

Witnesses, each with its own mutation:

- `a_rejoin_of_two_legal_windows_stays_inside_the_ceiling` -- two 20-day
  halves, one rejoin. Un-routed: "the rejoin summed two 1296000000000us
  windows into 3456000000000us, past the 2592000000000us ceiling".
- `a_head_drag_no_further_than_the_ceiling` -- a year-deep caption, one
  head drag to the offered room. Start arm reverted to a raw `in_us`
  assignment: "gave a 3000030000000us window".
- `every_window_write_goes_through_set_window` -- passes clean; fails on
  a smuggled writer in `write_sub_edge`, on on a smuggled writer in
  `edith.rs`, and on `regroup`'s two lines moved out of `set_window`.
- Loosening `set_window` itself (dropping the ceiling clamp) reds all
  four caption witnesses at once, which is the property a per-arm fix
  does not have.

UX note, recorded as the verifier found it and left unchanged: a drag
that reaches the ceiling stops silently. That is consistent with every
other trim wall here -- `trim_to` drops the snap cue, `commit_trim`
toasts only on `Err` -- so the ceiling behaves like a wall, not like an
error.
fix(engine): clamp a caption window on GROWTH, and raise the ceilingAhmet Kaan Gümüş · f23dd8f
fix(engine): clamp a caption window on GROWTH, and raise the ceiling

A ceiling is only half an invariant. Every door -- the parse,
`with_subs`, `place_sub` -- sees a window on the way IN, so on its own it
left two holes, both of which cost a user their saved work.

**The app could write a file it refused to open.** `trim_sub`'s End arm
GROWS `out_us`, and it grew past the ceiling: a caption trimmed out to
the room the engine itself offered reached 25 hours, `save_project`
wrote `sub 1 0 3240000 0 0 90039000000`, and `open_project` refused
that file with "past the 86400000000us a caption can hold". The trim is
committed and undo does not survive a restart, so there is no in-app way
back -- the editor wrote work it then could not reopen. The `saturating_add`
that killed the overflow panic did not keep the value inside the bound.

**The ceiling was below real use.** A caption's window is a window into
SOURCE media, so its width is the length of the recording it was cut
from, and that is not bounded by a day. A 25-hour conference stream or a
lecture archive measures its own palette row in tens of hours, so the
ceiling refused the user's own media back at them, at `place_sub`, with
nothing placed. "A window this wide is a number nobody meant" holds for
i64::MAX; it does not hold for a long recording.

So:

- `MAX_WINDOW_US` is 30 days, and the reason is arithmetic rather than
  editorial. `SubClip::window_at`'s proportion cut saturates rather than
  wrapping, so the ceiling is about PRECISION: f64 holds an integer
  exactly to 2^53, and 30 days is 2.6e12 -- nine orders of magnitude
  inside it, so the cut is exact rather than merely finite. It is 3.5e6x
  below i64::MAX, and exact in `sub_lane_cues`'s cue mapping for the same
  reason. No real recording reaches it; a typed number does not survive it.

- `grow_window` is the growth law, and is now the single function that may
  write `out_us`. `trim_sub`'s End arm and the group-follow
  `write_sub_edge` both go through it. Growth CLAMPS and entry REFUSES,
  and the asymmetry is the point: a trim is a continuous gesture whose
  every intermediate frame the user sees, so clamping is a drag that
  stops -- exactly like the frame walls `trim_sub` already applies. A
  value arriving from a file or a foreign caller is not mid-gesture, so
  it is named and refused rather than quietly changed.

- `trim_sub_room` is walled by the same number. A front-end asks it to
  draw the drag and then trims to whatever it is told, so an engine that
  offers a trim its own `trim_sub` would clamp is a drag that snaps back
  at the end of the gesture. The room and the trim now agree by
  construction.

Witnesses, each with its own mutation (saveload.rs):

- `a_trim_grown_to_the_offered_room_saves_and_reopens` -- 40-day track,
  trim to the offered room, save, reopen. Clamp removed: "gave a
  2592027000000us window, past the 2592000000000us ceiling".
- `a_group_trim_carries_its_sibling_no_further_than_the_ceiling` --
  `follow_group` SKIPS the dragged member, so a primary-trim-only fix
  misses this entirely: the route is a sibling on a second lane, placed
  20 days into the track so the same delta overshoots. Clamp removed:
  "the group carried the sibling to a 25919974080030us window" -- 10x the
  ceiling.
- `a_caption_over_a_day_of_track_places_and_round_trips` -- a 25-hour
  track placed exactly as `Player::sub_of_track` builds it. Ceiling
  lowered to a day: refused at `place_sub`, nothing placed.

Swept every other writer of `in_us`/`out_us`, all now inside the bound:

- `sub_clear` (both halves) and `sub_open_room` (both halves): the values
  are `window_at` results, which `SubClip::window_at` already clamps into
  the window -- a split cannot widen what it splits.
- `Project::close_gaps`-style join: takes the neighbour's own `out_us`.
- `trim_sub` Start and `write_sub_edge` Start: `in_us` is clamped to
  `out_us - 1`, which is below the ceiling.
- `app`'s `trimmed_sub`: moves `frames` only, never a clock.
- `Project::sub_lane_cues`: reads the window, writes nothing.
fix(player): the three doors the action table armed on their behalfAhmet Kaan Gümüş · 7285b61
fix(player): the three doors the action table armed on their behalf

A verifier pass found the class not disposed at three sites my earlier commits
left standing, and it was right. `Player::act` pre-arms `mark_dirty` from a
`matches!` list BEFORE it dispatches, and `ActionId::Crossfade` and
`ActionId::Dissolve` were on it -- so the arm had already fired before
`crossfade_selected` / `dissolve_selected` ran, and those two called
`set_transition_out` / `crossfade` directly with no arm and no gate of their
own. Pressing the dissolve chord on the last video clip lit `unsaved`, wrote
the sidecar and raised the close prompt while the engine refused with "NOTHING
TO DISSOLVE -- no neighbour end to end" and the bytes did not move: the same
defect, on the sibling door. `act_lane` had the same shape for `remove_lane`,
which refuses a track still holding clips and the last of its kind.

Exactly those three sites, nothing else in the list:

- `crossfade_selected` and `dissolve_selected` arm on the write that took and
  on the join's own edges, the same gate `set_transition_frames` already rides
  (both engine doors answer "the clips are adjacent", snapshot and clamp
  included). `Crossfade` and `Dissolve` come off the list. The dissolve also
  gains the arm it never had: the clip-menu row
  (`ui::bench_stance.rs:577`) reaches `dissolve_selected` directly and was
  armed by nothing at all, so the key path was armed twice and the menu path
  not once.
- `remove_lane` arms inside its own `Some(Ok(()))`, and `act_lane`'s pre-arm is
  gone, so the key and the header button share the one armed door instead of
  two arms for one step.

On the verifier's risk that all three app witnesses are `fn_body` text
assertions, which a mutation moving the arm elsewhere would pass: the premise
those assertions rest on is now a runnable behavioural test rather than a
prose claim. `project::tests::a_transition_door_says_yes_to_a_write_that_moved_nothing`
drives `set_transition_out` and `crossfade`, shows both answer `true` and each
spend an undo step for a write that moved nothing, shows the edges that did not
move, and shows a refusal still answering `false`. The front-end has no window
harness to drive, so the engine is where this can be pinned by running it.

Witness: `the_action_table_arms_nothing_a_door_answers_for_itself` in the
family's `fn_body` shape, with all five of its assertions proven to bite
separately -- crossfade arm, dissolve arm, the two list entries, the
`remove_lane` arm, and `act_lane`'s absent arm. Red panic lines and the
restored-file sha256s (timeline_edit.rs 9128a0fa, actions.rs ca9debbc,
library.rs 61b2f579) are in the lane report.
fix(engine): bound a caption's microsecond window at the doorAhmet Kaan Gümüş · 70ba4eb
fix(engine): bound a caption's microsecond window at the door

A `sub` line's `in_us`/`out_us` is the one number in the `.edith`
format with no magnitude bound: the parse asks whether the window is
*open* (`out_us > in_us`) and never how wide it is, and `micros()` is a
bare i64 parse. So `out_us = 9223372036854775807` was a legal line.

Every split, ripple and group trim re-derives the two halves of the
window by proportion -- `SubClip::window_at`, a plain
`window_us() * into` -- which overflows on the first frame inside the
caption. A hand-edited or hostile `.edith` therefore panics the editor
on the UI thread the first time a user ripple-deletes across, splits or
trims that caption, losing unsaved work, and the file re-crashes on the
next open. In a release build the same line wraps the caption's clock
negative instead: `trim_sub`'s only check on its result is a
`debug_assert!`.

Bounded at the door, by name, beside every other range check a `.edith`
line already has to pass, and the composing arithmetic made total so a
future caller cannot reintroduce the wrap:

- `project::MAX_WINDOW_US` -- a day of track, the same shape of refusal
  as `is_resolution` for a `resolution` line.
- checked at all three doors a caption comes through: the parse
  (`edith.rs`), `Project::with_subs` (a hand-built `Project`) and
  `Project::place_sub` (a dragged placement).
- `SubClip::window_at` saturates its multiply and clamps its answer into
  the window it is cutting; `SubClip::window_us` saturates its
  subtraction; `trim_sub` and `write_sub_edge` saturate their additions.

Witness (`crates/engine/tests/saveload.rs`, hand-built project file, no
`--release`): the 30-second-window control loads, splits and ripples
across; the same file with `out_us = i64::MAX` used to load and then
overflow at `project.rs:654` on both `cut_at` and `cut_regions`, and is
now refused by name at `line 7`. Non-vacuity: with the parse bound
disabled the test goes red on `with_subs`' refusal instead, and with
both disabled it loads again.

2026-09-24

🐛 fix(player): a history step takes its settings and its pick back with itAhmet Kaan Gümüş · 7023001
🐛 fix(player): a history step takes its settings and its pick back with it

Four refuted claims from the bughunt review, each a thing an undo restored in
the session and left stale in everything that reads it.

Engine, the order a restored step runs in: `restored_step` reseeked inside
`edit` and adopted the entry's settings only afterwards, so the landing was
computed from the values the step had just undone -- a rate undo clamped the
playhead to the pre-undo rate's idea of the timeline's end and handed the
worker the last frame for a playhead at three seconds. The closure, then
`adopt_settings`, then the reseek; the same ordering reopens a proxy undo
through the switch that just went back.

Engine, the sweep's shape: `parts()` left the palette out, so the D4
round-trip's `parts` equality passed with `self.subtitles = prev.subtitles`
deleted outright. `SubtitleTrack` compares now and `parts` carries the
palette; the D4 test asserts the palette itself, which is the assertion that
cannot go vacuous.

App, the window's own copies: `^z`/`^y` refresh neither `self.fps` nor the two
proxy switches, so after a rate undo every cut, step and fade in this window
was counted at the rate just undone, the Settings rows showed a project the
session no longer had, and the stale switch was pushed at the next session
made. `history_step` re-reads all three off the session, which is a free
function over the session because this binary has no `TestAppContext` to build
a `Player` in -- `Player::undo` is the call plus the repaint.

App, the subtitle pick: a `^z` of a removal restores the palette and left the
pick where it was, so it named a different track than the one on screen -- the
desync `sub_pick_after_removal` prevents at the removal door. The pick follows
the track it names across the step (`sub_pick_after_restore`), the drawn
plate is dropped when the palette or the pick moved under it, and the two
docs claiming a subtitle removal is not an undo step say what it does now.
🐛 fix(project,playback): the settings and the subtitle palette ride in the history entryAhmet Kaan Gümüş · 2d2933c
🐛 fix(project,playback): the settings and the subtitle palette ride in the history entry

The entry held the lane list alone, so a resolution, a rate, an encoder seat, a mix rate or a proxy switch could not be taken back by ctrl+z, and removing a subtitle column had to retire the whole stack rather than reindex under it. The entry carries a ProjectSettings value and the palette now; the session hands its own copy over at every door and takes the restored one up after an undo, where a rate step conforms the per-source lengths back within a frame the way the way out already did. The column removal takes a step of its own instead of clearing the stack.

2026-09-16

✨ feat(audio): the waveform look carries a strand colour, and a hex/rgb doorAhmet Kaan Gümüş · 1973da2
✨ feat(audio): the waveform look carries a strand colour, and a hex/rgb door

viz_paint widens to one packed u64: hue/sat/strands/glow in the low bytes
exactly as v22 wrote them, the strand's own hue and sat above, and bit 63
saying the strand colour was chosen rather than left to the +128 complement.
Dialect v23. viz_color_hex/viz_color_from_text read and write the colour a
person would type. set_viz_paint_live joins its colour/transform/speed
twins so a drag is one undo step.

2026-09-15

✨ feat(audio): stable envelope height, full hue/sat, strands and glowAhmet Kaan Gümüş · 7ebfc44
✨ feat(audio): stable envelope height, full hue/sat, strands and glow

The 2s window no longer rescales to its own peak, so a bump keeps its
height as it enters and leaves. Colour is a 64-stop hue bar plus sat
(white→full). Strands and glow go from one line to the dense ring.
Packed on Clip.viz_paint; dialect v22.

2026-09-14

✨ feat(audio): waveform styles, any soundtrack, keys search, group on the clip menuAhmet Kaan Gümüş · dfcec06
✨ feat(audio): waveform styles, any soundtrack, keys search, group on the clip menu

Visualizer is no longer wav-only: h on a video clip with sound paints
that file's soundtrack. Style bits live on the clip (outline, smooth,
fast, colour) and toggle from CLIP. `?` type-to-filters the keys list.
Group / Ungroup / Regroup are clip-menu rows, not chords-only.

2026-08-26

✨ feat(app): drag moves the whole selection, all-or-nothingAhmet Kaan Gümüş · 33ae7d9
✨ feat(app): drag moves the whole selection, all-or-nothing

A dragged clip that is itself one of the selection's picks now carries
every other pick along by the same frame delta, in one undo step, and
the selection survives the move with its indices remapped rather than
cleared. One pick refused blocks the whole set -- nothing moves, one
notice. A clip dragged from outside the selection is unchanged.

Project::move_clip is now Project::move_selection with a selection of
one, so the existing single-clip path is byte-identical.

2026-08-21

feat: close subtitle lane gapsAhmet Kaan Gümüş · 45b9182Browse files
fix(timeline): close gap carries a linked take across, not one lane into silenceAhmet Kaan Gümüş · 7f487c1
fix(timeline): close gap carries a linked take across, not one lane into silence

Close gap was a permanent no-op for any linked A/V take: cut_regions
refused per-lane ripples that would pull a take's picture half away
from its sound half. gap_take_scope now widens the ripple to the
take's other lane whenever the same stretch is empty there too (same
start, same length, so nothing but silence moves and sync holds), and
refuses -- in words the user can act on -- when the gap doesn't match
or the other half is solid, rather than leaving the row to click into
silence.
✨ feat(timeline): a right-click on empty bench space closes the gapAhmet Kaan Gümüş · 29d8b28
✨ feat(timeline): a right-click on empty bench space closes the gap

Right-clicking a gap on a lane (video, audio, or the head/tail/middle of
one) now opens the same clip-menu surface with a single "Close gap"
item; picking it ripples every clip after the gap left on that lane
only (Premiere-style per-lane scope, repeatable per track), through
Project::cut_regions so it is one undo press like every other ripple.

engine/src/project.rs: Project::gap_at (+ private gap()) finds the
empty stretch under a frame, None for inside-a-clip or the open end of
a lane (nothing there to ripple back)
engine/src/playback.rs: PlaybackSession::gap_at forwards it
app/src/menus.rs: ContextMenu::on (Clip|Gap) replaces the clip-only idx
field so the existing menu, its scrim, and every context_menu = None
clear site cover the gap menu for free
app/src/player/timeline_edit.rs: open_gap_menu + close_gap
app/src/ui/overlays.rs: gap branch of context_card renders "Close gap"
app/src/ui/bench_stance.rs: bed's right-click hit-tests gap_at; a click
that lands on a clip leaves that clip's own menu untouched

2026-08-20

✨ feat(engine): clips can be moved, scaled, rotated and cropped (edith 20)Ahmet Kaan Gümüş · 684b8a4
✨ feat(engine): clips can be moved, scaled, rotated and cropped (edith 20)

Per-clip TransformParams (position, scale, 90-degree rotation, crop)
shared through a colour-style table, applied in both the playback
preview and the export compositor, persisted as the edith 20 dialect;
v19 files load untransformed.

2026-08-19

🐛 fix(engine): fades reach exported and played-back audioAhmet Kaan Gümüş · 9ec26f6
🐛 fix(engine): fades reach exported and played-back audio

Two bugs: `forces_encode` never checked a clip's own fade, so the
default Web MP4 copy path silently dropped fades from the exported
AAC track. Worse, `Fade`'s frame counts are timeline (fps) frames but
`Fade::apply` multiplies audio-rate sample blocks; unconverted, a
fade's threshold was crossed a few milliseconds into any clip, so a
fade-out muted the rest of the segment outright and a fade-in finished
before an ear (or a 100ms RMS window) could catch it. `Fade::scaled`
now re-counts a fade at the mix's own sample rate the moment the audio
session learns it, which also fixes the same bug in live preview.
wip: transform engine scaffoldingAhmet Kaan Gümüş · 3050ac9Browse files
✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)Ahmet Kaan Gümüş · 8369d8e
✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)

transition_out frames on a video clip dissolve it into the adjacent
next clip; split keeps the tail's transition clamped and zeroes the
head; v18 files load with hard cuts, v19 round-trips bit-exactly.
Blending (playback and export) lands separately.
✨ feat(engine): per-clip audio fades and adjacency crossfade (edith 18)Ahmet Kaan Gümüş · 4e4ec16
✨ feat(engine): per-clip audio fades and adjacency crossfade (edith 18)

# Conflicts:
#	crates/engine/src/export.rs
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18Ahmet Kaan Gümüş · 6d0747c
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18

Clip carries fade_in/fade_out, an equal-power gain envelope mixed into
playback and export, a crossfade() op that sets both edges of two
adjacent audio clips, and split's rule that only the kept edge keeps its
fade. The project file format bumps to edith 18 to carry the two new
fields; a v17 (or older) file loads with every clip's fades at zero.

Fixes a stray fade_in/fade_out struct-literal fragment left outside any
Clip literal in Player::trimmed (crates/app/src/player/timeline_edit.rs),
which was a syntax error breaking the whole app crate's build.

Adds unit coverage for Fade::gain_at's boundary/midpoint curve, the
split edge rule, crossfade's adjacency refusal, the Clip size-lock
test (40 -> 48 bytes), and a v17-loads-zero-fades / v18-round-trips
edith.rs test.
✨ feat(app): the timeline can redo, mirroring undoAhmet Kaan Gümüş · 49a1af3
✨ feat(app): the timeline can redo, mirroring undo

Project grows a redo stack: undo pushes the lanes it leaves onto it,
redo pops one back, and any fresh edit (snapshot) clears it since the
branch undo left behind is no longer where the edit leads. Wired
through PlaybackSession::redo, Player::redo and ActionId::Redo,
bound to ctrl+y -- bare "y" is already SubtitleStyle's, so redo takes
only the ctrl chord.
🧹 fix(engine): the inverse admits its hole, the scale law lives onceAhmet Kaan Gümüş · 47c08dd
🧹 fix(engine): the inverse admits its hole, the scale law lives once

invert fabricated an answer for the frames a shift-right piece never
produces -- the hole between the identity run and the piece's own image
-- against its own doc. It answers None there now, and a test walks the
hole asserting so.

The caption scale law lived twice, one copy clamped and one not, the
exact duplication that drifted a frame before: scaled_caption_frame is
now the single fn both write_speed and speeded_playhead call. The
successor guard saturates instead of overflowing at the clamp ceiling,
and the ungrouped-layer arm of whole_take is pinned by its own test
again -- a layer is lifted, never rippled.
🐛 fix(engine): a merged group stays one placement per laneAhmet Kaan Gümüş · b1724e2
🐛 fix(engine): a merged group stays one placement per lane

group_all folded pre-existing links into the new id transitively with
no check on what the merge produced: two captions on one sub lane, each
grouped with a different picked clip, both took the id -- a state
links_are_consistent only debug_asserts against, where group_of sees
the first and delete_members orphans the second. The merge is now
counted per lane before anything mutates and refused by name when a
lane would carry two, the same refusal remove_lane speaks.
🐛 fix(engine): the captions of a re-rate go through the map itselfAhmet Kaan Gümüş · 675eb6f
🐛 fix(engine): the captions of a re-rate go through the map itself

write_speed re-timed a group's captions with its own ratio formula,
round(frames * new/old) -- one frame adrift from the TimelineMap that
speeded_playhead answers with (92 divergent cells over a length x rate
grid; a 90f clip at 2x landed its caption's last frame on 48 while the
playhead was sent to 47). The write now builds the same per-caption map
and takes start and end from apply(), one source of truth.

Two coverage holes closed: the caption arm of speeded_playhead (a
playhead in a caption's overhang past its clip) had never been
exercised; the write-vs-playhead agreement is now pinned over the grid,
exact for compression, containment for expansion where apply() answers
the start of a frame's new block by construction.

2026-08-16

🧹 fix(engine): the map's law is real, its inverse honest, its docs trueAhmet Kaan Gümüş · d2ac4e7
🧹 fix(engine): the map's law is real, its inverse honest, its docs true

The sweep's survivor-continuity cell built its TimelineMap out of the
playhead's own answer and then discarded it -- a law claimed and never
asked. The map now comes from the member's own old geometry (old span,
source length over the new rate) and the law is the clip's landed span
against the map's ends, non-circular.

invert() walked into a shifted piece's lerp from the wrong end below
its first knot -- frames under min(old lo, new lo) are identity
outright, and the shifted-piece test pins the whole run both ways.

And the delete docs and one old test name still told the caption-lift
story the ripple replaced; they tell the one-law story now.
✅ test(engine): the re-timing sweep, every op against the lawAhmet Kaan Gümüş · 5832d81
✅ test(engine): the re-timing sweep, every op against the law

A table-driven property suite over every mutating op (delete from each
anchor kind, speed at 2x and half, split, regroup, move, trim, paste)
against four project shapes (ungrouped, grouped clips, aligned group
with caption, the offset group) under the universal laws: links
consistent, every lane sorted and disjoint on both its lists, the
playhead's scene within the frame a rate can hold, and the undo
round-trip byte-identical at one snapshot per op.

Two harness findings on the way in, both of the harness and not the
engine: a two-op cell must capture its pre-state between the ops, and
a stretch the neighbours refuse is a valid cell -- the refusal names
its wall and changed nothing. Paste is the named exception the suite
pins directly: media lanes ripple, the words never move.

TimelineMap's invert and the total shift answer the laws today and are
gated test-only until the delete/paste migrations consume them in a
build path.
🐛 fix(timeline): a caption deleted with its group closes its laneAhmet Kaan Gümüş · ac71b75
🐛 fix(timeline): a caption deleted with its group closes its lane

The offset rewrite made a grouped delete ripple each media member's
span out of its own lane but still LIFT the caption members -- so the
sub lane kept the hole while every other lane closed, and the captions
after the deleted one never slid up with the rest. One law now, from
whichever member the delete was clicked on: a caption deleted WITH its
group goes by the same span-out-of-its-own-lane ripple its clip
siblings take, and a caption deleted alone keeps the lift that leaves
a gap, exactly as before. ripple() is the one mechanism -- the same
law the scoped cuts already apply to sub lanes.
🐛 fix(playback): the playhead follows the re-rate through the same mapAhmet Kaan Gümüş · 6d8f3a1
🐛 fix(playback): the playhead follows the re-rate through the same map

A speed change left the playhead at its own timeline position while
write_speed re-timed the group under it, so the scene changed with the
rate -- at 2x from the middle of a clip the cursor jumped a clip's
worth of content. Both the commit and every live sample of the bar now
map the playhead through a TimelineMap built from the group's own old
geometry: each clip member by its old rate against the new one about
its own head, each caption member by the held clip's proportion about
the held clip's head, and a playhead outside every member unmoved --
nothing ripples, so the difference is the gap's to absorb.

TimelineMap (engine/src/map.rs) is the one piecewise-affine answer the
re-timing ops will share; this is its read-side consumer, with the laws
pinned (monotone, exact on the ends, invertible on the image) and the
playhead its first user. The delete and paste migrations land next;
until they do, invert and the total shift answer the laws tests alone.

2026-08-15

✨ feat(engine): a speeded clip keeps its pitchAhmet Kaan Gümüş · 475f10c
✨ feat(engine): a speeded clip keeps its pitch

The tape effect is gone: a speeded clip's audio was resampled at its
speed, so its pitch moved with its rate. The resample is now only what
it always should have been -- the rate conversion, reading a source
written at another sample rate at the ratio of the two rates, pitch-
true by construction -- and the time the Speed asks for is taken by a
WSOLA stretch behind it: windows overlap-added at a different hop, each
placed where it best continues the one before it, so the timeline
compresses or stretches while every period of the signal keeps its own
length. The beep stays a 1 kHz beep at 2x, the words stay spoken.

Hand-rolled, no new dependencies: N=1024 Hann windows, 512-frame
synthesis hop, ±512 search on the first channel by normalized cross-
correlation against the natural continuation, one offset for every
channel so a stereo pair stays coherent. A silent continuation is
placed nominally -- nothing to match -- and a segment too short to
prime a window passes through as the decoder read it. Both halves of
the chain pace the timeline's promise to the frame, which is the A/V
sync invariant the speed suite pins.

Measured, not felt: the stretch's own tests put a 440 Hz sine through
2x and 0.5x and read 440 back by Goertzel with the octave gone; the
sync fixture's 1 kHz beep plays at 1 kHz at 2x and 0.5x through the
real open path (the tape effect's ladder peak read 1350 Hz there), and
a 2x WAV export carries the same 1 kHz back out.
🐛 fix(timeline): an arriving clip never touches the captionsAhmet Kaan Gümüş · a3dc07c
🐛 fix(timeline): an arriving clip never touches the captions

The rippling paste -- the door a video arriving on the timeline goes
through, and the clipboard's own -- opened room on the subtitle lanes
too, splitting a caption the landing fell inside and sliding the rest
behind the new clips. On a timeline of words alone, adding a video cut
the caption in half and pushed its tail to the video's end, which no
hand asked for.

A paste inserts media; the words keep their own clock. A caption that
should travel with a clip is what a group is for, and a group moves as
one. The razor still cuts captions with the picture, and a cut region
still removes the words over it -- those are cuts, and this was an
add.
✨ feat(timeline): captions keep their own clock through a re-rateAhmet Kaan Gümüş · f8f5c46
✨ feat(timeline): captions keep their own clock through a re-rate

A placement's cues crossed the timeline one window-microsecond to one
timeline-microsecond, which is only the truth at unity: a group's
re-rate compresses the frames and leaves the window alone, so the plate
and the lane export drew the words falling behind their box, cue by
cue, and the tail past the end. The map now goes by the placement's own
proportion -- at unity every cue lands exactly where it always did, to
the microsecond, and at 2x the words cross in half the time.

A caption's box wears the rate its window plays at, derived off the
placement itself (so the badge survives the group coming apart), gated
past placement rounding; and the grade and the fit resolve a caption in
hand to the picture it was pinned to, saying so out loud when there is
none -- the speed, silence and equalizer cards' own rule.
🐛 fix(timeline): a region's caption pieces re-time by boundaries, forced apartAhmet Kaan Gümüş · 3a0448f
🐛 fix(timeline): a region's caption pieces re-time by boundaries, forced apart

Rounding each in-region caption piece's start and length independently
could land two pieces on the same frame (two one-frame cues of a
thirty-frame region at 2x both want frame 15) and let the region's last
cue run past where its first follower lands -- a debug-assert panic,
and in release a silent overlap the lane invariant forbids.

The pieces now re-time by their mapped boundaries walked in order: each
piece at least one frame, none past the region's own new end, and the
first caption behind the region lands exactly on it. A rounding
artifact is clamped rather than refused -- nothing about the words
asked for an overlap.
✨ feat(timeline): tempo ops carry the captions of a groupAhmet Kaan Gümüş · b801cf5
✨ feat(timeline): tempo ops carry the captions of a group

A group's caption now travels with everything that re-times it. A rate
set on any member re-times the caption members by the ratio the held
clip's own frames take -- the span on the timeline compresses about the
held clip's head while the words keep their own window -- and a stretch
that would run a caption into its neighbour is refused in the clip
arm's words. The silence scan's speed-up shrinks the caption pieces
inside its regions and slides the rest up with the clips; its Take
scope carries the caption's lane so the cut does too; and the scope law
names a caption half left outside a scoped cut, in the words it always
used for a clip's.

The cards stop dead-ending on a caption in hand: speed and silence
resolve a caption anchor to the media half of its group (the picture
and the sound respectively) and say so out loud -- with the how-to --
when there is no media behind the words; the equalizer takes the
group's sound the same way. Colour and Fit are untouched: a caption
anchor retargets to the playhead's picture exactly as an audio anchor
always has.
🐛 fix(timeline): grouped caption edits reseek, and the link counter clears caption idsAhmet Kaan Gümüş · 25855e8
🐛 fix(timeline): grouped caption edits reseek, and the link counter clears caption ids

A grouped caption's drag and trim move the group's clips with it -- a
timeline->source change -- so PlaybackSession::move_sub and trim_sub
now invalidate Dirty::Both when the caption is grouped with clips (the
check delete_sub already made, now shared as caption_grouped_with_clips),
and the app pays the reset_after_reseek a clip's drag and trim pay on
the same paths.

The link counter a load seeds now sits past every id the file names:
from_parts chains the subs a lane already holds, and with_subs -- the
door a load's placements actually come through, after from_parts --
raises the counter past the ids its captions carry. A hand-grouped
caption holding the file's highest id could have had it re-issued to
the next group that asked, silently grouping it with clips it never
met.

A palette drop onto a subtitle lane renumbers that lane alone; the
picks it held now follow the discipline of every other renumbering
edit -- kept off the lane, re-read for the marked caption, other lanes'
picks untouched. Also folds in the v16 caption-group round-trip test
that had been left out of the previous commit.
✨ feat(engine): offset-preserving groups over clips and captionsAhmet Kaan Gümüş · 48cacb6
✨ feat(engine): offset-preserving groups over clips and captions

The engine half of manual clip grouping: SubClip gains a link id, the
group invariant becomes one-placement-per-lane (span equality dropped),
group_all builds a hand group over clips and captions with mates riding
along, splits keep the left group and share one fresh id on the right
(captions included), deletes ripple each media member's own span on its
own lane and lift caption members, grouped caption drags and group
trims move every member by one delta clamped to each member's own
walls, and the save format grows an optional 6th sub field as v16.

App half (Selection refactor, ctrl+click, ctrl+A, oracle/menu, marks)
follows.

2026-08-14

✨ feat(engine): the words a timeline places are the tracks its file carriesAhmet Kaan Gümüş · 0f135a8
✨ feat(engine): the words a timeline places are the tracks its file carries

An export of a project with subtitle placements writes one track per subtitle
lane, in lane order, from the lane's own cues (`Project::sub_lane_cues`) --
language and title from the palette row its first placement plays. The pick
list stays in charge of a project with nothing placed anywhere, which is every
project the app can make today; the card's line goes lane by lane the same way.

A caption hanging past the last picture holds the timeline open but has nothing
under it to write, so an export now ends with the last picture or sound
(`Project::media_frames`): a cue straddling the end keeps the half inside, a
lane wholly past it writes no track, and the plan line says so before the button
is pressed -- and the sound is no longer padded with silence out to the caption.

A lane of pictures is refused in words and written nowhere: both muxers write
text and neither has a bitmap path. Past `MAX_SUB_TRACKS` lanes the card refuses
by name, and the muxer refuses again.
✨ feat(engine): the words a project places are in the file it savesAhmet Kaan Gümüş · df4020f
✨ feat(engine): the words a project places are in the file it saves

The `.edith` grows a `sub` line -- `sub <lane> <start> <frames> <track>
<in> <out>` -- and a bare `sub <lane>` for a subtitle lane holding
nothing, written in the lane's own place among the video and audio ones
so the display order a load rebuilds is the one that was saved. Both of
a caption's clocks are on the line: the placement in timeline frames
like everything else, the window in the microseconds its cues are timed
in. MAGIC is `edith 15`.

`Project::without_orphan_sources` stops filtering the subtitle lanes out
of its `Parts` and `Project::lane_gains` stops filtering them out of its
gains -- the two are zipped by `edith::emit`, so they were only ever
allowed to filter in step, and now neither does. What is *on* those
lanes travels beside them in the new `Project::lane_subs`, one list per
lane exactly as the gains are, and comes back through
`Project::with_subs`, which is `from_parts` for words: it refuses a
caption on a lane that is not a subtitle lane, an empty span or window,
a track the palette does not have, a span past the last frame there is,
and a lane that overlaps itself. The parser refuses the same file by
line number.

A v14 project is one that named subtitle files and could place none of
them: it loads with its palette whole and no subtitle lane at all, which
is what it always meant, and re-saves as v15 having invented neither.

Also fixes a version-bump straggler in tests/silence.rs, which asserted
`edith 13` against a `edith 14` writer and was red before this change.
🐛 fix(engine): a palette row that goes takes the placements' indexes with itAhmet Kaan Gümüş · 03073e6
🐛 fix(engine): a palette row that goes takes the placements' indexes with it

A `SubClip` names its subtitle track by index into the project's
palette, exactly as a `Clip` names its source -- so `remove_subtitles`
owed `remove_source`'s rule and did not have it: a row removed above a
placement left every clip past it playing the *next* track's words. The
probe that found it: three rows, the middle one placed, remove the first
-- the caption on the lane silently became another language.

Now it follows that rule whole. Refused, naming the lane and the frame
up to three of them, while anything on a subtitle lane plays *this* row;
allowed otherwise, walking every placement past it down one; and the
undo history is cleared, because its snapshots hold the indexes as they
were before the walk. The refusal reaches a person already -- the x on a
subtitle row shows the engine's words verbatim.

Five smaller things the same read turned up, each its own hunk:

- a drag that changes nothing is `Ok` and no step, not a refusal: a
  caption picked up and put back, and an edge pulled past a wall it
  already stands against, are both a hand that did nothing wrong, and a
  front-end shows every `Err` as a notice.
- `remove_lane` names the captions it still holds and the way out --
  three names, a count, "or drag them to another track" -- instead of
  "1 subtitle(s), the first at frame 0".
- its "only track" sentence gets its own arm for a subtitle lane, so the
  word stays true if the guard that makes it unreachable is relaxed.
- `place_sub` says in words that `at` is where it lands and `sub.start`
  is ignored, which is `place`'s own contract for a clip.
- `track_name` is the one place a refusal turns an index into the name a
  panel shows.