Commits
Commits on
81510b3d8a215134dfee08efdb06832b8bc9e87f2026-08-13
✅ test(export): the card's seat is the export's seat at every size and pinAhmet Kaan Gümüş · 81510b3
✅ test(export): the card's seat is the export's seat at every size and pin The plugin took the HEVC seat as of the GPU HEVC landing, and the sweep that pinned card against job still asserted the software intra encoder by name -- so the one test guarding "what the card says is what the job opens" failed on a machine where the card was telling the truth. The claim it was making is kept; the seat it hardcoded is not. Beside it, the same pin swept over the two things that move the seat under a user's hand: the project size (320x180, 720p, 1080p -- the plugin refuses HEVC under the driver's 384x384 floor, and both containers fall to the software intra encoder there) and the software pin, over every picture format. Thirty jobs, each started and cancelled at the encoder line it published, each compared against what `planned_video` promised the card. The hardware AV1 seat stays out of it: opening that one hung this box's GPU, which is `av1.rs`'s ignored test and not a sweep's business.
🔧 chore(bench): a seat for hardware HEVC, and a run that may keep its fileAhmet Kaan Gümüş · 57f6721
🔧 chore(bench): a seat for hardware HEVC, and a run that may keep its file `bench export <file> hevchw` measures the GPU seat; plain `hevc` still means the software one so a row keeps comparing with the baselines already recorded against it, and `scripts/bench.sh` sweeps both. `BENCH_KEEP=1` leaves the exported file where a run would have deleted it, which is how a seat is checked for decodability -- `ffprobe -count_frames` on what it actually wrote -- rather than for speed.
✨ feat(export): the GPU takes the HEVC export, and it is the same fileAhmet Kaan Gümüş · bacbe9f
✨ feat(export): the GPU takes the HEVC export, and it is the same file `HwEncoder::open_hevc` on the plugin's new symbol, and `hw_seat`'s HEVC arm goes from a flat `None` -- "the plugin has no HEVC encoder" was true and is not any more -- to a real probe. Unlike the AV1 seat it is **not** behind an opt-in, and what makes that safe is that both HEVC seats code intra-only: preferring the GPU changes how long an export takes and not what comes out of it, which is the whole reason AV1's `VE_HW_AV1` exists and does not apply here. `Enc::HevcHw` beside `Enc::Hevc`, and every unit it hands back is marked a sync point, because that is this encoder's configuration rather than a driver's choice. Falling back is silent and covers all of it: no entrypoint, a plugin too old to carry the symbol, a picture under the driver's 384x384 floor, `VE_SW_ENC=1`, or the export card's own "software only" -- `hw_seat` answers `None` before it probes for the last two, as it always has. The caps line stops saying HEVC is decode-only on this GPU. Measured on this box, both against the software seat's 4.30 fps at 1080p: 1440p at 74 fps, 1080p at 117 fps, output decoding frame for frame.
✨ feat(engine-hw): a third encode seat, and it writes HEVCAhmet Kaan Gümüş · 76787eb
✨ feat(engine-hw): a third encode seat, and it writes HEVC
`vh_enc_hevc_open` beside `vh_enc_open` and `vh_enc_av1_open`: the same
signature, the same session fed through the same `vh_enc_frame` /
`vh_enc_drain` / `vh_enc_close`, so the codec is decided once at the open
and nothing after it is a third path. `EncSession`'s `av1: bool` becomes
an `EncCodec` of three, which is what a two-codec boolean could no longer
say.
Two things the H.264 seat's numbers do not carry over:
* **Intra-only, every picture an IDR.** With a GOP, the P slices this
driver writes are undecodable: the slice segment headers are the
driver's to write and radeonsi writes a constant picture order count
into all of them, so a decoder sees frame after frame claiming to be
the same output picture (measured 2026-08-13 -- only each group's
leading IDR decoded). Intra is therefore not a preference here, and
it happens to be the file the software HEVC seat already writes.
* **384x384 floor.** The same driver that takes a 128x128 H.264
context answers VaError(19) to an HEVC one below that, so the open
says no and the caller falls back rather than reading a driver
refusal mid-export.
`CAP_TABLE`'s HEVC row gains the encode profile it now really opens
(Main, 8-bit -- the Main 10 entry beside it stays a decode claim), and
the caps test that pinned encode to H.264|AV1 pins it to the three.🔧 chore(vendor): cros-codecs learns to write HEVC, from its own branchAhmet Kaan Gümüş · 75da480
🔧 chore(vendor): cros-codecs learns to write HEVC, from its own branch
The vendored 0.0.6 decodes HEVC and encodes H.264 and AV1; the seven
commits behind cros-codecs' `hevc-vaapi-encoder` branch are what give it
the third encoder, and they are carried here verbatim rather than
rewritten:
* `codec/h264/nalu_writer` - emulation prevention after an escaped byte
(the same >=5-zero-run bug the vendored H.264 writer had)
* `codec/h265/nalu_writer` - the H.265 writer that fix belongs to
* `codec/h265/parser` - VPS, SPS and PPS builders, the SPS deriving its
own conformance window from the resolution it is given
* `codec/h265/synthesizer` - the parameter sets written back out as
NALUs, which is what a driver emitting no packed headers needs
* `encoder/h265` + `encoder.rs` - initial tunings on the config
* `encoder/stateless/h265` - the codec and its low-delay predictor
* `encoder/stateless/h265/vaapi` - the VA-API backend
Applied with `git apply -3`; every hunk landed clean against the local
patches already here, the only file with drift being `parser.rs`, whose
entry-point-offset and sub-layer fixes sit far from the new builders.
The c2_wrapper commit is left out (nothing here uses it) and so is the
Cargo uprev (this tree is path-patched).
Upstream's own tests for the new code pass in the source checkout: 22 in
`codec::h265`, 4 in `codec::h264::nalu_writer`. They cannot run in
`vendor/` because the published crate ships no `src/**/test_data`.🐛 fix(playback): a session counts its own workers, not the whole houseAhmet Kaan Gümüş · f490585
🐛 fix(playback): a session counts its own workers, not the whole house The seek tests judged a scrub by `/proc/self/status`, which counts every thread in the process: twenty other tests decoding files of their own moved the number under a session that had done nothing, and the budget assertions flaked at roughly one run in ten -- twice today. `PlaybackSession::live_workers` counts what the session in hand actually owns: its decode worker, the retired ones that have not returned yet, and the audio feeders still in the air (detached, so they are counted rather than joined). Same tight budget, same thing caught -- a storm of forty seeks reads twelve the instant it ends and two again fifty milliseconds later, so a worker that stopped exiting would still be seen.
Merge remote-tracking branch 'origin/main' into worktree-agent-a687c64e216de5a66Ahmet Kaan Gümüş · 07f2cffBrowse files
🐛 fix(timeline): a layer takes the sound down with itAhmet Kaan Gümüş · cd0df09
🐛 fix(timeline): a layer takes the sound down with it A file with audio let go over a further video track landed silent: the placement door put the picture on that lane alone, although its own words said 'its picture on V2, its sound on A2'. Both halves go down now, on the same frames and in one group, with the audio row added when the + V button left the project without one -- one snapshot, so one undo takes the pair and the row back together.
🐛 fix(timeline): the wheel wins over the follow while it playsAhmet Kaan Gümüş · 9bb0b82
🐛 fix(timeline): the wheel wins over the follow while it plays A notch of the wheel during playback was undone before it was seen. The follow centres a playhead that has run off the bed, and scrolling away from a playing head is exactly a playhead running off the bed -- so the very next frame yanked the view back. Which notch survived depended on where the head happened to be, so the wheel looked like it worked sometimes: with a second, longer media making the timeline scrollable at all, five notches moved the view by nothing at all (measured: the seam between the two clips stayed at the same pixel), while the same five notches paused moved it by half a bed. The arbitration has one decision point now. A hand that moves the view itself -- a wheel scroll, a zoom about the pointer -- takes it, and the follow keeps off until the head runs back into what the hand chose to look at, where the pan ends by itself with nothing to press and no timer. A seek and a play/pause hand it back outright: those are a person saying where to look. View::shows is the one question both halves ask, so the follow and the pan can never disagree about where the edge of the bed is. Paused scrolling, the zoom-vs-scroll mapping and the playback path are untouched.
chore: rename ponytail: comment marker to corner-cut:Ahmet Kaan Gümüş · 9ba8e0a
chore: rename ponytail: comment marker to corner-cut: Marker convention renamed after uninstalling the ponytail plugin; semantics unchanged (deliberate corner-cut, known ceiling + upgrade path). Token-only rename, 81 comment lines, no code change.
✨ feat(export): the custom bitrate reaches fifty, and the wheel takes it thereAhmet Kaan Gümüş · dadd2f4
✨ feat(export): the custom bitrate reaches fifty, and the wheel takes it there The ceiling was twenty, which was never an encoder's limit: it was the top of the range the exporter *derives* an automatic bitrate in, borrowed as the cap on a number a person typed. An asked-for rate has its own ceiling now (MAX_EXPLICIT_BITRATE), and the card offers all of it. And a range fifty wide is not a range a stepper walks: the wheel over the custom row moves it, one step a notch, up for more -- the gesture the timeline already zooms and scrolls with. It moves the field while one is open, exactly as the arrows do, so the two ways in never disagree about which number is being changed. Hold-to-run stays the keyboard's, as it is on every other card here.
🐛 fix(export): the decode thread says how it ended, and is waited forAhmet Kaan Gümüş · ba88e8f
🐛 fix(export): the decode thread says how it ended, and is waited for Two hazards the thread brought in, neither of which the serial decoder had. A panicked decode thread dropped its sender saying nothing, and a shut channel read as end of stream: the span ended "because the source ran out", the export wrote what it had and reported success. A truncated file that says it finished is the one outcome an export must never have, and before the decode moved onto a thread the same panic took the whole export down. So the thread now states every ending down the channel -- a picture, an error, or the `Ok(None)` that is end of stream -- and a channel that shuts without one of them is the failure it is. A source genuinely shorter than the clip that names it still ends its span gracefully, and asking again after that stays end of stream rather than turning into a disconnect. And the thread was never joined. `decode::Worker` states why it must be: one abandoned inside `vaInitialize` outlives the process, and Mesa's `atexit` handlers free the state it is still reading -- a SIGSEGV at exit, long after the export succeeded. The handle is kept and joined on drop, after the receiver beside it, which is the field order `decode::FrameStream` is written in: the disconnect is the only thing that wakes a decoder parked in a full send, so joining first would wait for a consumer that is never coming. Throughput is where it was (93.3 fps on a 1080p minute, hardware encode) and the round-trips hold on both seats.
⚡ perf(export): the decoder stops waiting for the encoderAhmet Kaan Gümüş · b728a45
⚡ perf(export): the decoder stops waiting for the encoder An export decoded a picture, encoded it, decoded the next: two engines taking turns, each idle while the other worked. The decode now runs on a thread of its own and hands pictures over a channel two deep, so the encode of picture n overlaps the decode of picture n + 1 -- and the bound is what keeps it honest, since a decoder that ran ahead without one would hold a film's worth of 3 MB pictures. The thread is also where the plugin is opened: a VA-API session is not ours to pass between threads, so the open happens there and its failure comes back down the channel, which is why a vanished source and a codec with no decoder still fail the export rather than looking like a clip that ran out. A 1080p h264 minute exports at 93.3 fps against 73.4 (hardware encode) and 18.3 against 17.5 (software, where the encoder is the wall). The written file is the same one: 1438 frames for the 60 s span, 59.977 s at 24000/1001, zero errors decoding it back, and the round-trip tests hold on both seats.
⚡ perf(waveform): a film's envelope is read by several handsAhmet Kaan Gümüş · 50e3988
⚡ perf(waveform): a film's envelope is read by several hands Importing a source decodes its whole audio track for the lane's waveform, and on a film that is the longest thing an import waits for: 22.7 s of one core for a 2 h 39 m 5.1 E-AC-3 mkv, 3.8 s for a 2 h stereo AAC mp4. It is linear in length and nothing about it was parallel, though `open_multi_streams` has always taken a window per call and seeked to it. So a source long enough to pay for the extra opens is cut into windows -- one per minute, capped at the machine's cores and at eight -- decoded side by side and stitched. The first window is the session that was opened to learn the length, so a split costs `jobs - 1` opens and not `jobs`. Joining is safe because the fold is min/max into absolutely-numbered buckets: the chunk that straddles a joint is folded into both windows and cannot be double-counted. The 2 h 39 m mkv's 22.7 s becomes 4.6 s and the 2 h mp4's 3.8 s becomes 1.2 s, bucket count identical either way. A clip under two minutes is read exactly as it was, on the calling thread. `bench waveform <file>` is the metric.
🐛 fix(decode): a seek into an open GOP is hardware's to finishAhmet Kaan Gümüş · 7652ada
🐛 fix(decode): a seek into an open GOP is hardware's to finish A Blu-ray remux codes its GOPs open: the I picture that opens one is stored ahead of the leading pictures that are *shown* before it, and those reference the GOP before. Restart decoding at that random access point -- which is what every seek, scrub and clip boundary does -- and the leading pictures have references nobody decoded, so the plugin failed its first frame, playback fell back to `rusty_h264`, and that decoder died on the file's I_PCM macroblocks. Seventeen of twenty scrub steps on a 5.27 GB AVC remux ended with no picture at all, and the three that survived cost 482 ms each in software. The pictures are not ours to show, so they are dropped and the decode walks on (bounded by `LEADING_LIMIT`, and only for a session that was positioned somewhere other than the file's own start). The refusal that the tolerance would otherwise swallow is kept at both ends: a stream read from frame 0 is still refused the moment its first picture will not decode, and the plugin probe now counts an immediate end of stream as a refusal rather than a pass -- a session that hands back no picture is the black-frame-and-instant-eof the probe exists to catch. The vendored H.264 decoder's own refusal goes with it: it failed a `frame_num` gap outright unless the stream declared gaps allowed, which is exactly the wrong reading here -- the gap is the editor's, made by starting in the middle of a film, and §8.2.5.2's non-existing frames are what stands in for it. The loop that builds them was already there, behind that flag. Twenty of twenty scrub steps on the remux now decode in hardware, 77 ms median against 482 ms; `seek_matches_linear_every_container` holds for every container, and `dump_frame <file> <n> <out> seek` is what a picture reached by a seek can be compared with the same picture reached by decoding from the start.
🐛 fix(playback): a paused picture holds still, and a late one catches upAhmet Kaan Gümüş · 084f02d
🐛 fix(playback): a paused picture holds still, and a late one catches up Two halves of the same seam: the picture was paced by "the newest frame not later than the clock", and nothing said what to do when the decoder was behind that clock. Paused, the clock is frozen but the decoder is still handing over the backlog it was behind by, and `pump` ran on every repaint -- so a pointer moved over the timeline walked the picture on, one frame per redraw, after the sound had already stopped. Frames are now taken only while the clock runs, or when a seek owes the screen its landing (a scrub is paused by definition); a repaint re-presents what is already there. Gated at the one place a frame reaches the screen, not in the handlers that repaint: a hover, a notice, a resize and a vsync are the same event to it. Playing, a decoder that cannot keep up never got back on its own -- it hands over every frame in order, whether or not its moment has passed, so the gap only grew and the picture drifted seconds behind what was heard. Past 0.4 s late the backlog is abandoned and the picture restarted at the clock (`PlaybackSession::resync_picture`), which touches neither the sound nor the clock, no more than once every 2 s. Measured, 2560x1440 H.264 with software decode forced: paused and wiggling the pointer over the timeline for 3.6 s, the picture was four different frames before and one pixel-identical frame after. Playing the same file, the offset stayed inside 3.3 s with a restart every 2 s instead of growing without bound; with the hardware decoder, which keeps up, no restart fires at all.
✨ feat(silence): the scan reads the clip that was asked about, not the film it came fromAhmet Kaan Gümüş · dec2ced
✨ feat(silence): the scan reads the clip that was asked about, not the film it came from A take cut in half was still decoding the whole source and then throwing most of the answer away: the levels were read from media time 0 to the end of the file, and only `timeline_regions` remembered the clip had a range at all. Now the range *is* the read. `silence::levels` takes the half-open source seconds to scan and hands back windows counted from its own start; `timeline_regions` lands those at `in_frame` plus that and trims to `out_frame`. The card names a scan by source, stream **and** the clip's frames (`ScanKey`), so a trimmed clip is a read of its own and a re-trim is not answered from the cache. Half a take is half a wait, and what it finds is what is still on the timeline.
✨ feat(timeline): the subtitle strip answers the wheel like the lanesAhmet Kaan Gümüş · 0e324ec
✨ feat(timeline): the subtitle strip answers the wheel like the lanes The strip under the tracks is drawn on the same bed, through the same Scale, and a cue is exactly what a hand aims at when it wants to see a line closer -- so it took the same wheel the ruler and the beds already take: ctrl magnifies about the pointer, a bare notch slides the view along. It ignored both until now, a dead surface in the middle of a live panel. Nothing occludes inside it -- the cue boxes and the playhead are plain paint -- so the bed's own listener is the whole of it.
✨ feat(ui): six more families, three of them ones people already live inAhmet Kaan Gümüş · 8a5f18b
✨ feat(ui): six more families, three of them ones people already live in Ocean, Ice and Orchid are this set's own -- a blue-black ground under azure, a near-black blue with the widest ink range here under a pale ice accent, and a dark plum under orchid, which is the warm end of the purples where `violet` is the cold one. Nord, Gruvbox dark and Dracula are the open palettes (all MIT, credited on their modules) mapped onto the thirty-six roles rather than approximated: surfaces and ink are their own numbers wherever they clear the floors this editor already holds every family to. What is adapted is named in place -- those three are *text* palettes and this one draws a name and a waveform on every clip body, so Aurora's green under white is 2.6:1 and the four kinds are those hues taken down until WCAG 1.4.3 holds. Nord's own picked row carries the dim ink at 2.9:1, Dracula's comment blue at 2.4:1, and gruvbox's selection is a grey that says nothing about which row is picked. Two more forced by the guards rather than by taste: a playhead crosses every clip body it passes, so Nord's obvious orange (2.3:1 on a video clip) gives way to nord13 yellow, and gruvbox's playhead is the bright green -- the one hue of that set clearing 3:1 on all four bodies at once. The picker holds twelve rows whole at the 640x360 floor (300 px of a 360 px window) and has room for fourteen, so its scroll stays a safety net. The test says which: the day a family makes it fail, the card owes the affordance line the inspector and the cards carry, because a row nobody knows is under the fold is a row that is not there.
✨ feat(timeline): the wheel zooms and scrolls where the clips areAhmet Kaan Gümüş · a02176e
✨ feat(timeline): the wheel zooms and scrolls where the clips are Ctrl+wheel anywhere over the timeline -- a lane's bed, a clip's trim strip, the ruler -- magnifies about the pointer, and a bare wheel slides the view along it: the mapping every editor shares, on the surface a hand is already aiming at. Only the 24 px ruler strip answered the wheel before, and only with ctrl. Three things had to be true for it to work at all: - A bare notch is a tenth of what is on the bed (SCROLL_NOTCH_SHARE), so one gesture moves the same share of a five second import and of a film; View::scrolled clamps it against the content's own length. - The follow no longer fires on a playhead nobody moved: a view yanked back every frame is a hand's own scroll undone before it is seen. - gpui stops its hit test at an occluder, so the trim strips at a clip's ends took the wheel off the bed with them -- a dead strip exactly where a hand aims to see a cut closer. They answer with the same call now, and the lane column keeps the track names as its own scroll surface. The keys and the buttons zoom exactly as they did.
✨ feat(subtitles): a file's subtitles come onto the timeline that is openAhmet Kaan Gümüş · e17cd0a
✨ feat(subtitles): a file's subtitles come onto the timeline that is open Importing only the subtitles from a file should not mean reimporting the whole media or breaking the timeline. The engine could already do exactly that -- the walk reads a container's subtitle tracks and pushes them onto the timeline's own list, and subtitles are on no lane -- but the only doors to it were a toolbar glyph and a stroke, while the panel where the tracks are listed offered a media import. So the capability was there and the door was not, which is the same thing as not having it. The Text tab's own button is now that door: "Add subtitles from a file…", the action itself (so the button, the stroke and the actions card cannot drift), oracle-gated like every other action button, and accented while the tab has nothing on it -- the primary action of the tab it is in. The tab's empty line names the button rather than pointing at a toolbar. At the 640x360 floor the column is 128 px and a centred label wider than its button is clipped at both ends, so the button says the short form there and the full name stays in the tooltip, the card and the stroke. Whatever the file is: a release's `.mkv`, an `.mp4`, an `.srt` beside it. The media itself joins nothing -- no library row, no lane, no clip, nothing on the edit list moves -- and the same file twice is the same tracks, not two of each. A file the walk found no subtitle track in is now refused as that, in words, naming the file. It used to answer "0 tracks added", which is the sentence a file whose tracks are already on the timeline gets -- two opposite answers wearing one string. The line is drawn once (`PlaybackSession::no_subtitles_in`) and used by both the engine's own door and the front-end's split walk-then-push, and the claim is only ever made after the walk actually looked. A plain media *open* is untouched: nothing is said there about a file with no subtitles, because nobody asked.
✨ feat(ui): four more palettes, on the same measured floorsAhmet Kaan Gümüş · 3c6b5d9
✨ feat(ui): four more palettes, on the same measured floors The set grows to six: forest (green ground, emerald), violet (indigo ground, lavender), rose (neutral ground, one rose accent and no other hue), amber (graphite ground, gold). Cool and warm are untouched. All six are dark on purpose. Colour work is judged against its surround, and a light ground pushes every clip body and every graded frame the wrong way, which is why no editor of this kind ships one. None of them is picked by eye alone. The contrast guards already ran over `PaletteId::ALL`, and the two tint guards do now as well -- four swatches tuned on one ground are exactly where a pair lands inside the margin on another. Every family clears the same floors the first two did: dim ink at 4.5:1 on its own raised surface and on a picked row, both inks on every clip body, the playhead 3:1 against the bed and against a video clip. Where a family could not clear one, the colour moved rather than the threshold -- forest's audio clip went darker, amber's picked row went to a bronze, and amber's focus ring went sky because gold is that family's accent and the keyboard's ring may never be mistaken for it.
⏪ revert(subtitles): the removal bin goes, the way back is the file's own doorAhmet Kaan Gümüş · bbe4e40
⏪ revert(subtitles): the removal bin goes, the way back is the file's own door The recovery bin was the wrong answer to the right complaint. What a person wants after removing a row is not that row back out of a session cupboard -- it is a way to put *any* file's subtitles on a timeline without importing the file, which is the door the next commit is about and which brings the removed one back as a side effect. So `Project` keeps no bin: a removal removes, as it did before, and the row's × and the notice now name the add-subtitles stroke as the way back rather than "import the file again". That old sentence does not come back: the file itself never has to be imported for its subtitles. The engine and app halves both go (b13bd53 here, and the app half that rode into 4420513 while two lanes shared one worktree).
✨ feat(subtitles): a removed track is one click from being backAhmet Kaan Gümüş · f41b4c6
✨ feat(subtitles): a removed track is one click from being back Removing a subtitle row dropped the whole track -- cues and all -- and the only way back was importing the file again, which on a big remux is a walk of the whole container for something the session had in hand a second ago. "Bringing back the removed subtitle needs reimport is very nonsense", and it is: a removal is the one edit here whose inverse cost more than the edit. The removal is now non-destructive at the model. `Project` keeps what it took off in a bin beside the list (`removed_subtitles`), and `restore_subtitles` puts one back with the cues it left with -- no file is read, so a row comes back even when its file has gone missing since. The bin is the session's, not the project's: a `.edith` still writes what the timeline has, exactly as it did. The door is the row the removal leaves behind, under the list and dimmed, with a `+` where the × was: the way off the timeline and the way back on are one shape in one place. The list is drawn while either half of it has rows, so removing the last track is exactly when the way back is on screen rather than the moment the section disappears. The audio side of the same class was already reversible: a lane removal is a history snapshot and z restores it. A library row is not, by the decision recorded in `Project::remove_source`, and is left alone. The app half of this slice (`Player::restore_subtitle_track`, the notice and its test) is in 4420513: the theme work committed the whole tree while both were in flight.
✨ feat(ui): the palette is picked in the window, not at the buildAhmet Kaan Gümüş · 4ddba0c
✨ feat(ui): the palette is picked in the window, not at the build The two colour families were a cargo feature (`--features warm`), which makes the choice one only whoever compiled the binary could make. Both are now `Palette` values behind one relaxed load: a token is a call (`BG_PANEL()`) that reads a field off a 'static table, so a swap repaints the whole window with no restart and no lookup by name. The door is a list, not a toggle -- Theme sits in the toolbar's View group beside Snap, and opens the same picker the resolution and the HDR rendition already use, so a third palette costs one line in `PaletteId::ALL` and nothing anywhere else. The stroke is ctrl+h, the row is in the actions card, and the list now answers the keyboard as well as the pointer: up, down, enter, escape, on every picker in the editor rather than only this one. The pick is kept in ~/.config/edith/theme, beside the keybindings and under the same XDG rule, so it survives a restart; a file that cannot be written is said out loud. The contrast guards run against every palette in the table now instead of the one that used to be compiled, which is what makes a palette added later land gated.
🧪 test(audio): the two real-file cases come off the manifestAhmet Kaan Gümüş · 455e3a6
🧪 test(audio): the two real-file cases come off the manifest Both had a literal path baked into the source, and a placeholder is what they were left with -- so each opened with a `!exists()` return and every run skipped the only case it exists for: the 8-channel Opus import and the seek that lands on its own second. They now ask `engine::real_library::film` for `av1_opus_71` and `av1_opus_51`, the same one-line gate the colour, PGS and dual-audio cases use: the local manifest names the file, is gitignored, and its absence is a skip line rather than a failure. `real_library.toml.example` grows the two keys, described by shape.
🐛 fix(ui): the equalizer's buttons wrap instead of leaving the columnAhmet Kaan Gümüş · fb84e61
🐛 fix(ui): the equalizer's buttons wrap instead of leaving the column The row of numbers above them already wraps for this reason: four buttons side by side are wider than the inspector column at the 640x360 floor, and the last of them -- the spectrum switch -- was off the right-hand edge of the window entirely, reachable by its key and by nothing else.
2026-08-12
🐛 fix(ui): the equalizer card scrolls instead of running off the columnAhmet Kaan Gümüş · e7de125
🐛 fix(ui): the equalizer card scrolls instead of running off the column Docked in the inspector, the card is the tallest thing in that column -- a 132 px graph with a row of numbers and a row of buttons under it -- and at the 360 px floor it was taller than the column itself: the title ran off the top, the Flatten/Add/Remove/Spectrum row off the bottom, and neither was reachable by any means. A cap the same way the width already has one, and the rows under it scroll on their own handle -- the affordance the inspector column itself carries, down to the line that says whether there is more below.
🐛 fix(ui): a card's sliders follow the hand, not only the pressAhmet Kaan Gümüş · 2ed6fe7
🐛 fix(ui): a card's sliders follow the hand, not only the press Every drag in this window is tracked from the root, because each starts on a strip a few pixels wide that the pointer leaves at once. A card puts an occluding scrim over that root, and occluding is where gpui's hit test stops (`Hitbox::is_hovered`) -- so the root heard nothing while a card was up and the equalizer handle, the colour bars and the speed bar were set by the press and then frozen there, release included. The two listeners are methods now, and the scrim of every card that holds a slider registers them as well: the drag tracks under the card, a drag that leaves it is picked up by the root's copy without a seam, and the release still writes exactly one undo step.
🐛 fix(ui): a notice reads as a sentence at the 640x360 floorAhmet Kaan Gümüş · dc279aa
🐛 fix(ui): a notice reads as a sentence at the 640x360 floor The bar is a message beside a hint that keeps its own width, and at the floor the picture region is narrower than the hint alone: the message was squeezed to nothing and, with `min_w(0)` under it, wrapped one character per line -- every failure rendered as a column of letters. The row wraps now, so the hint drops to its own line, and the message carries a floor instead of zero: gpui measures a text element's min-content as the whole unwrapped line, so with no floor at all it would refuse to shrink and run off the region instead.
🐛 fix(ui): the equalizer card stays inside the windowAhmet Kaan Gümüş · 33db3c0
🐛 fix(ui): the equalizer card stays inside the window The card is docked in the inspector now, and it was still asking for `eq_card_w` of the room outright -- a floor of 480 px in a column of 307 at 1280x720, so a third of the card hung off the right edge of the window with the Q stepper and the spectrum switch on it. A cap over `w_full`, which is how the two cards beside it are built, and the row of numbers wraps rather than running past the edge it is capped to.
🐛 fix(ui): a slowed clip refuses the cut in its own wordsAhmet Kaan Gümüş · cd9aea8
🐛 fix(ui): a slowed clip refuses the cut in its own words At a quarter speed each source frame is on screen four timeline frames and only the first of the four is a frame the file has, so `split_at` refuses the other three -- and the menu said "only from inside a clip" about a playhead that was plainly inside one. Two arms now: the edges keep that sentence, and the frame a rate cannot address says so. Refused rather than snapped: `Speed::split_at` documents the refusal as what keeps the two halves adding up to the clip that was cut, and a cut that silently lands somewhere other than the playhead is a worse lie than the one being fixed.
🐛 fix(ui): the equalizer says what is not selected, not a colour tokenAhmet Kaan Gümüş · 9f50845
🐛 fix(ui): the equalizer says what is not selected, not a colour token A rename sweep landed inside a user-visible string: the refusal that sends a hand to an audio clip read "NOTHING BG_SELECTED", naming a palette constant at the person reading it. The one site in the repo (grep for a theme token inside a literal comes back empty now).
🐛 fix(export): the sound gate judges the middle of what it hears, and says which codec it wroteAhmet Kaan Gümüş · 6b7076f
🐛 fix(export): the sound gate judges the middle of what it hears, and says which codec it wrote
Two defects the sampled gate's own first run on a real film exposed.
**The statistic was wrong.** A worst-of-windows rule at 0.95 refused a film this
encoder handles perfectly well: forty five-second windows of one mix, encoded at
128 kbps and decoded back, read
0.803 0.835 0.938 0.940 0.960 0.987 ... median 0.998 ... 0.999
so five of the thirty-nine that carry sound sit under the threshold on a *good*
track -- the same thing OPUS_MAX_KBPS's own table shows, where a span scoring
0.937 at 128 kbps is inside the usable band. What the gate exists to catch is
the opposite shape: a rate the encoder cannot hold ruins the track wherever that
rate is used (0.452/0.697/0.951 at 136 kbps, 0.06 at 256). Half a track cannot
go without the middle of the list moving, so the median separates the two by a
margin no single window can, and a track under a minute is still one window --
median and whole-track correlation are the same number there.
Measured, this film: worst-window 0.8467 (refused, sound written as AAC),
median 0.9982 (taken, written as Opus).
**And the fallback was invisible.** The line the export publishes named "Opus ·
SW encode (opus-rs)" for *every* Matroska encode, because the label it borrowed
predicts from the format and cannot know what the gate decided -- so a track the
gate had just sent to AAC was announced as Opus, on the one path where the
difference is audible. `measured_audio_label` fills in the half a prediction
cannot know.
cargo test -p engine --release --test video_copy -- --include-ignored
7 passed in 133.2 s; the film exported in 98.5 s, 27944 MB, Opus✨ feat(ui): a cut can be put where the export copies it, and the card says soAhmet Kaan Gümüş · bea7164
✨ feat(ui): a cut can be put where the export copies it, and the card says so There was no way to place a cut on a source sync point: the snap knew about clip edges and the playhead and nothing about the file's own groups of pictures. An ordinary mid-film cut therefore fell the whole export back to software intra HEVC -- hours -- and the export card cheerfully predicted the opposite of whatever the engine was about to do. Three doors onto one idea: - The snap, extended. With snap on, a cut lands on the nearest source sync point within the same tolerance every other landing uses, and the playhead goes with it so what was cut is where the line is. - ctrl+[ / ctrl+] put the playhead on the sync point before or after it -- the brackets already mean "the one before / the one after" here. On the actions card like every other action, so the pointer reaches them too. - The timeline's own line says "SYNC POINT — a cut here is copied, not re-encoded" while the playhead is standing on one, so the answer is on screen before the cut rather than in the export card afterwards. ...and the card now asks `planned_seats`, which is the export's own decision: "copy (source packets)" where it would copy, the real encoder where it would not, and the sound named by the same gate the export runs (a Matroska source has no sample table, so it never was the "AAC copy" this used to promise). The cuts are in the probe's key, so moving one onto a sync point flips the line. Driven on a 2h36m 4K HDR film in the harness: playhead to 30:03, ctrl+] to 30:06:22 (badge lights), cut, ctrl+] at 35:07, cut, delete the middle, export -> first output bytes at 114 s, done in 146 s, 28.06 GB, the running line reading exactly what the card predicted.
⚡ fix(export): the sound of a feature film is measured in a minute, not in half an hourAhmet Kaan Gümüş · 3fc6753
⚡ fix(export): the sound of a feature film is measured in a minute, not in half an hour
An mkv export of a two-and-a-half-hour film wrote zero bytes for twenty-one
minutes and then failed its own test's ten-minute cap. All of it was the Opus
fidelity gate: `ruopus` is built here without its `spectrograms` feature, so its
inverse MDCT is an O(n²) DFT with a `sin_cos` per term and decodes at 0.2x real
time. Measured on a two-minute window of a real 4K film (the new
`export_audio_cost` example, and the three `export audio:` lines it reads):
mix (E-AC-3 5.1 -> stereo) 0.7 s
Opus encode (opus-rs) 0.3 s
fidelity decode-back 24.2 s <- 98.6% of the pass
So the gate now samples: twelve five-second windows spread across the track, a
warm-up per window because CELT predicts across frames, and the *worst* window
is the answer -- which is harsher than the old whole-track sum, where a ruined
minute averaged away against two good hours. What it looks for survives
sampling: OPUS_MAX_KBPS's cliff is a rate the encoder falls off, not a defect of
one bar of music. A window with no sound in it is skipped rather than scored
0.0, which is what a silent timeline used to score before falling back to AAC.
...and the export no longer decides what it is *after* paying for the sound:
CopyPlan is consulted first, so the line on screen says "copy" from the first
second, and the audio pass owns the head of the progress bar instead of leaving
it at zero for as long as it runs.
Beside them, for the card that has been predicting the wrong export in both
directions: `planned_seats` asks the export's own gates what it would open, and
`sync_points` hands a front-end the frames a cut may be placed on.
cargo test -p engine --release --test video_copy -- --include-ignored
7 passed in 157.6 s (was: failing the 600 s cap)🐛 fix(engine): the codec stops replacing the whole program's allocatorAhmet Kaan Gümüş · c8f62cb
🐛 fix(engine): the codec stops replacing the whole program's allocator `rusty_h264-common` declares `rusty_alloc` as the `#[global_allocator]` of whatever links it, and its sibling decoder and encoder turn that feature on from their own defaults -- so no downstream feature choice could decline it. Sustained scrubbing churns decode-worker threads, and that allocator faulted on both ends of a thread's life: on a new one's very first allocation, and in `Heap::collect_inner` from the `thread_done` TSD destructor. Three cores. `common` is vendored (the fifth, same idiom as the other four): the feature stays declared so the sibling manifests still resolve, but it is empty and the six-line declaration is gone. Not one line of codec code differs from 0.9.1 -- 360 decoded pictures across three fixtures still match ffmpeg's `framemd5` exactly -- and the process gets glibc's malloc back.
🔀 fix(export): a copied picture names the sound it was really written withAhmet Kaan Gümüş · 64cb44f
🔀 fix(export): a copied picture names the sound it was really written with The copy path and the Opus seat landed in the same function from two lanes and published two different sentences. The encoder path already names the codec the mix was *measured* to have taken; the copy path was still handing the card the same prediction the card shows before an export starts -- so an mkv whose mix fell back to AAC would have run under a line saying Opus, on precisely the exports that are over in a few seconds. Both branches now read the one flag `copy_audio` came back with. The check is the seam itself: an untouched HEVC timeline (copied block for block) with a 5.1 Opus source folded onto its audio lane (encoded), asserting the published line is "copy · Opus · SW encode (opus-rs)" and that the file carries A_OPUS and no A_AAC.
📊 feat(bench): the decode/encode baseline, measured on real 4K filmsAhmet Kaan Gümüş · cb2833f
📊 feat(bench): the decode/encode baseline, measured on real 4K films
Nothing in this tree said how long an open, a seek, a scrub or an export
actually take on the files this editor is used on -- 5 to 30 GB HDR mkvs,
where a fixture's five seconds says nothing. Every later codec change is
supposed to be an improvement over *something*, and this is that something.
`examples/bench` measures one metric per process, on purpose: a decoder
that panics on its own thread must cost one row and not the run. It
reports medians of five with the min and max beside them, because on a
file this size the spread is the finding as often as the middle is.
* `open` -- `Demuxer::open`, cold and warm. Cold is the file's pages
dropped with posix_fadvise(DONTNEED) on a fd of our own:
no root, no drop_caches, nothing else evicted, and
advisory -- so a cold number is the optimistic end of
cold, and the header says so.
* `seek` -- first-frame latency at t=30/600/5400 s down the deferred
opener, which is what every seek and clip boundary uses.
* `scrub` -- twenty steps waited for one by one, then twenty with no
wait at all: the first is latency, the second is what a
drag storm does to the thread count, which is the number
the abandoned-worker problem is actually about.
* `export` -- throughput over a fixed 60 s span, one encoder seat per
run, video only so a sound track that refuses cannot take
the picture's measurement with it. A run that outlasts its
cap is cancelled and still reports a rate, marked CAPPED,
rather than reporting nothing.
`scripts/bench.sh` drives the list and writes the TSV. Its one trap is
worth the line it costs: the plugin is looked for beside the running
executable and an example binary lives a directory below it, so without
LD_LIBRARY_PATH every seat silently reads "SW" -- measured on the small
control file as 23 ms versus 1359 ms for the same seek. The file list is
read from $BENCH_LIST outside the repo: what is measured is a personal
library, and its names are not this project's to record.🔀 fix(ui): the cancelled import speaks through the notice queueAhmet Kaan Gümüş · d381b07
🔀 fix(ui): the cancelled import speaks through the notice queue The import bar's Cancel and the notice *queue* were written in two lanes: one added `cancel_import`, the other turned the single `notice` field into a `VecDeque` behind `notify_user`. Assembled, the cancel was the one message in the editor still writing the field directly -- which no longer exists. It goes through the same door as everything else, so a cancel behind another message queues rather than overwriting it.
🐛 fix(ui): a failed import says which file failedAhmet Kaan Gümüş · 555a273
🐛 fix(ui): a failed import says which file failed Two files on argv that both fail read as "IMPORT FAILED: No such file or directory (os error 2)" and "IMPORT FAILED: file contains a box with a larger size than it" -- two messages, neither of them naming what they are about. Harmless while the bar showed one message and lost the other; the moment the queue shows both, an unnamed failure is a failure about nothing.
🐛 fix(ui): the library still lists what was imported at the 640x360 floorAhmet Kaan Gümüş · c003414
🐛 fix(ui): the library still lists what was imported at the 640x360 floor Five stacked things in that column want 140 px and the floor gives the region 136, so the one child allowed to shrink -- the media list -- was shrunk to nothing: tabs, an Import button, a dimmed way to add at the playhead, and no sign of the file that had just been imported. Found by photographing the floor, not by reading the layout. The list keeps a row's height at minimum and the column carries the remainder on its own scroll, which is the answer the lanes and the inspector already give. Everything in it stays reachable; nothing is clipped.
🎨 feat(ui): a second palette, named button groups, and one live accentAhmet Kaan Gümüş · 5a36eae
🎨 feat(ui): a second palette, named button groups, and one live accent Three of the redesign's other answers, kept where they were better than what this branch had. The palette is two tables now, `cool` (default) and `warm`, in one file with one role name list between them: `--features warm` swaps the family and no call site knows it happened, and a role missing from either is a compile error rather than a region that quietly kept the old colour. It is a compile switch because every token is a `const` and a runtime palette is a lookup at every paint -- the ceiling and the way past it are written where the tables are. The warm family is held to the same measured floors as the cool one, and that caught something on the way in: its picked-row surface put the secondary ink at 4.09:1 where WCAG 1.4.3 wants 4.5, so the surface is darker here than in the branch it came from. The toolbar's buttons are three named groups -- Edit, Track, View -- because a row of twelve unlabelled boxes is a row nobody reads twice, and three labels are three things to skip. Import is filled with the accent while the library is empty, which is the one moment it is genuinely the primary action; Export, which wears the accent the rest of the time, is dimmed until there is something to export. So there is still exactly one live accent in the window -- which is the rule that made Export the accented button in the first place -- and it is on the thing the user has to press next. An accented button also keeps its accent under the pointer now: hovering it to the chrome's grey read as the primary action switching itself off. And a glyph sits in a box of its own width rather than the width it happens to draw: the pause bars are 12 px and the play triangle 11, so pressing Play slid every button in the row one pixel to the left.
🐛 fix(ui): the tracks below the fold say so, and stop saying it once they are upAhmet Kaan Gümüş · 0e5864c
🐛 fix(ui): the tracks below the fold say so, and stop saying it once they are up At the 640x360 floor the timeline takes its share of the window and the lane column scrolls inside it, which is the right arrangement and an invisible one: a third track behind a scroll is a track nobody knows exists. The lanes carry a line now, in the one place the eye is already looking, and the inspector carries the same line for the same reason -- at the floor its project section is below the fold. The line is live. A count of `total - shown` is true once and wrong from the first notch of the wheel: it goes on insisting two tracks are below with the last of them on screen, and an affordance nobody can make go away reads as a bug rather than as an instruction. Both columns report where they have been taken to (`track_scroll`), and the count is of what is *still* below -- `rows_below` for lanes, which are one height, and `px_below` for the inspector's sections, which are not. Whether the line is drawn at all is decided without the scroll, so it cannot flicker in and out under the pointer that is scrolling it: it is there while the column overflows, and it says "the last track" rather than vanishing. Its own flex_none row under a flex_1 column, so the thing announcing the overflow is never the thing the overflow pushes off the window.
✨ feat(ui): two failures in a row are two messages, in orderAhmet Kaan Gümüş · fc6f9b0
✨ feat(ui): two failures in a row are two messages, in order The notice was a slot, so the second import to fail in the same frame was the first one's grave: `self.notice = Some(..)` at seventy call sites, each of them overwriting whatever had not been drawn yet. The user's own case -- two files on argv, both refused for different reasons -- showed exactly one of them. It is a queue now. `Player::notify_user` is the one door every message comes through, so "queued rather than overwritten" is a property of the field instead of seventy call sites remembering to be polite, and the policy it enforces lives in `push_notice` where it can be read at once and tested without a window: a repeat of what is already at the back is dropped (a held key that refuses would otherwise fill the queue with one sentence), eight is the ceiling, and the oldest goes first. The bar says how many are behind it -- a queue nobody is told about is a queue whose second message reads as the first one failing to go away -- and any key or a click answers the front one and brings the next up. The tone is read off the words the message already opens with and drawn as a stripe down the leading edge: a full red bar at every refusal is an alarm, and most of these are answers. Escape is untouched: cancelling an export is hidden while nothing is exporting, so answering a notice with escape cannot arm a refusal behind it.
✨ feat(ui): the floor, the notices and the silent refusalsAhmet Kaan Gümüş · 2c8e3aa
✨ feat(ui): the floor, the notices and the silent refusals The transient bars hang off the bottom of the picture instead of taking a row of the column -- a notice arriving used to push the transport, the toolbar and the timeline down by its own height, which is every control below it moving with state. At 640x360 the timeline takes at most its share of the window and its lanes scroll inside it, the library tabs wrap rather than hanging off the panel, and the level's bar stands down while its button and its keys stay. A class refusal (esc with nothing exporting) is silent; a state refusal speaks.
✨ feat(ui): library tabs, accent primary action, redesign guardsAhmet Kaan Gümüş · 2171351
✨ feat(ui): library tabs, accent primary action, redesign guards Media/Audio/Text tabs over the media pool (the giants' split), the Export button as the one accented control in the window, and three guards: no colour outside the theme, no settings card drawn from the root, and a reserved rect for every button whose label changes with its state.
✨ feat(ui): four regions, one oracle, one token tableAhmet Kaan Gümüş · 2ae5c26
✨ feat(ui): four regions, one oracle, one token table Library left, picture centre with its own transport strip, inspector right, timeline full width along the bottom with the edit toolbar directly above it -- the arrangement Movavi and CapCut share. The settings cards are docked in the inspector, so adjusting a clip no longer hides the clip. Every button asks the one availability oracle, and so does act(): with no file open the toolbar used to be dim and dead to the pointer while the very same actions still fired from the keyboard. Snap, mute and the volume keys answer with nothing open, in both doors, and everything else dims with the oracle's own reason in its tooltip. Clips are painted by kind (video blue, audio green, still teal, cues purple) on a near-black ground with one cyan accent, and every stateful button keeps a rect that does not change with its state.