forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 978e6857d64772912559c8d8a4e6ee7cd309bdccFiltered to crates/engine/tests/saveload.rsClear filter

2026-08-20

🐛 fix(engine): stale dialect asserts learn the current magicAhmet Kaan Gümüş · 6b8d7dd
🐛 fix(engine): stale dialect asserts learn the current magic

Six integration-test asserts still pinned "edith 16" on freshly saved
projects; the suite had not compiled since that dialect.

2026-08-15

✨ feat(timeline): ctrl-click multi-selection, manual groups, ctrl+aAhmet Kaan Gümüş · 66d5395
✨ feat(timeline): ctrl-click multi-selection, manual groups, ctrl+a

The app half of manual clip grouping: the timeline's selection becomes
a list of picks (Selection, click order kept, anchor = last), ctrl+click
toggles a pick on every clip box, caption box and edge strip, and a
right-click on a picked placement keeps the selection so the menu's
Group row acts on all of it — one pick keeps the span-partner flow.

SelectAll takes ctrl+a (every clip and caption, one selection) and
RemoveAudioLane moves to ctrl+q beside its own letter. The oracle
unhides Group and Detach over captions, words the one-clip-per-lane
refusal, and the caption menu grows the group rows. marked() lights
every pick and its link-mates — captions included — captions wear the
grouped border, trims preview each member by the drag's delta clamped
to its own room, deletes route a grouped caption through the group
door, and a drag's snap excludes the group it carries. The save-format
tests and every affected app suite updated with the new shapes.

2026-08-14

✨ 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.
✨ feat(app): the seat that writes the picture is picked on the card, not by an env pinAhmet Kaan Gümüş · 50af5b5
✨ feat(app): the seat that writes the picture is picked on the card, not by an env pin

The export card gains an Encoder row: Auto, Hardware or Software, three rows in a
list like every other setting with more than two values -- `e` steps it, a click
opens the list, and the planned line under the rows re-probes and says which seat
it measured.

Auto is what every export did before (the GPU where there is one). Hardware is
the GPU or a refusal in words -- `Enc::open` refuses before the muxer exists, so
nothing is written -- and it is now the only door to the plugin's AV1 seat, which
`VE_HW_AV1=1` used to guard: an env pin nobody exporting a film would ever find.
A person who picks it for AV1 gets a plain row naming what happened on this box's
driver, and the pick still stands.

Software forces the CPU encoder, which also takes the zero-copy path off the
table by construction (`Enc::dma_want` answers only for the two hardware seats).

Kept with the project: `.edith` gains an `encoder` line at v14, written only when
it is not Auto, and a v13 file loads as Auto.

- engine: `ExportSettings::force_sw` -> `seat: EncoderSeat`; `hw_seat` returns the
  refusal instead of falling back; `planned_video` says `NO_HW_SEAT` where it would
- app: `Pick::Encoder`/`Choice::Encoder`, card row, `e` in the card's own keyboard
  and in the keys menu (`FIXED`)
- tests: the backends sweep runs all three seats (the AV1 hardware seat excepted,
  as before), and asserts the refusal is only what a missing seat produces
✨ feat(app): the stand-ins are made when a project asks, not whenever a big film arrivesAhmet Kaan Gümüş · 269b0c2
✨ feat(app): the stand-ins are made when a project asks, not whenever a big film arrives

A project now says whether an import makes a proxy by itself. On is the
default and the line left out, so every project that came before behaves
exactly as it did; off makes nothing at all, and turning Proxies on is
what asks for the ones the project is missing -- the only ask there is,
since no per-source item exists.

The file grows an `autoproxy` line and the version goes to 13: a v12
project makes them by itself, which is all any project could do.

The switch is a button beside Proxies in the PROJECT panel, ctrl+o, and
a row on the actions card -- the three doors together, as the two
sync tests require.

2026-08-13

✨ feat(engine): the picture may come off the stand-in, the delivery never doesAhmet Kaan Gümüş · 79c69dd
✨ feat(engine): the picture may come off the stand-in, the delivery never does

One switch for the project, saved with it as the v12 `proxy` line, and
one place that reads it: the span open asks `picture_path`, which hands
back the stand-in where the cache has one and the film itself
everywhere else. The sound is opened elsewhere and is always the film's;
`export` reads the project's own sources and knows nothing of proxies,
so a delivery cannot come off one -- and both sides now say out loud
which file they read (`export source:` / `picture: proxy`), so that is a
grep rather than a belief.

*Which* films have a stand-in is deliberately not saved: a proxy is
found by the film's own path, length and modification time, so the cache
is the single answer and a project file cannot go stale about it. A v11
project loads unchanged and is cut on its films, which is all it could
ever do.

2026-08-12

✨ feat(audio): convert wide layouts and off-rate sources at import instead of refusingAhmet Kaan Gümüş · c94ba8b
✨ feat(audio): convert wide layouts and off-rate sources at import instead of refusing

An 8-channel Opus track came back "IMPORT FAILED: unsupported channel
layout: 8 channels (max stereo)" and took the picture with it, and a
48 kHz file "audio 48000 Hz 2 ch does not match the timeline's 44100 Hz
2 ch". Both strings are gone: an import converts.

Width: `fold_5_1` becomes `downmix`, a coefficient table per layout from
2.1 to 7.1 (ITU-R BS.775 — front channels keep their side, centre and
surrounds join at -3 dB, LFE dropped, both sides normalised by their own
coefficient sum so a full-scale source cannot clip). 5.1 comes out of the
table bit-identical to what it was. `vorbis_to_film_order` gains the RFC
7845 permutations for 3, 5, 7 and 8 channels beside the 6 it had, so
surround Opus at any width reaches the fold in the order the fold reads.
The AC-3 decoder's own 2.1 passthrough, which it leaves at 3, folds here
too, and a multichannel AAC track in an *mp4* now takes the `rusty_aac`
route the Matroska side already had (`aac_decoder`, one call for both).

Rate: the segment resampler a speeded clip already goes through takes the
source rate over the timeline's into its step, so the two compose into one
interpolation and 48 kHz onto a 44.1 kHz timeline keeps its pitch. All of
it is convert-on-read — per packet in the decoder, per buffer in `emit`,
after the window trim — so there is no upfront pass to show progress for
and nothing to cancel.

What is still refused is the layout alone: a mono track cannot join a
stereo timeline, in the words "audio 1 ch does not match the timeline's
2 ch". The picker's grey-out rule follows the gate rather than leading it.

Measured on a 12.9 GB 2160p AV1 remux with a real-library 7.1 Opus
track: imports, opens as a timeline, and a ten-second WAV export comes
back at RMS 0.0091 left / 0.0085 right.

2026-08-11

✨ feat(tonemap): the HDR rendition is a row you pick, not a constant someone chose for youAhmet Kaan Gümüş · 09671f7
✨ feat(tonemap): the HDR rendition is a row you pick, not a constant someone chose for you

BT.2446 Method A's assumed mastering peak was a constant in the module: 400
cd/m^2, one exposure decided for everybody. It is a matter of taste, not of
correctness -- a reference rendition and a vivid one are both honest pictures of
the same film -- so it becomes a project setting with three renditions through
the very same curve, which is what keeps the hues right whichever is picked:

  Reference  1000 nits, chroma 1.0   the published conversion (diffuse white 166)
  Standard    400 nits, chroma 1.0   display-referred, as bright as a player
  Vivid       250 nits, chroma 1.10  brightest, and a tenth more colour

The chroma gain is a scale about 128 in the SDR codes, after the map and clamped
to the legal range: a grey stays exactly grey at any gain, and at 1.0 it is a
clamp the maths cannot reach, so the other two presets are byte for byte what
Method A produced. HLG's OOTF gain is guarded at black -- below a 1000 cd/m^2
peak the system gamma is under 1, and the 0 * inf that follows byte-cast to 0
and put a hole where black belongs.

The preset lives on the Project beside the limiter (a setting, not an undo step),
reaches the decode workers and the export through the same value, and is saved as
a `tonemap` line in edith 11 -- left out when it is the default, so a project
holding no HDR media is the bytes it was, and a v10 file loads as the reference
rendition, which is the only one it ever had. Picking one rebuilds the picture
under the playhead the way a resize does; an SDR project is unmoved.

The panel names it beside the resolution and the rate -- the third thing that is
the project's rather than the media's -- and a click opens the three renditions
with the one in force marked. No stroke: this is a list to look at.
🧹 test(scratch): a fixture directory is deleted by the test that made itAhmet Kaan Gümüş · 5c39124
🧹 test(scratch): a fixture directory is deleted by the test that made it

Every suite here made its own directory under /tmp with a name and a
process id and then walked away from it: 2907 `ve_*` directories, 6.4G of
a 16G tmpfs, none of them reclaimable by anything but a person with `rm`.

`engine::scratch::Scratch` is the one place a throwaway path comes from
now -- a directory, or the single file inside one -- and `Drop` is what
takes it back. That is the whole reason it is a guard rather than a
cleanup call at the end of a test: unwinding runs `Drop`, so the *failing*
tests, which are exactly the ones that used to leave the most behind,
clean up like the passing ones.

It derefs to a `Path`, so the call sites did not have to change: the
helpers that handed back a `PathBuf` hand back one of these. The prefixes
stay what they were, so a directory is still recognisable while a test is
stopped in it.

Nothing about what a test *does* moved -- only where its fixtures live and
when they die. Driven: the whole engine suite and the app's own tests run
with the count of `/tmp/ve_*` before equal to the count after.
🔀 merge(A5): main (dfd4ffe) into the import-policy branchAhmet Kaan Gümüş · cbb0f62
🔀 merge(A5): main (dfd4ffe) into the import-policy branch

No conflicts: A6's waveform/demux work and the subtitle lane do not touch
the import gate.
🔀 merge(A5): main (de15818) into the import-policy branchAhmet Kaan Gümüş · d17f345
🔀 merge(A5): main (de15818) into the import-policy branch

The rate gate main landed (`Rate`) and this branch's codec gate removal
are the same function: `matches_timeline` keeps main's `Rate` return and
loses the codec equality, with the decoder probe in its place. The
refusal tests that named a rate or a silence now name the one thing
left -- one output device, one rate and one layout.
✨ feat(engine): subtitles come in with the film or beside itAhmet Kaan Gümüş · f4b5fd8
✨ feat(engine): subtitles come in with the film or beside it

A subtitle track was a track this engine walked past: the Matroska track
walk kept video and audio and dropped type 0x11, and a `.srt` next to the
media was a file with no door. Now both arrive as the same thing -- a
list of timed cues -- and a project keeps them.

`subtitle`: the cue model plus the two ways in. Standalone `.srt`,
`.vtt` and `.ass`/`.ssa` go through `oxideav-subtitle` and `oxideav-ass`
rather than through a fresh parser here; an embedded track carries its
timing on the block and its text in it, so each codec is put back into
the shape its own parser reads -- which is what makes an embedded track
and the file it was muxed from come back as the same cues.

What cannot be read is refused by name and still listed: the four PGS
tracks of a BluRay remux are four rows saying they are pictures, not an
empty list and not a file that would not open. A `.srt` that has gone
missing since the save is the same story, and a re-save keeps its row.

`.edith` 10 writes `subtitle <track> <path>` -- the reference only, the
cues stay in the file they came from. v9 and every older dialect load as
the projects with no subtitles that they are.
✨ feat(import): mixed codecs and silent takes join the timelineAhmet Kaan Gümüş · 9bc3bd4
✨ feat(import): mixed codecs and silent takes join the timeline

The two refusals a user hits for no reason are gone: a file coded
differently opens its own decoder like every clip already does, and a
file with no audio track contributes silence over its span like a gap
already does.

What the codec gate was really protecting against stays, moved to the
one place that can answer it: import asks the file for a decoder, so a
machine without the VA-API plugin refuses an HEVC take by the decoder's
own name rather than playing black frames with the complaint on stderr.
Rate and layout stay refused -- there is no resampler.

Both audio paths now read a source with no track as the silence they
already synthesise for a hole: the worker plays it, the packet copy
writes it, so an mp4 export of a timeline with a silent take is as long
as the timeline and quiet where the take is.
✨ feat(mix): every track has its own volume and the mix has a ceilingAhmet Kaan Gümüş · dc7d07d
✨ feat(mix): every track has its own volume and the mix has a ceiling

A fader per audio track and one master limiter over the sum of them, both
applied where the lanes are added and nowhere else -- so what an export
writes is what the room heard, by construction rather than by two call
sites agreeing.

A track's fader moves everything on it, every frequency: it is not the
equalizer (one take, one band) and not the panel's volume (this machine's
monitoring, which no file carries). The limiter is lookahead, soft-knee
and per sample: the peak of an exported file is a measurement, not a hope,
and the hard clamp stays behind it as the backstop.

Flat settings are still the bit-exact passthrough: one lane at unity with
the limiter off never opens a mixer thread, and an mp4 of such a timeline
is still a packet copy. A mixed one re-encodes, and the card says so
before the export starts.

Both belong to the project, so `.edith` is v9: `fps`, `limiter` and `gain`
lines, every older dialect still loading flat. The rate line pays an old
debt with it -- a timeline of nothing but stills and songs now comes back
at the rate it was cut at instead of the one its scaffold implied.

UI: the mix card (f, or an audio track's own header), rows with steppers
and hold-to-run arrows, and the track's level on its header.

2026-08-10

✨ feat(timeline): clips play at a speed of their ownAhmet Kaan Gümüş · f8effe8
✨ feat(timeline): clips play at a speed of their own

A clip gains a rate (`Speed`, thousandths of real time, 0.25x to 4x) and
every speed question is answered at the mapping seams that were already
there: `Clip::frames` is the source range divided by the rate, `end` is
built on it, and `map`/`span_at`/`composite_span_at` walk the offset
through `Speed::source_at`. `in_frame`/`out_frame` stay *source* frames,
so a trim and a split still address the file.

The picture needs no new decoder: the span says how many source frames it
reads, and `try_frame` brings the decoder's numbers back through the same
rate -- at 2x two decoded frames land on one timeline frame and the
display's drop-when-behind policy takes it from there. The sound is
resampled per segment inside the worker playback and the audio export
already share (linear interpolation, carried across packet seams), so the
pitch moves with the rate: tape, not pitch-preserve, and the card says so.
Each segment is told how much timeline it owes and pads or trims to it,
which is what keeps a run of speeded cuts from drifting.

Rounding is where a rate could break the lane, so it does not: `Speed::fit`
never hands a trim more source than its room holds, and `Speed::split_at`
refuses a cut a slow clip's rate cannot address rather than leaving two
halves that no longer add up. The fuzz sweeps set_speed in with the rest.

- card in the eq/colour pattern, on `j` and in the clip menu; a drag is one
  undo step for the whole linked group, 1.00x reachable by hand and by `r`
- clip boxes carry a "2.00x" mark, and their width, waveform and details
  row are the timeline length
- WAV/FLAC honour it; mp4 and AV1 *refuse* by name -- that path copies AAC
  packets and a resample is not a copy (ponytail names the upgrade path)
- .edith v8 carries the rate; v7 and older load at 1.00x
- `assets/test_speed_sync.mp4`: one flash, one beep, same instant. At 2x
  they still land together, to the frame.
✨ feat(import): imported files land in the library, never on the timelineAhmet Kaan Gümüş · 5cb33d8
✨ feat(import): imported files land in the library, never on the timeline

An import is not a decision about where a file plays. It registers a source,
notes its native length and stops there; the timeline changes when the user
drags the row onto a lane.

- `PlaybackSession::import`/`import_audio` probe, check and register only,
  returning the source index. No clip, no reseek, and no undo step -- a
  library row changes nothing playable, so there is nothing for `z` to take
  back, and the notice no longer pretends otherwise.
- `PlaybackSession::file_frames` is the native length of a file this session
  has taken in, so a row that has never been placed is placeable at its full
  length. `place_stream_at` takes it from there instead of a `frames`
  argument, and the app drops the clips-derived guesser that returned 0 for a
  source with no clips.
- `PlaybackSession::open_library` is the first import into an empty window:
  the file's canvas, rate and clock over an empty timeline.
- Doors: the Import button, a file dropped on the window and every argv
  argument after the first fill the library. A file *named first* at launch is
  an open, not an import, and still becomes the timeline.
- Fixture + tests: a 25 fps H.264 file, refused by name at both video doors.
✨ feat(timeline): clips are trimmed by dragging their edgesAhmet Kaan Gümüş · 222336b
✨ feat(timeline): clips are trimmed by dragging their edges

A 6 px strip at each end of a clip box takes the press the body-drag would
otherwise take (gpui `occlude`), so one gesture stays one thing: an edge
trims, the middle still moves the clip to another lane, and both ends still
select and open the clip menu. The box follows the pointer while the button
is down and the engine hears about it once, at the release -- one edit, one
undo step for the whole drag, exactly as an equalizer gesture works.

`Project::trim` clamps rather than refuses: one frame of clip always
survives, an edge never crosses its neighbour on the lane, an in-point never
walks back past the source's first frame, and an out-point never runs past
the file's own last frame -- a clip ending past it is a project that will not
open again. `Project` does not know how long a file is, so `PlaybackSession`
now keeps the frame counts it already computes at every import and fills them
in. Linked halves trim together to one clamped edge, the tightest wall of the
group winning, because a link is one span on however many lanes.

`trim_room` is the same clamp without the mutation: the drag asks it where
the edge may land, so the width drawn is the width the release commits. A
timeline drawn to fit the window has no room past its own last frame, so
while a tail is dragged the bed is drawn out to as far as that tail may go --
without it the last clip could be pulled in and never let back out.
🐛 fix(engine,ui): paste respects lane kinds; bounds and rebind capture hardenedAhmet Kaan Gümüş · 11603ec
🐛 fix(engine,ui): paste respects lane kinds; bounds and rebind capture hardened

Four bugs a hunter sweep found, each with the door it comes in through:

- `Project::paste` put the clipboard clip in the first lane of *every* kind,
  so an audio-only clip copied off A1 landed on V1 too: a wav as a video
  source, a decode that fails, and a save the next open refuses. It now asks
  the source what it is, the same question `place_stream_at` asks an import,
  and reaches A1 only when there is no picture.
- The `resolution` line was applied unbounded while the keystroke capped at
  8K, so a crafted `resolution 4294967295 4294967295` panicked `open_black`
  with a capacity overflow. One bound now (`engine::is_resolution`) with both
  doors asking it, and the load door refuses by line like every other
  malformed line.
- `open_room` shifted starts unbounded, and the file format permits a clip
  ending at the very last frame: a paste wrapped it round to the front of the
  lane -- a debug panic, or in release an overlap no reload accepts. The edit
  door refuses the paste that would push anything past `u32::MAX`; the load
  bound stays where it is, since the wrap was the edit's to prevent.
- A rebind captured whatever gpui reported, so shift+= wrote `play +` and the
  next load threw the *whole* keybindings file away, losing every other
  rebind. Capture now takes only a chord the file can spell and read back, and
  a line the parser cannot use costs that line alone -- the magic line is the
  only thing that still refuses the file.
✨ feat(engine): project resolution stands apart from media resolutionAhmet Kaan Gümüş · 19e294a
✨ feat(engine): project resolution stands apart from media resolution

A timeline had one resolution because its first source did: import refused
anything else by name, and there was nowhere to say otherwise. A project now
carries its own picture size and every clip is composed onto it, so media of
different resolutions share a timeline the way they do in any editor.

* scale::Composer is the one definition of that composition -- fit_rect,
  scale_i420, compose_i420 onto a black canvas -- and both playback and export
  call it, so what is written is what was watched. A canvas of the picture's
  own size is a pass-through that allocates nothing and touches no byte.
* Grade first, place second: a grade belongs to the clip's pixels at the
  resolution they were shot at, and the letterbox bars are not the clip.
* Per-clip fit policy (fit/fill/stretch/centre), one byte inline in Clip -- it
  lands in padding the clip already had.
* .edith v7: a `resolution <w> <h>` line and a fit word per clip line. v6..v1
  still load, defaulting to source 0's picture and Fit, which is what those
  projects always meant.
* The fps refusal stays: mixing frame rates is resampling the timeline, a
  different problem, and a refusal is the honest answer until it is solved.
* UI: `p` cycles the fit policy of the clip on screen (and a clip-menu item),
  ctrl+r cycles the project resolution through the usual sizes with the media's
  own among them, and the export card says which size it writes.
✨ feat(timeline): every lane draws and tracks can be addedAhmet Kaan Gümüş · 30e8aae
✨ feat(timeline): every lane draws and tracks can be added

The panel drew V1 and A1 and nothing else, so the N-lane model, the
composite playback and the v6 format had no way into the window. It now
draws a row per project lane, labelled from Lane::label, and grows the
panel per row up to a cap past which the lane column scrolls.

+ V / + A -- and the v / a chords, in the registry so the keys menu lists
them -- add a track; undo takes one back like any other edit.

The V1/A1 pinning the last two slices flagged is gone: delete_clip takes
the lane its index belongs to (Project::delete_in), a drop names the lane
it was let go over (place_stream_at's onto), and whole_take decides
ripple-or-lift per lane -- a clip on an added track is a layer and is
lifted, while the first pair keeps exactly the semantics it had.
Project::paste now inserts into V1/A1 only while still opening room
everywhere, or an Add with three lanes would have played one sound twice.

The export card greys MP4 out with its reason when more than one audio
lane carries sound, on the row and on the m chord both, so the engine's
refusal arrives before a destination is picked.
✨ feat(engine): per-clip color persists in .edith v6Ahmet Kaan Gümüş · 0530fc9
✨ feat(engine): per-clip color persists in .edith v6

A clip names a colour grade the way it names an equalizer: an index into an append-only Project table, deduped on set, pruned at save, inherited by both halves of a split and carried by copy, paste and undo.

The file format grows a color <b>:<c>:<s>:<t> line and a 7th clip field; v5..v1 still load and every one of them re-saves as v6. Clip grew from 32 to 40 bytes -- the eq index fit the padding hole, the colour one did not.
✨ feat(engine): per-clip EQ persists in .edith v5Ahmet Kaan Gümüş · 782fc53
✨ feat(engine): per-clip EQ persists in .edith v5

A clip names its equalizer by index into a project-level table, the way it
already names its source: `Clip` stays `Copy`, so a split hands both halves the
same settings, a clipboard copy carries them and an undo restores whichever
index the clip had. The table is append-only within a session -- an index on a
clipboard clip or in an undo snapshot can never dangle -- and only a save prunes
it, exactly as an undone import leaves its source entry behind.

The file grows `eq <band>...` lines (freq:gain:q:shape, printed `{:?}` so every
f32 comes back bit for bit) and one more clip field naming one of them. v4, v3,
v2 and v1 still load and re-save as v5.
♻️ refactor(engine): the project holds N lanes, V1..Vn and A1..AnAhmet Kaan Gümüş · b474a9b
♻️ refactor(engine): the project holds N lanes, V1..Vn and A1..An

Merge of the multi-lane winner (candidate B) onto the S5a main, plus the
three grafts the judge picked out of candidate A and the delete-selected
fix it flagged:

* LaneData::two_lanes(), one place for the pair single() and from_parts()
  both build;
* a_group_may_span_any_lane: hand-built lanes driving links_are_consistent
  directly -- one take on V1 + A2 with the lanes between it empty is legal,
  and both ways to break the rule are asserted by their exact message;
* add_lane doc: an empty new lane is legal even though from_parts refuses
  an all-empty project -- the lanes that were there still hold the timeline;
* delete_selected is exhaustive over lane.kind and explicit about ord: it
  hands V1/A1 indexes to engine calls that mean V1/A1, so a second-lane
  selection would have deleted a different clip under a _ => false wildcard.

Conflicts, all against the S5a Source model: without_orphan_sources keeps
B's crate::Result and its >1-lane-per-kind refusal but returns Vec<Source>,
and Lane::Audio in place_stream_at/import_audio became Lane::A1.
♻️ refactor(engine): the project holds N lanes, V1..Vn and A1..AnAhmet Kaan Gümüş · 154fd69
♻️ refactor(engine): the project holds N lanes, V1..Vn and A1..An

The edit list was a fixed pair -- `Lane` {Video, Audio}, `lanes: [Vec<Clip>; 2]`
and seven hundred lines of methods walking that pair by hand. Multi-lane UI,
per-lane compositing and per-clip EQ all want lanes to be a list, so make them
one now, while the model is small enough to change in one sitting.

`Lane` becomes a handle -- a `LaneKind` plus a 0-based `ord`, so `Lane::V1` is
the first video lane and `Lane::new(Audio, 1)` is A2 -- and the project stores
`Vec<LaneData>`, a struct that per-lane state (mute, compositing mode, a name)
can grow into. A handle naming a lane that is not there reads as an empty lane
and refuses every mutation, so a front-end that only ever asks for V1/A1 needs
no bounds check of its own. Every method is a walk over the lane list now
instead of two hand-written cases.

The grouping rule generalises rather than pairing lanes off: a link id names at
most one clip per lane and every clip carrying it covers the same span, on
however many lanes. So a split hands out one id per group of lanes whose halves
line up -- one helper, used by split and regroup alike.

Playback, export and the audio worker still read V1 and A1: compositing is its
own slice. So is the file format, which holds one lane keyword per kind, so a
save of more than two lanes is refused by name instead of silently dropping
one; a two-lane project writes exactly the bytes it always did.
✨ feat(library): every audio stream is a row, and the picked one plays and exportsAhmet Kaan Gümüş · ecb5e06
✨ feat(library): every audio stream is a row, and the picked one plays and exports

A file with one audio track per language is one row per track now, not one row
per file. The engine carries the pick end to end: a source is a (file, audio
stream) pair, .edith v3 writes the stream on the source line, playback opens it
and — the trap this closes — the export copies *that* stream's packets rather
than always stream 0.

Streams that cannot go on the timeline are listed greyed with the reason
instead of hidden: a codec we cannot read, or a rate/layout that cannot share
one output device and one copied AAC track with the rest of the timeline (there
is no resampler here and no AAC encoder to write a join with). place_stream_at
is the one door a row goes through, and it refuses those in the engine's own
words.

- v2 and v1 files still load: no stream field means stream 0, which is all
  those dialects could play; saving either writes v3.
- Waveform peaks are keyed by file *and* stream, so two tracks of one file
  cannot draw each other's envelope.
- Library swatches and clip tints follow the *file*, so a file's streams share
  one colour in the panel and on the lanes.
- assets/test_multilang.mp4: two AAC 44.1k stereo streams (und, fra), the shape
  real multi-language media has and the one where a second stream is placeable.
🐛 fix(engine): a refused project load cannot hang on its own decoderAhmet Kaan Gümüş · 771cd4a
🐛 fix(engine): a refused project load cannot hang on its own decoder

`open_project` starts decoding source 0 before it validates anything, so
by the time a later source is refused that worker has filled the
two-frame channel and parked in `send`. The receiver and the worker were
two locals, and locals drop in reverse order of declaration: the worker
joined a decode thread that only the receiver beside it could ever wake.
The app froze on a bad project file instead of showing the error.

The two are one value now. `FrameStream` holds the receiver first and
the worker second, and Rust drops fields in declaration order, so the
disconnect always precedes the join -- in an early return, on an unwind,
and in call sites not written yet. Nothing on the seek path changes:
`start_span` still installs the new receiver and parks the old worker in
the retire list without ever joining.

The device moves below the validation for the same reason. Its feeder
thread outlives the `Audio` value and only a session's `drop` retires
it, so a refusal above that line left a PipeWire stream and a thread
behind for a project that never opened.

Tests: dropping a stream whose frames nobody took returns instead of
hanging (10 s bound; hangs if the two fields are swapped), and the
refusal path itself with enough sources that the park is certain -- 60 s
hang before the fix, 0.04 s after.
✨ feat(engine): video+audio lanes with offset-placed clips, gaps, .edith v2Ahmet Kaan Gümüş · 59eb78e
✨ feat(engine): video+audio lanes with offset-placed clips, gaps, .edith v2

Project gains two lanes; a Clip now carries `start` (its timeline
placement) and `link` (group id), so a gap is simply the absence of a
placement rather than an object anyone has to keep in sync. Moves and
trims become arithmetic on start/in_frame; the lane invariant (sorted,
non-overlapping) is checked in from_parts, at the .edith parser, and
asserted after every mutation.

split cuts every lane and hands the two sides fresh group ids; regroup
is its exact inverse. delete still ripples both lanes (the app keeps its
behaviour), lift removes one placement and leaves a hole, place is the
per-lane overwrite that can make one.

A video gap plays as black frames from a worker that opens no file --
same channel, backpressure, cancel and retire path as a decoder -- and
exports as encoded black. An audio gap is synthesised zero chunks, real
ones, so the master clock keeps counting through it; on the export side
it is spent as stts duration on the packet beside it, since there is no
AAC encoder to make silence with.

.edith v2 writes one line per placement per lane; v1 files still load,
as fully-grouped gapless lanes, and save as v2.

2026-08-09

✨ feat(engine): .veproj save/load — relocatable, validated, atomicAhmet Kaan Gümüş · ac60b80
✨ feat(engine): .veproj save/load — relocatable, validated, atomic

A project file is line-based text: `veproj 1`, an optional playhead, one
`source` line per file and one `clip` line per range. Text because a path is
bytes on this platform and a JSON string could not carry one losslessly, so the
path field is byte-escaped instead; paths under the project's own directory are
written relative to it, which makes a folder of media plus its .veproj movable
anywhere. The parser is strict and every refusal names its 1-based line, and
writing goes through .part + rename as an export does.

Loading is a new session, never a mutation of the old one: source 0 defines the
timeline, every other source passes the same checks import applies (in the same
words), and every clip has to still fit inside the file it plays from -- a
source that vanished or shrank is a refusal that names it, not a silently
shorter timeline. Sources no clip plays from are pruned at save, so an import
that was undone cannot leave a file behind that blocks a future load.