Repository navigation
Migrate from Tauri to gpui-kit - #4
Merged
Merged
Conversation
Phase 0 of the Tauri -> gpui-kit migration (branch migrate-gpui-kit). - Add a "Build rules" block (always build and run the release profile, never a debug build; installers use the dist profile) to the top of the root agent guide and mirror it in docs/development.md. - Add a "Migration in progress" note to both files. The agent guide lists phases 0-14 and states that its architecture sections describe the Tauri app until that app is removed in Phase 12. The migration plan itself is kept outside the repository. - Upgrade the pinned Rust toolchain in src-tauri/rust-toolchain.toml from 1.95.0 to 1.100.0, the latest stable release. CI picks it up because every cargo step runs inside src-tauri/. Fix the stale toolchain note (it still said 1.94.0) and record the 1.91 floor (specta) and the 1.92 floor (gpui-kit). - Add --release to every cargo snippet in both docs (cargo check, cargo test, the BMM_REGEN_PROTOCOL_TS regen command) and to `pnpm tauri dev`. The CI coverage step gains --release in Phase 1, which rewrites those steps. No application code changes. gpui-kit version check: not applicable, there is no gpui-kit dependency before Phase 2.
Phase 1 of the gpui-kit migration. The repository becomes a Cargo workspace, and everything UI-free moves out of src-tauri into a new library crate, crates/bmm-core, so the native application can reuse it. Workspace - Root Cargo.toml: resolver 3, members crates/bmm-core and src-tauri, shared dependency pins (anyhow, log, serde, serde_json, specta*), release profile left at Cargo defaults, and a dist profile (inherits release, thin LTO, codegen-units 1, stripped symbols) for installers. - Cargo.lock, rust-toolchain.toml and .rustfmt.toml move to the root. The rustfmt config has to move with the code because rustfmt looks it up from each file's directory upward. bmm-core - media_metadata, config, constants, mkvtoolnix and protocol move over; the parser files, config.rs and constants.rs are byte-identical, and the fixture tests move to crates/bmm-core/tests with only their use lines changed. - services (formerly controller.rs): every function is synchronous; the Tauri-only wrappers stay in the shell, which also keeps the spawn_blocking around metadata parsing. - update (new): GitHub release check, startup interval policy, skip version and version comparison, with unit tests. The shell passes in the application version. - merge: a MergeQueue with an injectable process launcher and a MergeEvent sink (Started, Progress when the percentage changes, Finished). Every enqueued file gets exactly one Finished, including a file cancelled while still waiting and a worker that panics; a cancel that arrives while mkvmerge is being launched now kills it once it is registered. Tested with fake processes: 13 tests, plus one Windows-only test for parallel drives. - No Tauri, gpui or tokio dependency. Tauri shell - The 22 commands call into bmm-core with unchanged wire types. The merge sink re-emits Finished as merge-finished; a cancelled waiting item now reaches the same Cancelled state through that event instead of the next status poll. - specta, specta-serde and specta-typescript become dev-dependencies (only the protocol test uses them), which clears the unused_dependencies warning reported by Rust 1.100.0. - src/protocol.generated.ts: only the header comment changes (new paths, --release, run from the repository root); the test passed against the old file before the header was updated. CI - setup-rust-toolchain no longer gets `toolchain: stable`. With it the action runs `rustup override set stable` on the repository root, and that override outranks the pinned toolchain file now that the file lives there. - Tests run `cargo test --release --workspace` from the root; the Linux coverage gate is `cargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90`, with no file-name exclusions; bundles are uploaded from the workspace target/ directory. Other - .gitignore ignores /target; the Vite watcher also ignores crates/ and target/; change-version.ts bumps crates/bmm-core/Cargo.toml as well. - The root agent guide, docs/development.md and docs/parsers point at the new paths and describe the merge event flow. Verification: cargo build and cargo test --release --workspace --locked pass (2050 tests: 2028 existing, 22 new); bmm-core line coverage is 93.28 % against the 90 % gate; cargo fmt and the new code's clippy output are clean.
…platform prototypes
Phase 2 of the gpui-kit migration: the spike that proves the packaging
pipeline and prototypes the pieces gpui-kit has no ready-made component
for, before any screen is ported.
Tauri re-plan
- The Tauri app is no longer built, run or tested. src/ and src-tauri/
stay in the tree as unbuilt porting reference until they are deleted;
src-tauri is excluded from the workspace, so `cargo test --workspace`
no longer compiles Tauri and the TypeScript drift test stops running
(src/protocol.generated.ts is frozen).
- The unused specta-serde workspace pin is dropped (only src-tauri used
it). Cargo.lock loses the Tauri-only crates and gains the GPUI graph;
bmm-core's versions do not move.
crates/bmm-app (package BatchMkvMerge)
- Library `batch_mkvmerge` plus a three-line binary
(`#![windows_subsystem = "windows"]` unconditionally: release-only).
- gpui-kit pinned to =0.9.1 (gpui-pre 0.3.12). One window titled
"BatchMkvMerge v0.2.0", centred 1024x768, minimum 600x450, Wayland app
id = desktop id `BatchMkvMerge`; app identity
com.caoccao.batch-mkvmerge; activates on launch (GPUI delivers focus
events only to the active window); quits when the last window closes;
macOS app menu with Quit / Cmd+Q.
- assets.rs: the app icon plus the 18 Lucide icons the UI needs that are
outside gpui-kit's 106-icon default bundle (icon_assets!), composed
over the default bundle.
- build.rs embeds the exe icon with winresource (icon only: GPUI already
embeds its own application manifest).
- gpui-kit's test-support feature is a dev-dependency only. Because Cargo
resolves weak `dep?/feature` entries into the lockfile, Cargo.lock now
also lists the gpui-fast crates; they are never compiled.
crates/bmm-platform
- TaskbarProgress::{new(&impl HasWindowHandle, desktop_id),
set(Option<u8>)}: Dock tile content view with an NSProgressIndicator
on macOS, ITaskbarList3 on the window's HWND on Windows, the
com.canonical.Unity.LauncherEntry.Update D-Bus signal from a dedicated
thread (blocking zbus, no tokio) on Linux. Repeated values are
dropped; the bar is hidden on drop.
Prototypes (crates/bmm-app/examples/spike, `--example spike`, tests run
in `cargo test --workspace`)
- Taskbar/Dock progress through bmm-platform.
- Topmost completion window: a PopUp-kind GPUI window, 440x200,
undecorated, centred on the main window's display work area, reused
for the next completion, Esc or Close removes it.
- Free-text language autocomplete: Input + deferred(anchored()) list
with a uniform_list; preferred languages first with a divider, the
first match highlighted and scrolled to the middle, opens below unless
there is more room above (placement recomputed from the measured cell
bounds), select-all on focus, Enter normalises an alias to its short
code and otherwise keeps free text.
- Drag-reorder of rows in a scrolling table with an own pointer state
machine: GPUI's on_drag starts after a hard-coded 2 px and drops the
click, while the React table activates at 5 px. A press within 5 px is
a click that toggles the row selection; mouse-down on a checkbox or
button never starts a drag. Drop indicator, ghost, edge auto-scroll.
- A closable tab built with Tab::suffix.
- 19 tests: 10 unit tests and 9 headless UI tests through
gpui_kit::test (drag past and within the activation distance, controls
never dragging, Enter normalisation, free text, match highlight, list
flipping above bottom cells, option click, tab close without
selection, left-neighbour selection).
- Unattended modes: BMM_SPIKE_CHECK (macOS runtime checks of the Dock
tile and the topmost window), BMM_SPIKE_CAPTURE (render every tab to
PNG with Window::render_to_image), BMM_SPIKE_EXIT_AFTER_FIRST_FRAME.
Installers
- [package.metadata.packager] and [package.metadata.generate-rpm] with
every identity of the published 0.1.0 Tauri installers (0.2.0 was
never released): deb and rpm package batch-mkv-merge, bundle id,
BatchMkvMerge.app, NSIS per-user install, publisher caoccao (0.1.0's
HKCU\Software\caoccao\BatchMkvMerge key), BatchMkvMerge.desktop.
- cargo-packager 0.11.8 derives the MSI UpgradeCode from
"BatchMkvMerge.app.x64" while 0.1.0 used "BatchMkvMerge.exe.app.x64",
and has no option to set it. packaging/wix/main.wxs is its template
with 0.1.0's UpgradeCode {7FB79BE4-981D-54D5-9F1F-83C3507EF0AA}
pinned, so the MSI upgrades instead of installing beside 0.1.0.
- NSIS takes `installMode`; cargo-packager rejects `install-mode`.
- One MSI per language, like 0.1.0.
CI
- The three workflows build the gpui-kit app; every Node, pnpm and Tauri
step is gone and there is no temporary fourth workflow. Common steps:
pinned toolchain, `cargo test --release --workspace --locked`,
`cargo build --profile dist -p BatchMkvMerge --locked`, cargo-packager
(and cargo-generate-rpm on Linux) installed with taiki-e/install-action,
uploads from target/packager and target/generate-rpm under the
original artifact names.
- Linux runs on ubuntu-22.04 (low glibc floor) with GPUI's build
packages, Mesa's Vulkan drivers and the AppImage tools, and keeps the
bmm-core coverage gate; macOS packages app,dmg on both runners;
Windows packages nsis,wix.
Docs and scripts
- The root agent guide and docs/development.md describe the unbuilt
reference, the three workspace members, cargo-only commands and the new
CI; the guide gains a "gpui-kit app" section with what this phase
found (icon enums, test-module `test` macro clash, focus events in
tests, absolute elements needing insets, the drag threshold,
`secondary-` keystrokes, packaging identities).
- change-version.ts also bumps crates/bmm-app and crates/bmm-platform;
the docs add `cargo update -w` after a bump.
Verification (macOS arm64 only; Windows and Linux follow on CI and
real machines)
- cargo build --release --workspace --locked: pass.
- cargo test --release --workspace --locked: 2062 passed, 0 failed
(bmm-core's 2043 unchanged, 19 new).
- Coverage gate: bmm-core 93.28 % lines.
- Clippy clean for the new crates; bmm-platform also checked for
x86_64-pc-windows-msvc and x86_64-unknown-linux-gnu.
- cargo packager --profile dist -f app,dmg parses the whole config and
builds the .app and a 6.4 MB .dmg; the packaged app launches with the
0.1.0 bundle identity. cargo generate-rpm --profile dist finds the
dist binary and writes Name batch-mkv-merge.
- Runtime checks: the Dock tile content view is set and cleared; the
PopUp window sits at level 101, is the key window, stays visible
while another application is active, is reused, and closes on Esc.
- Measured: cold release build 1 min 02 s, one-line incremental rebuild
about 1 s, clean dist build 1 min 24 s, dist binary 13.4 MB, first
frame about 175 ms after start.
Pending before the go/no-go decision: the first run of the rewritten
workflows (ubuntu-22.04 support, linking GPUI's manifest resource with
the icon resource), installer install/upgrade/uninstall tests on
Windows, Ubuntu and Fedora, and the taskbar progress, topmost window and
system notifications on Windows and Linux.
…tests
Phase 3 of the gpui-kit migration: the logic of the React app's
TypeScript modules, ported to Rust with tests and no UI yet.
crates/bmm-core (UI-free)
- media_track (media-metadata.ts): the selection table's rows from a
parsed file. One row per track, a synthetic chapters row and one row per
attachment, with descriptions, language pick and aliases, statistics
tags, and per-type counts. It lives in bmm-core rather than in the app
because merge_args needs the row type.
- merge_args (merge.ts): the mkvmerge command line for one file and for
multi-input merge trees, which covers the per-file option blocks, flags
written only when set, the type-major default --track-order and an
explicit cross-file order. Also the copyable shell command, the
profile's track auto-selection and the path helpers.
- languages: the 186-entry MKV language list, generated once into
languages/table.rs from mkvLanguages.ts. Alias, short-code and
MKV-code lookups, labels, the autocomplete option lists (preferred
first), track-name presets and the highlight index.
- js: the JavaScript rules the ported logic keeps.
- Number(string) parsing and the \s class.
- toFixed rounding: JavaScript rounds exact ties up where Rust rounds
to even (1.125 -> "1.13").
- UTF-16 string order and length.
- merge::get_drive_key is public, so the app groups queue rows by the
backend's own per-drive key.
crates/bmm-app domain (no GPUI)
- file_tree (file-tree.ts): merge trees under the shortest stem, the
combined table with default and custom order, row keys, manual merges
(chains, cycles, dangling targets), detaches, the card units, and the
default/forced flag automation, which returns its edits.
- grouping: the group-card key and entries of FileList.tsx.
- format (format.ts and formatHMS): size, bit-rate and HH:MM:SS labels.
- status: queue item states driven by the ordered MergeEvents, with no
snapshot fallback.
- Started makes an item Merging; on a finished item it begins a new run.
- Progress on a finished item is ignored.
- Finished always sets the outcome.
- The elapsed and ETA rules of the queue table and the cards.
- metadata_error (metadataError.ts): parse-failure kind to i18n key and
named arguments.
- word_navigation (input-word-navigation.ts): the extra Ctrl/Option+Arrow
stops inside numbers on UAX #29 words (unicode-segmentation), with UTF-8
byte offsets, plus the selection update. The input wiring is Phase 11.
Tests
- 72 new tests, including every case of
tests/input-word-navigation.test.mjs one for one (their UTF-16
offsets are converted by a helper).
- Golden test crates/bmm-core/tests/merge_args_golden.rs.
- Inputs: synthetic files in tests/golden/fixtures.rs (a Matroska movie
with every row type, an Opus .mka and an SRT) are parsed for real.
- Four cases: profile auto-selection; edited languages, names and flags
in a dragged order with quoting; a four-member tree in the default
order; and an explicit cross-file order.
- Each case checks every row field, the arguments and the command.
The expected values were produced by the React app's own
metadataToMediaTracks and buildMergeArgs(Multi) on this parser's
output, then reviewed.
- The spike's language table now wraps bmm_core::languages, so nothing in
the workspace reads src/ any more.
Exported TypeScript functions and their Rust counterparts
- merge.ts:
- trackKey -> MediaTrack::key
- makeTrackSelector -> TrackSelector
- getParentDir / getFileName -> parent_dir / file_name
- getDriveKey: not needed, because bmm_core::merge::get_drive_key is
the key the per-drive queue uses
- resolveOutputDir, MergeInput, OrderedTrackRef -> same names
- buildMergeArgs(Multi), buildCommandString(Multi) -> same names,
without the unused profile parameter
- formatHMS -> format::format_hms, taking Option<Duration>
- media-metadata.ts:
- languageCodeAliases -> languages::language_code_aliases
- the MediaTrackType union -> MediaTrackKind
- TRACK_TYPE_ORDER / trackTypeRank -> MediaTrackType::rank
- metadataToMediaTracks, MediaTrackCounts, mediaTrackCounts -> same
names
- file-tree.ts:
- all exports keep their names
- rowKeyOf / combinedTrackId -> methods on CombinedTrack (the id
keeps the NUL separator)
- parseRowKey -> returns an Option
- applyUnitFlagAutomation -> returns FlagEdits instead of calling
setTrackFlag
- format.ts: same names.
- metadataError.ts: formatMetadataError -> metadata_error_message, which
returns the key and arguments. The String(err) fallback is not needed,
because the error is typed.
- input-word-navigation.ts: numericWordBoundary -> numeric_word_boundary.
handleInputWordNavigation -> navigate, the selection update only; key
filtering belongs to the GPUI wiring.
- mkvLanguages.ts and the TrackCellAutocomplete.tsx helpers: same names;
toShortCode, toMkvCode and firstMatching*OptionIndex are now public.
Dependencies and docs
- bmm-app now depends on bmm-core and unicode-segmentation (already in
the lockfile).
- The root agent guide and docs/development.md describe the new
modules, the golden test and the NUL separator.
gpui-kit stays at =0.9.1, still the newest release.
…welcome and about
Phase 4 of the gpui-kit migration: the application shell that replaces
Layout.tsx, Toolbar.tsx, MainContent.tsx, Welcome.tsx, About.tsx, Footer.tsx,
the toast and the window handling of the Tauri shell.
Bootstrap (lib.rs::run)
- Reads the config before the event loop, registers the app's locale files
for gpui-kit's own strings (rust_i18n::extend!) before gpui_kit::init,
sets the locale and the theme, creates the stores, binds the shortcuts,
installs the macOS menus, opens the main window, routes Quit through the
close request, adds the files named on the command line and quits when the
last window closes.
State (state/)
- Stores { config, files, ui }, handed to every view.
- ConfigStore: edits apply at once and are written in the background with a
revision; writes run one at a time and a revision older than the last one
written is dropped, so out-of-order writes never put an older config on
disk (the optimistic-update rule); a pending write is flushed on quit.
- FileStore: the file list (order kept, duplicates skipped), clear, the
session-only global output directory, and add_paths, which resolves
dropped, chosen or launch paths with services::get_media_files on the
background executor.
- UiState: open tabs, selection, Settings/About open and close (closing the
active tab selects its left neighbour), Ctrl+Tab / Ctrl+digit helpers, and
toasts as an event. Stores::has_active_merges is false until the queue.
Window (platform/)
- The main window opens at the saved position when it is on a connected
display, otherwise centred, at the saved size (minimum 600x450), titled
"BatchMkvMerge v<version>". The geometry is saved 500 ms after the last
move or resize, on close and on Quit; a maximized or fullscreen window is
not saved, so its restore geometry survives.
- GPUI's macOS window opens with a content size but reports its frame, title
bar included; saving that would grow the window on every start. The saved
size is the viewport (the content), with the frame origin, which is what
the 0.2.0 config stored.
- Close guard: with active merges, closing or quitting opens the Exit dialog
(No keeps the window, Yes runs the cancel hook and closes); a second
request does not stack another dialog.
- macOS menus: application menu with Quit (Cmd+Q) and an Edit menu of the
system edit actions on gpui-kit's input actions. Add Files / Add Folder
dialogs filter the chosen paths like a drop.
i18n and theme
- locales/: the nine React locale files converted once to rust-i18n
(same nested keys, %{name} placeholders, 188 keys each); a test checks
that every locale has the en-US keys and placeholders. i18n::set_language
maps the configured language to its locale; tr! wraps t! as a
SharedString. A language change in the config applies at once.
- themes/ocean.json: "Ocean Light" and "Ocean Dark" with MUI's primary
colours (hover/active = primary.dark, white foreground), ring and link;
base font size 14 (MUI's fontSize 12 gives 13.7 px body text). accent is
left at gpui-kit's default: the React app never used the secondary colour,
and accent is gpui-kit's menu hover. Auto follows the window appearance.
The other themes map to Ocean until their sets are added.
Views (ui/)
- root (window content, OS file drop anywhere, toasts at the top centre with
5 s auto-hide, language/theme changes, geometry save, close request),
toolbar, tabs with closable Settings and About, file list (Welcome while
empty, one row per file otherwise), Welcome (the React page's fixed blues,
headline in the theme's primary colour; linear instead of radial
gradients), About, footer; Queue and Settings show a placeholder.
- Toolbar: Settings, About, Clear and Group by file name work; Merge All,
Cancel All, the global output path and the group-mode and profile menus
show their icons, tooltips and enabled states and are wired in later
phases. Icon-only buttons carry their tooltip as the accessible name.
- Shortcuts: Ctrl+Tab, Ctrl+Shift+Tab, Ctrl+1..9, Ctrl+W, F10 and Ctrl+Q,
global so they work without focus; Ctrl on every OS, as before.
Rust semantics instead of JavaScript emulation
- The app is a pure Rust application, so bmm_core::js is removed and the
ported logic follows Rust: size and bit-rate labels use format! (exact ties
round to even: 1152 B is 1.12KB), stems, paths and language signatures use
str ordering and byte length, whitespace is char::is_whitespace (word
navigation, command quoting), statistics tags parse with str::parse::<f64>
after trim (a blank tag gives no value). -0 is no longer printed as 0.
- Tests follow: tie expectations, stem order by code point, word navigation
cases in byte offsets, and the golden test compares sizes and bit rates as
f64 instead of re-encoding them as JSON.stringify did (expected files
unchanged).
Other
- bmm-core: DisplayMode, Theme and Language derive Copy, PartialEq, Eq.
- Dependencies: rust-i18n 4.2 (already in the lockfile through gpui-kit),
serde_json as a dev-dependency. Assets: the Welcome page's sibling-app
logos.
- Tests: 33 new (i18n, theme, stores, window geometry, 10 headless shell
smoke tests); shell tests hold a locale lock because the locale is
process-wide. 2 162 tests in total, bmm-core line coverage 93.44 %.
- Docs: the root agent guide (locale files, shell structure, window geometry
and test notes, Rust semantics) and docs/development.md.
Verified on macOS arm64 with a config written by the 0.2.0 Tauri app: the
window opens at the saved geometry, a move and resize is restored exactly
after Cmd+Q and restart, the config file is byte-identical after a start
and quit, a folder given on the command line is listed, and a German config
gives a German UI.
…ent bridge
Phase 5 of the gpui-kit migration: the state behind the file list and the
merge queue that replaces the Zustand store's file and queue fields,
useFilesLoad.ts, mergeActions.ts and the merge-finished event plus the
200 ms status poll of the React app.
Stores and services (state/)
- Stores { config, files, queue, ui, merges }. Stores::new takes Services:
the config persistence, a MetadataSource (the native parser in the app)
and a MergeBackend (the process-wide mkvmerge queue in the app), so tests
pass fixtures and recorders.
- A store notifies observers only on structural changes (files or queue
items added or removed, a status, a unit or group formed or split, a file
parsed or failed, the first selection made or the last cleared). Every
change is also emitted as FileEvent::Changed / QueueEvent::ItemChanged
naming the files, so a card can repaint alone later.
- config::active_profile (getActiveProfile).
FileStore (state/files/)
- Every store.ts action of its fields: add, remove (also manual merges
naming the file on either side), clear (the global output directory
stays), merge a card into another, detach, drop target, active card,
metadata (rows and counts), selection, default/forced flags, row reorder,
combined track order, language (with its alias codes), track name,
per-file automation, output path and directory overrides, the global
output directory, BetterMediaInfo availability. setFileTrackCounts is not
ported: React never called it.
- After every change it derives the card units (build_merge_units) and the
file list's entries (build_render_entries), follows the config (group
mode, group by file name, active profile, parser options) and exposes the
load state per file and per unit (loading wins over an error, as the
table showed it).
- load.rs (useFilesLoad.ts): every listed file that is not parsed, in
flight or failed is parsed once on the background executor; a result for
a file removed meanwhile is dropped; parse errors are kept and translated
when shown. Once a unit is completely parsed its automation runs in the
React order: und language reset, preset track name, the profile's
prospective selection, default/forced flags scoped to it, then the
selection is committed. It runs once per unit membership, again only after
a drag-merge, detach or regrouping; React tracked this per card instance,
so a unit moving into or out of a group card lost its flag edits.
QueueStore (state/queue.rs)
- add_to_queue, remove_from_queue, mark_cancel_requested,
clear_completed_in_drive, clear, and apply_event, which replaces
recordFinishedOutcome and the snapshot fallback with the core's ordered
events (a late progress event never overwrites a finished item). A
summary (done, total, active, overall percent) and a one-second tick that
runs only while a merge does.
Merge events and actions
- merge_events.rs: the core's worker threads send MergeEvents into an
async-channel; one foreground task applies them to the queue in order.
MergeBackend::system installs the sink and calls merge::enqueue / cancel.
A finished merge shows the toast: success with the elapsed time, failure
with the error, none when cancelled.
- actions.rs (mergeActions.ts): OutputTarget and resolve_merge_output_for;
MergeRequest::file / unit / unit_selection (enqueueSelectedTracksForFile,
...ForUnit, enqueueUnitSelection, with the unit's combined order); enqueue
reads requests on the foreground, resolves output paths and arguments on
the background executor and enqueues them in order, skipping a root that
is waiting or merging; merge_all, cancel_merge(s), cancel_all, can_clear,
clear_files (files and queue), remove_file (file and its queue item).
- async-channel 2 (already in the lockfile through GPUI) and anyhow.
UI
- Toolbar Merge All (enabled when any file has selected tracks) and Cancel
All (while a merge waits or runs) work, and so do F3 and F4.
- The plain file rows show a spinner while parsing, the track counts with
the card summary's emoji, or the parse error, and the queue status with
the percentage while merging. The window title reads
"BatchMkvMerge v<version> - done/total" while a merge is active.
- The close guard's Yes cancels every waiting or running merge.
Fixes to the application shell
- Cmd+Q quit without asking while merges ran: a key press is dispatched
while its window is being updated, so the Quit handler's update of that
window failed and read as "window gone". The close request is now
deferred until the dispatch is over.
- Enter in the exit dialog answered Yes (cancel everything and quit), since
gpui-kit binds Enter to a dialog's OK button. The dialog has its own No
and Yes buttons now; Enter and Escape answer No, as in the React dialog,
whose No button had the focus.
Tests and docs
- 43 new tests: the queue store, every file store action, the loading
pipeline (200 real subtitle files parsed once each, automation once per
unit), merge requests and output paths, Merge All through the core's real
queue with a fake mkvmerge, and shell tests for Merge All, the title,
toasts, F3/F4, the exit dialog keys and Cmd+Q during a merge. 2 205 tests
in total; bmm-core line coverage 93.44 % (no core code changed).
- The root agent guide (state, events and actions; the deferred update,
dialog Enter and test scheduler findings) and docs/development.md.
Verified on macOS arm64 with MKVToolNix and generated 1.9 GB MKV files:
F3 merged both into "<name> (1).mkv" next to the inputs, the title went
" - 0/2", " - 1/2", then back to the plain title; Cmd+Q during a merge
opened the exit dialog, Escape kept both merges running to completion, and
Yes killed the running mkvmerge, closed the app and left no process behind.
…d drag reorder Port TrackSelectionTable.tsx, TrackCellAutocomplete.tsx and useCardRowSelection.ts to gpui-kit. Until the cards arrive, the File List shows one box per card: a one-line header (the root path, the unit's member count, or a group's directory and unit count, with the queue statuses) and the card's track table. Store (state/files/table.rs): - TableScope: the units a table shows and edits. A single card shows its unit; a group card shows its first unit, and every edit fans out to the same member position of each unit. Its id is the first root. Rows follow the custom combined order of a single card's multi-member unit; member ids are qualified (`1:0`) when a unit has several members; a group of multi-member units cannot reorder. - FileStore edits, one refresh each: set_all_rows_checked (toggleAll), set_rows_checked (toggleOne), flip_rows_checked (Space), set_rows_language, set_rows_name, cycle_rows_flag (the clicked row's nextTrackFlag set on every target row), reset_rows_flags (the header automation, unit by unit), reorder_rows (a single-member unit's file order, in lock-step for every root of a group; a multi-member unit's combined order). - domain::file_tree::next_track_flag and domain::format::track_type_emoji. Table (ui/track_table/mod.rs): - Built on gpui-base's interactive table primitives, because the rows of gpui-kit's composable Table take no ids or mouse handlers. - The React columns. Checkbox, ID, Type, Size, Bit Rate and the two flags have fixed widths; Codec, Description, Language and Track Name share the rest. Below 880 px the table scrolls sideways, with a scrollbar. - row_texts gives each cell's text: the ID, the type emoji with the type as its tooltip, the localised "Chapters" and entry count, and the size and bit rate with the configured precision and unit. - Select-all is gpui-base's tri-state checkbox, indeterminate when some rows are ticked and reported as mixed to screen readers; gpui-kit's checkbox has no indeterminate state. - The default and forced buttons cycle true, false, unspecified. The header buttons run the reset automation. - Loading spinner, the translated parse error, "No tracks found.". - Everything is disabled while one of the card's roots waits or merges. - An edit of a selected row applies to every selected row. - A click on a row toggles its selection and moves the keyboard cursor there (dashed outline). A press moved more than 5 px drags the row, with an insertion line, a dimmed source row, a ghost label and auto-scroll at the list's edges. This is the Phase 2 pointer state machine; controls in a row never start a drag. Element-level mouse-up listeners end a press released before the next frame, because GPUI does not draw before dispatching a mouse event. Cells (ui/track_table/autocomplete.rs, from the Phase 2 prototype): - Options: the language cell lists the profile's preferred languages, a divider, then every language; the name cell lists the presets of the row's language. - The first match is highlighted and centred. The keyboard option starts on the option equal to the text, and Up/Down move it with wrap-around. - Enter takes an alias's short code first (`ger` becomes `de`), then the keyboard option, else the typed text. Escape closes the list, and a click on an option takes it. - A click opens the list and selects the text; typing and Up/Down also open it. - The list opens below the cell unless there is more room above, and is as wide as its widest label, between 280 px and the window less 32 px. - Every keystroke edits the rows. A focused cell is never overwritten from the store, because its own edits arrive only after the keystroke's effects run. File list (ui/file_list.rs): - Tables are kept by their card's first root, so typing that changes a group key keeps the views. A click in a box makes it the active card, with a primary border. - Up/Down, Space, Ctrl/Cmd+A and Ctrl/Cmd+Shift+A act on the active card's table through a keystroke interceptor. A plain key binding would beat text input and a focused button's own Space. - The interceptor acts only on the File List tab, never while a text field has the focus or another binding claims the key, and takes Space only when nothing or that table has the focus. - The list has a vertical scrollbar. Both scroll containers keep to their own axis, so a vertical wheel over a narrow table does not slide it sideways. Other: - merge.header.selectAll and merge.header.tracks in all nine locales, as accessibility labels. - Test hooks: AppView::main and MainContent::file_list. - The shell test helper is shared with the table tests and takes a config. Tests: 28 new (8 for the table edits, 14 headless table tests, 3 for the cells, 1 for the table keys, 2 for the ported helpers); 2233 in total. The table tests parse the golden fixtures of merge_args_golden.rs, a Matroska movie with every row type plus an `.mka` and an `.srt`, and check every cell text the ported rules produce. Docs: the root agent guide (track table, GPUI findings) and docs/development.md (layout).
Phase 7 of the gpui-kit migration: the file list shows the merge cards of the React app instead of the Phase 6 boxes. File cards (ui/cards/file_card.rs, MkvFileCard.tsx): - status icon (spinner, clock, check, alert), the root path, and the child-count badge of a multi-member unit, whose popover lists the other members (ID, middle-truncated path, remove from the merge; five rows, then it scrolls; it closes with the last child) - the summary: track counts with their emoji, the output override, the file size, the encoded date in local time (2026-05-24 09:00:00) and the container title - Set Output Path, Open in BetterMediaInfo (when detected), Copy Command, Merge, Delete and the drag handle; while a merge waits or runs a progress row with a bar, elapsed / ETA and Cancel, and the track table is disabled - the queued highlight, the drop-target highlight (dashed outline) and the active-card border Group cards (ui/cards/group_card.rs, GroupCard.tsx): - the directory, the summary of the representative unit and the shared output directory; output directory, Open in BetterMediaInfo for every root, Copy All Commands, Merge All and Clear All - the roots with status, progress, percentage, Cancel and elapsed / ETA on the left of a 6 px splitter (240 px at first, at least 160 px, at least 240 px left for the table), the representative table on the right Repaints: every card is an entity that notifies itself for its own files and queue items, and the file list draws it as a cached view at the height it measured in its last render, because GPUI lays a cached view out from a style, not from its content. A progress event or the one-second tick re-renders only the merging card. File list (ui/file_list.rs): cards and track tables are kept by the card's first root; a card that changes kind is made again around the same table. A card dragged by its handle (GPUI drag with a chip showing the file name) is hit-tested against the cards' bounds: another file card is the drop target (copy cursor), a group card or the card itself refuses it, and the drop merges the dragged unit into the target. Files dragged in from the system outline the list. Output path dialog (ui/output_dialog.rs, OutputPathDialog.tsx): a path field with a clear button and Browse (a folder picker, or a save dialog for a card's full output path), a warning 300 ms after the last edit when the directory does not exist, and a writable check on OK; an empty field clears the override; Enter confirms, Escape cancels. The toolbar's global output path uses it in directory mode. Actions (actions.rs): group-unit merge requests, the copyable command with the output Merge writes (also for the dialog's default path; the React card ignored a leftover directory override there), copying commands to the clipboard with a bottom-centre message, Delete (a waiting merge is cancelled first), Clear All, opening files in BetterMediaInfo, and BetterMediaInfo detection at startup and whenever its configured path changes. bmm-core gains services::launch_better_media_info_from, so the launch uses the directory detection found. Stores: FileStore keeps the detected BetterMediaInfo directory; UiState::show_snackbar shows a card's message at the bottom of the window. domain::format::format_encoded_date shows a mux date in local time (chrono, already in the dependency graph through gpui). Fixed on the way: Enter in the output dialog went to gpui-kit's Confirm action and closed it without saving; disabled card buttons kept their icon colours. Tests: 23 new (cards 20, output dialog 2, encoded date 1, bmm-core launcher 1; the Phase 6 box-title test removed), 2256 in total. They cover group cards under each group mode, drag-merge and detach, a group card refusing a drop, only the merging card re-rendering, merge, cancel, delete, copy, the dialog, the splitter and BetterMediaInfo detection. Copy Command reproduces the Phase 3 golden single-file command byte for byte; a merge tree is checked against the same inputs in the unit's member order. bmm-core line coverage 93.46 %. Checked offscreen on macOS with 31 generated files in two folders and real mkvmerge merges: grouping, summaries, the child list, a drag in flight, the dialog, progress and Cancel through the real queue, light, dark and 600x450; idle frames re-render no card, and a running merge re-renders only its own card. Docs: the root agent guide (cards, cached views, GPUI findings) and docs/development.md.
…d taskbar progress Phase 8 of the gpui-kit migration: the Queue tab of the React app, the OS and topmost completion notifications, and the taskbar, Dock or launcher progress. Queue tab (ui/queue/, Queue.tsx): - one card per drive key, in the order of its first file, titled with the drive (C:, \\SERVER\SHARE; "Queue" for the single drive on macOS and Linux and for the empty card, which always shows) - System Notification and Topmost Notification toggles (session-only, off at every start, as in React), Resume All, Cancel All and Clear Completed for the drive - File Path, Status (with the percentage while merging, coloured by status, the mkvmerge error as a tooltip when failed), Start and End as local HH:MM:SS, Elapsed, ETA, and Cancel on the merging row - every row is an entity drawn as a cached view at its measured height, so a progress event or the one-second tick re-renders the merging row only; below 200 px for File Path the table scrolls sideways - Resume All merges every cancelled or failed root of the drive again as its card unit with the current selection; a file no longer listed is skipped Notifications (notifications.rs): the in-app toast stays per finished file. The OS notification and the topmost window are sent once per batch instead of once per completed file (a fix over the React app): the queue store tracks a batch from the moment an item waits or merges until none does and emits QueueEvent::Drained once. A batch notifies only when one of its merges completed or failed, and never while the window closes (the exit dialog's Yes marks it closing before it cancels). One completed file keeps the React text (the file, "Completed in ..."); any other batch shows "3 completed, 1 failed, 1 cancelled" and "Finished in ..." from its first start to its last end. Two new strings in all nine locales. Topmost window (ui/topmost.rs, TopmostNotification.tsx): a 440x200 undecorated PopUp window centred on the work area of the main window's display, with a check or, when a merge failed, an alert icon, the title, the file or counts, the detail and Close; Escape and Enter close it; a later completion reuses the open window. On Wayland it opens as an overlay layer-shell surface and falls back to PopUp where the compositor has no layer-shell. The app now quits when its main window closes, even with the topmost window open. Taskbar progress (platform/taskbar.rs): a Taskbar service in Services and Stores, bmm-platform's TaskbarProgress in the app and a recorder in tests; the main view shows the whole queue's progress while a merge waits or runs and hides it otherwise. bmm-platform becomes a regular dependency of the app (no lockfile change). Tests: 21 new (queue tab 10, queue store 5, notifications 3, UI state 1, taskbar 1, clock format 1), 2277 in total. They cover one card per drive, every status with its label and times, Resume All, Cancel All and Clear Completed, the empty card, three queued merges sending one OS notification and opening the topmost window once after the third finishes and none before, a reused and a reopened topmost window, no notification with the toggles off, for a cancelled batch or while closing, the taskbar values, and only the merging row repainting. The test shell sets the app identity, without which the test platform records no system notification. Also fixed: two output-dialog tests of the previous phase pressed cmd-a to select the field, which selects nothing on Linux and Windows, where CI failed; they use the platform's Select All now. Checked on macOS with real mkvmerge merges of five files (three slow ones, one failing, one cancelled while waiting) in a live window: the title count, the Dock progress appearing and clearing, only the merging row re-rendering, one topmost window after the last merge at level 101 staying above another active application, Escape closing it, a fresh window for the next one-file batch; offscreen renders in light, dark and at 600x450. Docs: the root agent guide (Queue and notifications) and docs/development.md.
…rtcuts Phase 9 of the gpui-kit migration: the Settings tab of the React app, the profile editors, the toolbar's group-mode and profile menus with F8 and F9, and the update banner. Settings tab (ui/settings/, Settings.tsx): built on gpui-kit's own Settings component (a searchable, resizable sidebar of pages) instead of a port of the MUI vertical tabs. Six pages in React's order: Appearance (mode toggle, theme, language), Formatting (bit rate and size precision and unit per stream kind), Group (group mode, group by file name), Integration, Profiles and Update (check interval). React's inner tabs are titled groups listed under their page in the sidebar. Every page but Profiles has gpui-kit's Reset All back to Config::default(); Profiles keeps React's Reset of the active profile. Every control writes the same config field as its React control, at once. The view is made when the tab opens and dropped when it closes; while another tab shows it is laid out hidden under the same element path, because gpui-kit keeps the selected page and the search in state that lives only while rendered under the same id. Profiles (profiles.rs): the active profile select; a new-name field with Add, Delete (disabled for Default) and Reset, Delete and Reset asking first (Yes / No, Enter and Escape answer No); Track Selection (the auto-select boxes and language filters); Languages; Track Names; Automation, whose und language is a searchable select (preferred languages first, a divider, then the rest). ConfigStore gains the React store's profile edits (add, delete, switch, reset, update the active profile); bmm-core gains ConfigProfile::named (createDefaultProfile). Four new strings in all nine locales. Language picker (language_picker.rs, LanguagePicker.tsx): filter, Add All, Remove All, the Available and Preferred panes with tri-state header boxes; a row, or every checked row of its pane, is dragged with the mouse (a chip with +N) between the panes and within Preferred, with a 2 px line at the insert position; the drops follow handleDragEnd and are tested as pure functions. dnd-kit's keyboard drag is not ported. Track names (track_names.rs): a filterable language list (preferred first; languages with names in the success colour; Up and Down move through it) and a text area of the chosen language's names; an empty text removes the language. Integration (integration.rs, tools.rs): each tool path row checks the text 250 ms after the last edit, stores it when the field loses the focus, Browse picks a folder, Detect also looks for a running application, and a tool found elsewhere fills in that path. Detection is a ToolDetector service in Services and Stores (a stand-in in tests); bmm-core gains mkvtoolnix::detect_mkvtoolnix, which never writes the config file itself. The cards' BetterMediaInfo detection uses the same service. Toolbar (toolbar.rs, Toolbar.tsx): the group-mode and profile buttons open gpui-kit popup menus with the current choice checked; the open menu lives in UiState, so F8 and F9 open them too, one at a time. Update banner (updates.rs, ui/update_banner.rs, UpdateBanner.tsx): at startup the last answer is reused or GitHub is asked on the background executor, as before; the time and version of a check are now recorded through the config store (bmm-core update::record_check), so a later settings edit no longer writes an older update block over them. The banner above the toolbar links to the releases page and offers "Skip this version". Also: the track table's tri-state checkbox is shared (ui/checkbox.rs); PartialEq on the config's format, group-mode and interval enums. Tests: 33 new, 2310 in total. They cover every page and group mounting, every control's config field (the serialised config compared before and after each interaction and against the newest write), Reset All, the profile edits with their questions, the language picker's drags, Add All and Remove All, the track names, the tool path rows with a stand-in detector, the menus by click, F8 and F9, the banner and Skip this version, a failed check, the settings keeping their page while hidden, 50 keystrokes with every write still pending never reverting, and a config with every field set round-tripping through bmm_core::config. bmm-core line coverage 93.57 %. Checked on macOS in a live window with a scratch config: F3 started a real mkvmerge merge, Ctrl+Q was refused while it ran, F4 cancelled it, Ctrl+Q cleared the list; F8, F9 and F10; the banner from a cached newer version; the real detection of MKVToolNix, a path found elsewhere, and Browse opening the native panel; offscreen renders of every page in light, dark and at 600x450. Docs: the root agent guide (Settings and menus) and docs/development.md.
Phase 10 of the gpui-kit migration: every colour theme of the React app in light and dark, gpui-kit's own strings in all nine locales, the Linux emoji font, a visual pass of every locale at the 600x450 minimum window size, and regenerated screenshots. Themes (theme.rs, themes/*.json): theme::THEMES lists the twenty config themes with the React palette's main colours (App.tsx getPaletteByTheme) and their embedded theme sets; no theme falls back to Ocean any more and the Settings theme select reads the same table. Each set has a light and a dark variant setting the primary, ring and link tokens by MUI's rules: hover and active are primary.dark (the main colour x 0.7), the dark link hover is primary.light, and the button text is white or 87 % black by MUI's contrast threshold of 3 (dark text on Aqua, Sky, Arctic, Mist, Coral, Amber and Sand). The nineteen new files are derived by a unit test, which fails when a file differs and rewrites them with BMM_WRITE_THEMES=1; Ocean's Phase 4 file came out byte for byte. Locales: every locale file gains a gpui_component part with the 13 gpui-kit strings the app can show (Settings search, no results and Reset All; the select placeholder and search box; the input menu Cut, Copy, Paste, Select All and Clear; the dialog OK and Cancel). gpui-kit ships none for de, es, fr and ja and only part for it and zh-TW; en-US repeats gpui-kit's English. i18n::install_component_strings layers them over gpui-kit's once per process (rust-i18n accepts one extension). A test checks that every literal tr! and rust_i18n::t! key in src/, and every theme name key, exists in en-US. Linux packages: the .deb depends on fonts-noto-color-emoji and the .rpm requires font(notocoloremoji), because GPUI on Linux draws colour emoji (the track-type icons) only from Noto Color Emoji. CJK fonts are left to the desktop. Screenshots (examples/screenshots.rs): renders the four pictures of docs/screenshots/ from synthetic files modelled on the old ones (a film with eight tracks and an attachment, a group card of two episodes, a merge at 17 % with two files waiting, Settings > Profiles > Automation); nothing is parsed or merged and the config stays in memory. With --review <dir> it renders every locale through every tab, both toolbar menus, a confirm dialog and every settings page at 600x450, and every theme in light and dark. Offscreen rendering is macOS only. Visual pass fixes found with the review renders: - Queue: the Elapsed and ETA headers broke words in German and Spanish and the German status wrapped; the time columns are 92 px and Status 160 px, sized to the longest translation, and headers no longer wrap. - Integration: Browse and Detect squeezed the tool path field; Settings > Profiles: Add, Delete and Reset squeezed the new name field. Both rows now wrap their buttons below the field when it would get narrower than 200 px (ui::settings::FIELD_MIN_WIDTH). - Language picker: a row truncated in a narrow pane shows its full name as a tooltip. Checked on macOS: the 40 theme renders; Auto following a live change of the macOS appearance in both directions, with the appearance restored afterwards; CJK text in ja, zh-CN, zh-HK and zh-TW. Docs: the root agent guide (themes, locales and the visual pass; the screenshot command) and docs/development.md (the screenshot example, rewriting the themes, the gpui_component strings). Tests: 8 new, 1 removed (the Ocean fallback), 2317 in total: the MUI colour rules, every theme file derived from its colour, every config theme named once, every theme registering a light and a dark variant, dark button text on light colours, the source key scan, gpui-kit's strings in every locale, and the button rows wrapping when narrow. bmm-core line coverage 93.57 %.
Phase 11 of the gpui-kit migration: in every text input of the app, Ctrl+Left/Right (Option+Left/Right on macOS), the same keys with Shift, and the word deletions treat each part of a number as a word, so "Movie.2024.1080p" stops at 5, 6, 10 and 16 going right and at 11, 6, 5 and 0 going left (stock gpui-kit: 5, 6, 16 and 6, 5, 0). Rule (domain/word_navigation.rs): gpui-kit's inputs jump the same way on every platform (forward to the end of the next word, backward to the start of the previous one, across line breaks, and a jump that starts beside punctuation stops on its other side), while the React rule was written for a browser's jumps, which land on word starts on Windows. Wired in unchanged it would skip a number after a space on Windows and Linux and add stops at the separator, so the app uses one rule on every OS: forward jumps end at a part's end, backward jumps at its start, the separator between two digits gets no stop of its own, and whitespace and line breaks are passed as gpui-kit passes them. A jump starts at the selection's moving end, as gpui-kit's does. Text without digits moves exactly as before. - numeric_word_boundary keeps the React rule with its test table, now on a core shared with the gpui-kit rule. - stock_word_jump copies gpui-kit 0.9.1's own jump; a test checks the copy against the real input. - word_stop and word_command give the new selection for a move, a Shift extension (from the anchor; crossing it reverses the selection) or a deletion. navigate, React's selection update, is replaced. Wiring (ui/word_navigation.rs, installed by ui::actions::install): one application-wide keystroke interceptor. It looks the key up in the keymap for the focused context and acts only when the winning binding is one of gpui-kit's word actions (MoveToPreviousWord / MoveToNextWord, SelectToPreviousWordStart / SelectToNextWordEnd, DeleteToPreviousWordStart / DeleteToNextWordEnd), so the platform's own bindings decide and a key bound to something else is left alone. The input is the window's focused Input or Textarea (WindowExt::focused_input), which covers the app's fields, the track-table cells, the output path dialog and gpui-kit's own search fields. Masked inputs, an IME composition, and deletion in a read-only field are left to gpui-kit. A move or extension sets the selection and consumes the key; a deletion selects its range and lets gpui-kit's own word deletion remove it, so the edit is one undo step (undo brings the part back selected). Action handlers on the root view could not do this: the input's own handler stops propagation, and dialogs are not under the root view. Fix for the Phase 10 CI run on Windows: the theme-file test compared the embedded theme sets byte for byte with the derived text, but the Windows runner's Git checks themes/*.json out with CRLF line endings. The test now normalises the line endings first; the theme files themselves parse either way. Checked on macOS: the release app with a scratch HOME, driven with Option+Arrow, Option+Shift+Arrow, Option+Backspace, Option+Delete and Cmd+Z through System Events in a settings field; 19 of 19 scenarios gave the expected text and caret. Docs: the root agent guide (numeric word navigation, live-check notes for macOS) and docs/development.md (the word stops, trying the app with a scratch HOME). Tests: 17 new, 1 removed (navigate's selection test), 2334 in total: gpui-kit's jump as recorded from gpui-base 0.9.1, each part of a number a word, the first stops agreeing with the React macOS rule, text without numbers untouched, Unicode numbers, moves, extensions and deletions; in a window, the typed title with and without Shift, identical jumps on text without digits, the jump copy against the real input, deletion with undo, a textarea across a line break, a masked input, a key bound to another action, the output path dialog field and a track-name cell. bmm-core line coverage 93.57 %.
…kit parity
Phase 12 of the gpui-kit migration: a parity audit of the feature list
against the TypeScript source, live checks on macOS of what no test or
earlier phase had run live, an accessibility fix found by them, and the
removal of the Tauri shell, the React app, specta and the core code only
the Tauri commands used. The Windows and Linux QA moves to Phase 14.
Parity audit (each item compared with the TypeScript source of the parent
commit and mapped to its tests or an earlier live check):
[x] OS drop of files and folders anywhere on the window: same; accepted:
the list's dashed outline while dragging
[x] launch-argument intake: same
[x] window title "BatchMkvMerge v{ver}" / "- done/total": same
[x] taskbar / Dock / launcher progress: same
[x] close guard (Enter and Escape answer No): same
[x] update banner, releases link, Skip this version: same (the result
arrives as an event instead of a 1 s poll)
[x] top-centre toast for success and failure, 5 s: same
[x] footer links (donate, Sam Cao, caoccao.com): same
[x] light / dark / auto, 20 themes, 9 languages: same
[x] shortcuts F3, F4, F8, F9, F10, Ctrl+Q, Ctrl+Tab, Ctrl+Shift+Tab,
Ctrl+1..9, Ctrl+W: same
[x] toolbar buttons, tooltips with shortcut hints, disabled states: same
[x] tabs, closable Settings and About, left neighbour on close: same
[x] Welcome page: same (React's fixed blues kept)
[x] cards per merge unit, group cards, unparsed units single: same
[x] file card: same; accepted: the encoded date in local time, the drag
chip with the file name, Copy Command and the default output path
equal what Merge writes, BetterMediaInfo from the detected directory,
the folder Browse start
[x] group card: same; accepted: its messages stay 5 s (3 s before)
[x] track table (columns, tri-state select-all, autocompletes, flags with
the header automation, row selection, keys, drag reorder, loading /
error / empty): same; accepted: the keys act only on the File List
tab and only without modifier keys
[x] Queue tab: same; accepted: drive titles, the failed row's error
tooltip, sideways scrolling below 200 px for the path, the 1 s tick
[x] Settings: accepted: gpui-kit's searchable settings layout with titled
groups instead of inner tabs, Reset All per page, questions before
profile Delete and Reset, the searchable und-language select, no
keyboard drag in the language picker, separate kind toggles for
Languages and Track Names; same otherwise
[x] About: same (the glow is a shadow, the headline solid)
[x] notifications: accepted: the OS notification and the topmost window
once per drained batch with counts, Enter also closes the topmost
window; same otherwise
Internal accepted differences: the event-driven queue (no 200 ms poll),
the automation once per unit membership, parse errors translated when
shown, the update check and tool paths written through the config store,
the gpui-kit word-navigation rule, the restored window position only on a
connected display. docs/release_notes.md gets a 1.0.0 section with the
user-visible differences.
Live checks (macOS arm64, release build, scratch HOME, the user config
byte-identical afterwards): the real app driven through its accessibility
tree and posted mouse events. A checkbox click; "ger" + Enter in a group
card's language cell giving "de" in both episodes' commands; the Default
flag cycling true, false, unset; a row dragged up and back with both
units' --track-order following; click, Down and Space on the active
card; a Finder drag of three files (a Clip card and a Film card with its
.srt); a card dragged onto another (one unit of 7 rows, a combined track
order); a real merge from the card; the Queue buttons' states.
Accessibility fix (ui/cards/mod.rs, ui/file_list.rs, ui/queue/mod.rs):
GPUI rebuilds the accessibility tree every frame but does not replay a
cached view's nodes when it reuses its prepaint and paint, so the file
cards and queue rows dropped out of the tree (and out of VoiceOver) until
they repainted; after Copy All Commands the cards were gone for seconds.
CardHeight::view(view, cache) draws a measured view cached at its height,
or uncached; the file list and the queue pass !window.is_a11y_active(),
so while an assistive client is connected every card and row renders
every frame.
Removed:
- src/ (React), src-tauri/ (Tauri shell, protocol_typescript.rs),
tests/input-word-navigation.test.mjs, index.html, vite.config.ts,
tsconfig.json, tsconfig.node.json, package.json, pnpm-lock.yaml,
pnpm-workspace.yaml; the workspace exclude of src-tauri.
- specta: the workspace pins, the core's dependencies, every Type derive
and #[specta(type = ...)] attribute of the parser model; Cargo.lock
drops specta, specta-macros, specta-typescript and Inflector.
- Tauri-only core code: merge::snapshot (MergeQueue::snapshot becomes a
test-only listing), mkvtoolnix::is_mkvtoolnix_found, the config-reading
services::get_media_metadata and services::launch_better_media_info,
the config-writing update::run_check and update::skip_version, and the
About, MergeEntry, MergeSnapshot and MergeFinishedEvent types. The
remaining protocol.rs result types lose their serde derives and wire
renames, since nothing serialises them; the parser model and the
config keep serde for the fixtures and the config file.
- .gitignore entries for Node, Vite, TypeScript and src-tauri; the
TypeScript language server in .serena/project.yml.
Other changes: scripts/ts/change-version.ts no longer edits package.json,
src-tauri/Cargo.toml and tauri.conf.json; the README logo comes from
crates/bmm-app/packaging/icons/.
Docs: the root agent guide and docs/development.md lose what described the
deleted code (the frontend/backend split becomes "File intake and
parsing"; the store, status machine, window flicker, Tauri sink, specta
and React convention notes go) and gain the cached-view accessibility rule
and the live-check method; code comments that name the React file a
module was ported from point into the git history.
Checks: cargo build --release --workspace --locked; 2335 tests (1 new,
1 renamed); bmm-core line coverage 93.66 %; cargo fmt --check clean;
clippy clean for the app crate. Tracked files matching
"\.tsx?$|package\.json|tauri": only scripts/ts/change-version.ts.
cargo tree --workspace -e all: no tauri, specta or tokio on the host;
across all targets only tauri-winrt-notification (GPUI's notify-rust) and
tokio (gpui-kit-assets' reqwest), both transitive through GPUI.
…ly CI Phase 13 of the gpui-kit migration: version 1.0.0 everywhere, the final Linux dependency lists, the macOS bundle version, installers without license pages, the version script finished, the MKVToolNix directory a merge finds by itself stored through the config store, and the 1.0.0 release notes. Checked on macOS arm64; installs and 0.1.0 upgrades on Windows and Linux are left to the maintainer's QA. Version: 1.0.0 in crates/bmm-app, crates/bmm-core and crates/bmm-platform, the three workflows' BATCH_MKV_MERGE_VERSION, Cargo.lock (workspace entries only) and packaging/macos/Info.plist, all written by the version script. Linux dependencies (crates/bmm-app/Cargo.toml): - .deb depends: dpkg-shlibdeps on the ubuntu-22.04 dist binary of the CI run of 4c69e46, in an ubuntu:22.04 container: libc6 (>= 2.35), libgcc-s1 (>= 4.2), libxcb1 (>= 1.12), libxkbcommon0 (>= 0.5.0), libxkbcommon-x11-0 (>= 0.5.0). Plus what GPUI loads at run time, which no tool sees: libvulkan1 and libwayland-client0, libegl1 and libwayland-egl1 for wgpu's GL fallback (GPUI asks wgpu for Vulkan or GL), fontconfig-config (GPUI reads /etc/fonts/fonts.conf with a pure-Rust parser) and fonts-noto-color-emoji. libfontconfig1 and libfreetype6 go: the binary neither links nor loads them. - .rpm requires: rpm still adds the linked libraries by soname; the hand-listed ones are capabilities instead of Fedora package names, so they resolve on Fedora and openSUSE alike: libvulkan.so.1()(64bit), libwayland-client.so.0()(64bit), libEGL.so.1()(64bit), libwayland-egl.so.1()(64bit), fontconfig, font(notocoloremoji). All resolve on Fedora 45 (vulkan-loader, libwayland-client, libglvnd-egl, libwayland-egl, google-noto-color-emoji-fonts). - File dialogs on Linux need an XDG desktop portal (GPUI uses ashpd); desktops ship one, so it is documented, not a dependency. macOS bundle: packaging/macos/Info.plist is merged over the generated one (the packager's info-plist-path) and sets CFBundleVersion to the version, as 0.1.0's .app had, instead of cargo-packager's build timestamp. No license pages: license-file is removed. cargo-packager turned it into a license agreement that the .dmg asks to accept before it mounts, and a license page in the NSIS and MSI installers; 0.1.0 had none of them. Version script (scripts/ts/change-version.ts, deno.json): also rewrites the Info.plist CFBundleVersion, runs cargo update -w itself (--allow-run=cargo), and warns when docs/release_notes.md has no section for the new version. Its arguments are ("0.1.0", "1.0.0"). MKVToolNix: on macOS a merge finds the newest MKVToolNix-<version>.app when the default path has no mkvmerge. The core wrote that directory to the config file from the merge worker, bypassing the app's config store, so the next settings write dropped it and a write could race. Now mkvtoolnix::report_auto_detected hands a directory that differs from the configured one to the sink installed with mkvtoolnix::init_auto_detected; the app relays it through a channel (tools::auto_detected_channel) and stores it with ConfigStore::update on the foreground (tools::store_auto_detected), so Settings > Integration shows it. The core no longer writes the config anywhere. CI: the rustflags comment of the three workflows no longer refers to the phased parser delivery; warnings stay warnings. No other workflow change. Docs: docs/release_notes.md folds the unreleased 0.2.0 section into 1.0.0 and adds the system requirements, the installers and the 0.1.0 upgrade, the Linux dependencies and the portal, and the MKVToolNix fix. The root agent guide and docs/development.md describe the version script, the Info.plist overlay, the missing license-file, where the Linux dependencies come from and how to re-derive them after a gpui-kit bump, and the auto-detected MKVToolNix flow. Checks (macOS arm64): cargo build --release --workspace --locked with no rustc warnings; 2337 tests (2 new); bmm-core line coverage 93.67 %; cargo fmt --check clean; clippy clean for the app crate. deno task change-version to 9.9.9 and back leaves git diff identical. Packaged clean start: cargo build --profile dist and cargo packager -f app,dmg give BatchMkvMerge_1.0.0_aarch64.dmg (11.1 MB), which mounts without a prompt; its .app has CFBundleShortVersionString and CFBundleVersion 1.0.0, the 0.1.0 bundle id, LSMinimumSystemVersion 12.0 and the same ad-hoc linker signature as 0.1.0's. Started from the mounted .dmg with an empty scratch HOME, it showed "BatchMkvMerge v1.0.0", the Welcome page and About, logged nothing, quit on Cmd+Q and saved its geometry.
Phase 14 of the gpui-kit migration: the documentation describes the application as it is, the Phase 2 prototypes are gone, code comments no longer refer to the implementation before 1.0.0, and the Phase 13 CI installer passed a manual QA on macOS. The Windows and Linux QA stays with the maintainer. Docs: - The root agent guide is rewritten by subsystem: the build rules on top, the commands, the toolchain and tests, the architecture (workspace, startup, the four stores and their services, the event flow, the views, the platform layer, the domain logic, themes, file intake, the merge queue, profiles, the config location, i18n, the parser, external tools), the GPUI and gpui-kit notes grouped by topic (versions and assets, layout and rendering, input and dialogs, tests, live checks on macOS), packaging and CI, and the conventions. The migration section and the per-phase notes are gone. - AGENTS.md only points to the root agent guide. - README.md: the features as they are now, the installers per OS, the unsigned installers, the system requirements and how to upgrade from 0.1.0. - docs/development.md: no migration section, one tech-stack list, the CI artifact names, and a release checklist (CI, install / upgrade / uninstall per OS, and the in-app checks) for this and later releases. - docs/README.md links the screenshots page. Code (no behaviour change): - crates/bmm-app/examples/spike/ is deleted: the four Phase 2 prototypes and their 17 tests, which the app has implemented since. Its [[example]] entry and the macOS-only dev-dependencies it alone used (objc2, objc2-app-kit, raw-window-handle) go with it; Cargo.lock loses those three edges. - Code comments no longer name the implementation before 1.0.0 (its frameworks, its .tsx and .ts files, its function, component and store names, its UI and drag libraries) or the migration plan; each describes the behaviour on its own, and the touched paragraphs are reflowed. Renamed: five tests and the word-navigation helper Jumps::browser (now Jumps::per_platform). QA (macOS arm64, the arm64 .dmg from the 495d255 CI run, an empty scratch home, the installed MKVToolNix): the bundle has version and bundle version 1.0.0, the 0.1.0 bundle id, macOS 12.0 as minimum and an ad-hoc signature. Passed: a folder as launch argument and Add Folder; a card dragged onto another; checkboxes, an alias typed into a language cell, the Default flag cycle and row reordering in the track table; a group card with Copy All Commands; the group-mode menu (F8); Merge All, Cancel on the card and in the queue, Resume All and Clear Completed with two 2.9 GB merges on one drive, the title counting done/total; one topmost window per finished batch that had a completed merge, none for a cancelled one, closed by Enter, Escape and Close; the exit dialog while merging (Enter and Escape keep the merges, Yes quits and stops mkvmerge); every settings page used here (display mode, theme, language switching live, tool paths with Browse and Detect, profiles with their questions, the language picker's drags); the tab shortcuts; numeric word stops in a text field; the window geometry, the settings across restarts, the update banner with Skip this version. Known issue, not fixed here: with more than one file card, a screen reader gets the first card's values and positions for every card (repeated buttons in Settings report the first one's position); controls still act on the right card. Not checked here: the Dock progress and anything visual (no screen recording), the system notification, Windows, Linux and an Intel Mac. Checks: cargo build --release --workspace --all-targets --locked without warnings; cargo test --release --workspace --locked: 2320 passed (the spike's 17 removed); bmm-core line coverage 93.67 %; cargo fmt --check clean; clippy clean for the app crate. The root agent guide no longer mentions the previous frameworks, pnpm or specta. Phase 13's CI on 495d255 is green on all three runners with the seven 1.0.0 artifacts.
caoccao
marked this pull request as ready for review
November 15, 2026 12:48
…n its display Welcome page: the file list's drop zone, which outlines the list while system files are dragged over the window, was a plain block element, so the welcome page's flex_1 had no flex parent and the page shrank to its content, leaving a blank band above the footer in a tall window. The drop zone is now a flex column and the welcome page fills the tab, with its content at the top as before. A headless test resizes the window to 1400x1600 and checks that the page reaches the bottom of the panel; it failed before the fix (782 of 1471 px). Window geometry on Windows: - GPUI opens a window at the given bounds only when their centre lies on the display it is opened for, the primary one unless `display_id` names another; otherwise it falls back to its default size centred on that display. The main window never passed a display, so a window saved on a second monitor reopened on the primary one at 1536x1095, and that geometry was then saved over the user's. `main_window_options` now passes the display under the saved window's centre (else under its origin), preferring the primary display when it qualifies, which keeps the placement unchanged on macOS, where every display reports its bounds at the origin. - Positions are global on Windows, so a display left of or above the primary one has negative coordinates, and such a position was never restored. Only the default -1, -1 now means "never saved"; any other position must still lie on a connected display. - Checked live on two 3840x2160 displays at 150 %: a window saved on the second display reopens there at the same client rectangle, unchanged over four restarts; a maximized window keeps its restore geometry. - Three new unit tests: a position on a display left of the primary one, the display under the window's centre, and the primary display winning where displays overlap. Docs: the root agent guide no longer claims a Windows registry or Linux $PATH search for the external tools; it lists the places Detect looks.
…ow in step Merge outputs: - Every enqueue reserves its output until its merge ends, and an automatic name (`<stem>.mkv`, numbered) passes over the reserved outputs as well as the files on disk. Two files of one stem merged into one directory by one Merge All, or a second Merge while the first still waited, used to get the same `-o`, and mkvmerge overwrote the first output. - Outputs are compared by the file they name: the existing part of the path is canonicalized and the rest folded, so `out` and `out\..\out`, links and short names are one output; case is folded on Windows and macOS. - The reservations' lock is never held while the file system is read: an enqueue resolves outside it and resolves again when another enqueue took the name meanwhile, so a slow share cannot block the UI thread. - Copy Command, Copy All Commands and the output dialog's default path pass over the same reservations, so they still show what Merge writes. A full path override is used as given. Queue lifecycle: - An enqueue lists its roots as waiting before it resolves their outputs and hands each to the merge queue only if it is still listed and not cancelled then. Clear, Delete, Cancel All and the close guard see a merge from the first moment; Clear used to empty the list under a merge being prepared, which then started anyway. - A file removed while the merge queue still has its merge stays hidden but active until its Finished arrives, which drops it without a row, a toast or a batch count. A deleted waiting card's late Cancelled used to list it again. - Delete and Clear All remove nothing while any member of a unit merges: a card regrouped around a file whose own merge runs used to drop that merge's queue entry, so Cancel All and the close guard lost it. Removing a file cancels its waiting merge first. - The core queue drops a finished task before it sends Finished and frees the drive after, so a merge enqueued again in answer to Finished is a new task; it used to be ignored as a duplicate and stay waiting. Window placement: - The geometry is saved with the display's UUID (`window.display`). GPUI divides each Windows display's coordinates by its own scale, so displays at different scales overlap, and on macOS every display starts at the origin: the position alone could reopen the window on the wrong display. - On Windows the display comes from MonitorFromWindow (bmm-platform), as GPUI's own lags behind at mixed scales. - The window reopens on the saved display when that display holds the window's centre or origin, so a window straddling two displays keeps its own; older configs and a display that is gone fall back to the display under the position. Tests: 13 new (output reservations and path keys, prepare/submit, Merge All outputs, Clear and Delete during preparation, a deleted waiting merge, a merging member, the regrouped card's Delete, the core retry, mixed-scale and straddling placement, the macOS layout). The root agent guide, the release notes and the release checklist describe the new behaviour.
…t path Merge outputs: - A merge chooses its output just before mkvmerge starts instead of when it is enqueued. A merge may wait for its drive, and a file written to its output meanwhile was overwritten. The core queue takes MergeArgs: fixed, or built by the worker at launch (MergeArgs::AtLaunch); a build error ends the merge as Failed without launching anything. - A name the app picks (<stem>.mkv, or the input's name in a folder a card's path names) gets " (1)", " (2)", ... while a file is there or a running merge claims it. Running merges claim their outputs in RunningOutputs until their Finished arrives, and workers choose one at a time, so two merges on different drives never pick the same file. Paths are compared by the file they name (the existing part canonicalized). - A file path set on a card is never replaced: when a file is there as the merge starts, it fails with "The output file ... already exists." Copy Command and Copy All Commands refuse the same and copy nothing. - Enqueue is synchronous again: a root is listed as waiting and handed to the merge queue in one step. The queue-time reservations, tickets, prepare/submit and refusals are gone. Output dialogs: - The writability check is split by mode: a folder dialog rejects an existing file (a merge would treat it as the folder), a file dialog accepts an existing file it can open for writing. Window placement: - The window reopens on its saved display when that display holds the window's centre or origin, so a window straddling two displays or hanging off one keeps its display; one whose centre or origin is on no display opens centred. - A window whose centre is off its display moves just far enough for the centre to be on it, as GPUI's Windows backend otherwise drops the saved bounds and opens it at a default size. Docs: the root agent guide states the output rules; the release notes are trimmed. Tests: arguments built at launch, outputs chosen one worker at a time, numbered folder outputs, a set path holding a file, merges that waited while files appeared at their outputs (through the core queue), folder dialogs refusing a file, and the window placement cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request migrates BatchMkvMerge from the Tauri v2 + React/MUI shell to a native gpui-kit application, released as 1.0.0. The work landed phase by phase on
migrate-gpui-kit, one Conventional Commit per phase (phases 0-14). All phases are done. The Windows QA found two bugs, fixed in3808f59; a code review found merge-queue and window-placement bugs, fixed inaca1343; and the maintainer's manual test passes the golden path. The pull request goes in with the small bugs listed under "Known issues", which are fixed onmain. The rest of the release checklist (installs, the 0.1.0 upgrades, Linux) runs with the CI installers after the merge.The Tauri app is no longer in use: Phase 12 deleted the Tauri shell (
src-tauri/), the React app (src/) and the TypeScript tooling, after a parity audit of every feature against the TypeScript source. The three workflows build, test and package the gpui-kit app; no Node, pnpm or Tauri step remains. Phase 13 set the version to 1.0.0 and finished the packaging. Phase 14 rewrote the documentation and ran the manual QA on macOS. No tags or releases are created from this branch.Phase progress
crates/bmm-coreextraction,MergeEventsink70f10ac, CI green; go (the app was built on it); its Windows/Linux runtime checks are part of the open QA below02d289d)57f08b6)f998800)a8a7b96)1b2c37b)431bbc7; the OS and topmost notifications come once, after the last task in the queue finishes; the React app sent them for every file)fe0d99f)2d691bb)4c69e46; word deletion uses the same stops, beyond the React app)140639b; every feature the same or an accepted difference, listed in the commit body; the Windows and Linux QA moved to Phase 14)495d255; checked on macOS; the Windows and Linux installs and the 0.1.0 upgrades are left to manual QA)dd7d969; macOS QA done; Windows QA done with the fixes in3808f59, the code review's fixes inaca1343, and the maintainer's manual test passes the golden path; Linux and the installer checks follow onmain)Phase 0 changes
distprofile) added to the top of the root agent guide and todocs/development.md.--releaseadded to every cargo snippet in the docs and topnpm tauri dev.No application code changes.
Phase 1 changes
crates/bmm-coreandsrc-tauri), with shared dependency pins, the release profile at Cargo defaults and adistprofile for installers.Cargo.lock,rust-toolchain.tomland.rustfmt.tomlmove to the root.crates/bmm-core, the UI-free core:media_metadata), config, constants, MKVToolNix and the wire DTOs. Parser files,config.rsandconstants.rsare byte-identical, and the fixture tests now live incrates/bmm-core/tests/.services(formerlycontroller.rs): every function is synchronous.update(new): the release check and the startup update policy, with tests.merge: aMergeQueuewith an injectable process launcher that pushesMergeEvents (Started,Progress,Finished) into a sink. Every enqueued file gets exactly oneFinished, including a waiting file that is cancelled and a worker that panics. A cancel that arrives while mkvmerge is launching now kills it. It has 13 tests with fake processes, plus one Windows-only test.bmm-core. The merge sink re-emitsFinishedasmerge-finished. Thespecta*crates are now dev-dependencies, which clears the 1.100.0unused_dependencieswarning.src/protocol.generated.tschanges only in its header comment.setup-rust-toolchainno longer getstoolchain: stable. With that input, the action set arustup overrideon the repository root, and that override would have outranked the toolchain file once the file moved to the root.cargo test --release --workspacefrom the root.cargo llvm-cov --release -p bmm-core --fail-under-lines 90, with no file-name exclusions.target/directory.docs/development.mdanddocs/parsers/**point at the new paths.Phase 2 changes
src-tauriis excluded from the workspace;src/andsrc-tauri/stay as unbuilt reference until Phase 12. The TypeScript drift test no longer runs (src/protocol.generated.tsis frozen). The unusedspecta-serdeworkspace pin is gone.crates/bmm-app(packageBatchMkvMerge): a library plus a three-line binary on gpui-kit=0.9.1.BatchMkvMerge v0.2.0(1024×768, minimum 600×450) with the app icon and the real identitycom.caoccao.batch-mkvmerge.winresourceexe icon.test-supportas a dev-dependency only.crates/bmm-platform:TaskbarProgressfor the Windows taskbar (ITaskbarList3), the macOS Dock tile (NSProgressIndicator) and Linux launchers (com.canonical.Unity.LauncherEntryover D-Bus).cargo run --release -p BatchMkvMerge --example spike):PopUp, 440×200, reused, Esc closes).Tab::suffix.cargo test --workspace..app,.dmg, NSIS, one MSI per language,.deb,.AppImage) and cargo-generate-rpm 0.21.1. Every identity matches the published 0.1.0 installers, because 0.2.0 was never released:batch-mkv-merge, bundle id, per-user NSIS, publishercaoccao,BatchMkvMerge.desktop;{7FB79BE4-981D-54D5-9F1F-83C3507EF0AA}.cargo build --profile dist -p BatchMkvMergeand packaging; artifacts upload under the original names.ubuntu-22.04with GPUI's build packages and Mesa Vulkan, and keeps thebmm-corecoverage gate.app,dmgon both runners; Windows packagesnsis,wix.docs/development.mddescribe the unbuilt reference, the three crates, cargo-only commands and the new CI. The guide gains a "gpui-kit app" section with the pitfalls found in this phase.change-version.tsalso bumps the two new crates.Phase 3 changes
crates/bmm-core, UI-free ports of the React app's logic:media_track(media-metadata.ts): the selection table's rows from a parsed file, plus the synthetic chapters and attachment rows. It sits inbmm-corebecausemerge_argsneeds the row type.merge_args(merge.ts): themkvmergecommand line for one file and for multi-input merge trees, the copyable command, the profile's track auto-selection and the path helpers.languages: the 186-entry MKV language list (generated once into a Rust file), alias and short-code lookups, autocomplete options and track-name presets.Removed in Phase 4: the app's numbers, strings and rounding follow Rust.js: the JavaScript rules the ports keep:Number()parsing,toFixedrounding of exact ties (1.125→1.13) and UTF-16 string order.merge::get_drive_keyis public, so queue rows group by the backend's own per-drive key.bmm-app::domain, logic without GPUI:file_tree: merge trees, manual merges, detaches, the combined track order and the default/forced flag automation.grouping: the group-card key fromFileList.tsx.format: size, bit-rate andHH:MM:SSlabels.status: queue item states fromMergeEvents, without the old snapshot fallback.metadata_error: the parse-failure messages.word_navigation: the numeric word stops, on UTF-8 byte offsets. Phase 11 wires it to the inputs.crates/bmm-core/tests/merge_args_golden.rs: synthetic Matroska,.mkaand SRT files go through the parser, and four cases check every row field, themkvmergearguments and the command. The expected values were produced by the React app's ownmetadataToMediaTracks/buildMergeArgs(Multi)on the same parser output, then reviewed.bmm_core::languages, so nothing in the workspace readssrc/any more.docs/development.mddescribe the new modules and the golden test.Phase 4 changes
lib.rs::run): reads the config, registers the app's locale files for gpui-kit's own strings, sets the locale and the Ocean theme, creates the stores, binds the shortcuts, installs the macOS menus (Quit, and an Edit menu of system edit actions), opens the main window, routes Quit through the close request, adds files named on the command line, and quits when the last window closes.state/):ConfigStoreapplies edits at once and writes them in the background with a revision, so a slower older write can never land last. A pending write is flushed on quit.FileStoreholds the file list, Clear, and path resolution for drops, dialogs and launch arguments.UiStateholds the tabs (closing the active one selects its left neighbour) and toasts.platform/):crates/bmm-app/locales/(188 keys each); a test keeps their keys and placeholders identical. A language change in the config applies at once.themes/ocean.jsonholds Ocean light/dark. Auto follows the system; base font size 14, matching MUI's 12 setting. The other themes use Ocean until Phase 10.ui/):bmm_core::jsis removed; the ported logic follows Rust.format!, so exact ties round to even: 1152 B shows1.12KBinstead of1.13KB.char::is_whitespace.str::parse, so a blank tag gives no value.DisplayMode,ThemeandLanguagederiveCopy/PartialEq/Eq.rust-i18n4.2 is a dependency; it was already in the lockfile through gpui-kit.docs/development.md.Phase 5 changes
state/):Storesgains the queue store and a merge backend.Stores::newtakes the services the stores use: config persistence, the metadata parser and the merge queue, so tests can pass fixtures and recorders. A store notifies observers only on structural changes. Every change is also emitted as an event naming the files, so later each card can repaint alone.state/files/):store.tsaction of its fields: add, remove and clear; card merge and detach; drop target and active card; metadata; selection; default/forced flags; row reorder; combined order; language; track name; output path and directory overrides; the global output directory; BetterMediaInfo availability.load.rs, exuseFilesLoad.ts): each file is parsed once on the background executor. Once a unit is fully parsed, the profile's automation runs in the React order: language, track name, prospective selection, default/forced flags, then the selection is committed. It runs once per unit membership. React tracked this per card instance, so flag edits were lost when a unit moved into or out of a group card.state/queue.rs):merge_events.rs: the core's worker threads send events through anasync-channel, and one foreground task applies them in order. A finished merge shows the toast: success with the elapsed time, failure with the error.actions.rs(exmergeActions.ts):MergeRequestis read on the foreground; output paths and arguments are resolved on the background executor, then the merges are enqueued in order. It also has Merge All, Cancel, Clear and Remove across the stores.BatchMkvMerge v<version> - done/totalwhile merges run.async-channelandanyhoware now dependencies of the app;async-channelwas already in the lockfile through GPUI.docs/development.md.Phase 6 changes
ui/track_table/, exTrackSelectionTable.tsx):member:idfor a multi-member unit), type emoji with a tooltip, codec, description, size and bit rate in the configured precision and unit, language, track name, default and forced.Tabletake no ids or mouse handlers.state/files/table.rs,TableScope).autocomplete.rs, exTrackCellAutocomplete.tsx):gerbecomesde), the keyboard option or the typed text, and Escape closes.docs/development.md.Phase 7 changes
ui/cards/file_card.rs, exMkvFileCard.tsx):2026-05-24 09:00:00) and the title.elapsed / ETAand Cancel, and the table is disabled. Queued, drop-target and active-card highlights as in React.ui/cards/group_card.rs, exGroupCard.tsx):ui/output_dialog.rs, exOutputPathDialog.tsx):actions.rs):bmm-core:launch_better_media_info_from.docs/development.md.Phase 8 changes
ui/queue/, exQueue.tsx):C:,\\SERVER\SHARE; "Queue" on macOS and Linux). With an empty queue, one empty card shows.notifications.rs):ui/topmost.rs, exTopmostNotification.tsx):platform/taskbar.rs): the taskbar button, Dock tile or launcher icon shows the whole queue's progress while a merge waits or runs.bmm-platformis now a regular dependency of the app.docs/development.md.Phase 9 changes
ui/settings/, exSettings.tsx):LanguagePicker.tsx): filter, Add All, Remove All, and the Available and Preferred panes. Drag a row, or every checked row, between the panes and within Preferred; a line shows where it goes. The keyboard drag of the React picker is not ported.UpdateBanner.tsx):docs/development.md.Phase 10 changes
theme.rs,themes/):BMM_WRITE_THEMES=1..debdepends onfonts-noto-color-emojiand the.rpmrequiresfont(notocoloremoji), because GPUI on Linux draws colour emoji (the track-type icons) only from that font.examples/screenshots.rs):cargo run --release -p BatchMkvMerge --example screenshotsrenders the four pictures ofdocs/screenshots/from synthetic files; nothing is parsed or merged and the config stays in memory. The pictures are regenerated (macOS window content).-- --review <dir>renders every locale through every tab, menu, dialog and settings page at the 600×450 minimum size, and every theme in light and dark.docs/development.md(the screenshot example, rewriting the themes).Phase 11 changes
Movie.2024.1080pstops at 5, 6, 10 and 16 going right, and at 11, 6, 5 and 0 going left. Stock gpui-kit stops at 5, 6, 16 and at 6, 5, 0.domain/word_navigation.rs):ui/word_navigation.rs): one application-wide keystroke interceptor.docs/development.md(the word stops, trying the app with a scratchHOME).Phase 12 changes
docs/release_notes.md, for example one notification per finished batch, the searchable Settings layout and the stops inside numbers.gerturning intodeon both files of a group card, the Default flag cycle, a row drag-reorder, the arrow and Space keys;src/,src-tauri/, the TypeScript test, the Vite, TypeScript and pnpm files, and the workspace'ssrc-tauriexclude;.gitignoreand the Serena config pruned, the version script no longer edits deleted files, the README logo comes from the app's packaging icons.docs/development.mdlose what described the deleted code and gain the accessibility rule and the live-check method. The full rewrite is Phase 14.Phase 13 changes
Cargo.lockand the macOS bundle..deb: the libraries the binary links, fromdpkg-shlibdepson the CI binary in anubuntu:22.04container (libc6 (>= 2.35),libgcc-s1,libxcb1,libxkbcommon0,libxkbcommon-x11-0), plus what GPUI loads at run time: the Vulkan loader, the Wayland client, EGL and wayland-egl for the GL fallback, fontconfig's configuration and Noto Color Emoji.libfontconfig1andlibfreetype6are gone; the binary does not use them..rpm: rpm still adds the linked libraries; the rest are listed as library capabilities (libvulkan.so.1()(64bit), …) instead of Fedora package names, so they resolve on Fedora and openSUSE alike.CFBundleVersionis the version, as in 0.1.0, instead of cargo-packager's build timestamp (anInfo.plistmerged over the generated one).license-filemade the.dmgask to accept the license before it opened and added a license page to the NSIS and MSI installers. 0.1.0 had none, so it is removed.cargo update -witself and warns when the release notes have no section for the new version.MKVToolNix-<version>.app), the core no longer writes the config file. It reports the directory, and the app stores it through its config store, so Settings > Integration shows it and the next settings change keeps it.rustflagscomment changed; no install or upgrade checks were added.docs/development.mddescribe the version script, the packaging rules and how to re-derive the Linux dependencies.Phase 14 changes
AGENTS.mdonly points to the root agent guide.README.md: the features as they are now, the installers per OS, the unsigned installers, the system requirements and how to upgrade from 0.1.0.docs/development.md: no migration section, the CI artifact names, and a release checklist (CI, install / upgrade / uninstall per OS, the in-app checks) for this and later releases.crates/bmm-app/examples/spike/(the Phase 2 prototypes and their 17 tests; the app implements all four), with the macOS dev-dependencies only it used.Windows QA fixes (
3808f59)$PATHsearch.Code review fixes (
aca1343)Episode.srtwith one output directory, orEpisode.mkvandEpisode.mksin place) both got the same-o, and mkvmerge overwrote the first. Every enqueue now reserves its output until its merge ends, and an automatic name passes over the reserved outputs too, also across separate actions. Paths are compared by the file they name (the existing part canonicalized:outandout\..\out, links and short names match). The reservations' lock is never held while the file system is read, so a slow share cannot block the UI; an enqueue that loses a name to another resolves again. Copy Command, Copy All Commands and the output dialog's default path follow the same reservations.Cancelledlisted a deleted waiting file again. A file removed while the merge queue has its merge now stays hidden but active until that event, which drops it.Finishedbefore it dropped the task, so a merge enqueued again in answer was ignored as a duplicate. The task now goes first, and the drive is freed after the event.window.display; on Windows fromMonitorFromWindow, as GPUI's own lags), and the window reopens on that display when it holds the window's centre or origin; older configs fall back to the display under the position.Known issues
Small bugs the pull request goes in with; they are fixed on
main.IconUrileft by an earlier build stays inHKCU\Software\Classes\AppUserModelId\com.caoccao.batch-mkvmerge(on the QA machine it pointed at a deleted icon of the Tauri dev build).Test plan
cd src-tauri && cargo test --releaseon Rust 1.100.0: all targets passcargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2050 tests pass (2028 existing, 22 new), no warningscargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.28 % linescargo tree -p bmm-core -e allcontains no tauri, gpui or tokio398cc95: Linux, macOS (x86_64 + arm64) and Windows green with the pinned 1.100.0 toolchain; Windows ran all 14 merge tests including the Windows-only one; all seven bundles uploaded from the workspacetarget/cargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2062 tests pass (bmm-core's 2043 unchanged, 19 new), clippy clean on the new crates (bmm-platform also cross-checked for Windows and Linux)cargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.28 % linescargo packager --profile dist -p BatchMkvMerge -f app,dmgbuilds the.appand a 6.4 MB.dmgwith the 0.1.0 bundle identity; the packaged app launches70f10ac: the rewritten workflows green on all four targets. GPUI builds onubuntu-22.04, Windows links GPUI's manifest with the icon resource, and all seven artifacts upload. The.debinstallsBatchMkvMerge.desktopas packagebatch-mkv-merge, and each of the eight MSIs carries 0.1.0's UpgradeCodecargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2133 tests pass (72 new; 2 spike tests now covered bybmm-core), clippy clean on the new filescargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.46 % lines (new modules 97.5–100 %)tests/input-word-navigation.test.mjs02d289d: Linux, macOS (x86_64 + arm64) and Windows greencargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2162 tests pass (33 new shell tests; the 4 tests of the removedjsmodule are gone), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.44 % lines57f08b6: Linux, macOS (x86_64 + arm64) and Windows greencargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2205 tests pass (43 new), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.44 % lines (no core code changed)<name> (1).mkv; the title goes- 0/2,- 1/2, then plain; Cmd+Q mid-merge asks; Escape keeps the merges running; Yes kills the running mkvmerge and quits with no process leftf998800: Linux, macOS (x86_64 + arm64) and Windows greencargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2233 tests pass (28 new), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.44 % lines (no core code changed).mka, an.srt) render one table whose cell texts match the ported rulesa8a7b96: Linux, macOS (x86_64 + arm64) and Windows greencargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2256 tests pass (23 new), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.46 % lines1b2c37b: Linux, macOS (x86_64 + arm64) and Windows green. Linux and Windows failed: two output-dialog tests pressed Cmd+A, which selects nothing there. The test fix is in431bbc7, whose CI is green on all three runners; the Phase 7 macOS run was greencargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2277 tests pass (21 new), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.45 % lines (no core code changed)- 1/5, and the Dock progress appears and clears. Only the merging row re-renders. One topmost window opens after the last merge, at level 101, and stays above another active application; Escape closes it, and the next one-file batch opens a fresh one. Offscreen renders in light, dark and 600x450431bbc7: Linux, macOS (x86_64 + arm64) and Windows green (the first compile of the Linux-only layer-shell code)cargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2310 tests pass (33 new), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.57 % linesbmm_core::configfe0d99f: Linux, macOS (x86_64 + arm64) and Windows greencargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2317 tests pass (8 new, 1 removed), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.57 % lines (no core code changed)2d691bb: Linux, macOS (x86_64 + arm64) and Windows green. Linux and macOS are green. Windows failed: the theme-file test compared the CRLF checkout of the theme files byte for byte. The test fix is in4c69e46, whose Windows run is green.debfrom CI listsfonts-noto-color-emoji(the4c69e46artifact, read in Phase 13)cargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2334 tests pass (17 new, 1 removed), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.57 % lines (no core code changed)Movie.2024.1080pstops at every part with Ctrl/Option+Left and Right, with and without Shift; the React test table still passes; text without digits jumps exactly as stock gpui-kit4c69e46: Linux, macOS (x86_64 + arm64) and Windows greencargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2335 tests pass (1 new), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.66 % lines\.tsx?$|package\.json|tauriexceptscripts/ts/change-version.ts;cargo tree --workspace -e allhas no tauri, specta or tokio on the host, and across all targets only GPUI's transitivetauri-winrt-notificationand tokio140639b: Linux, macOS (x86_64 + arm64) and Windows green.app(the first one asks for permission)cargo build --release --workspace --lockedandcargo test --release --workspace --locked: 2337 tests pass (2 new), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.67 % lines.debdependencies fromdpkg-shlibdeps(anubuntu:22.04container) plus GPUI's run-time libraries; the.rpmcapabilities resolve on Fedora 45deno task change-versionto a dummy version and back leavesgit diffidenticaldist1.0.0.dmgmounts without a prompt; its.apphas version and bundle version 1.0.0, the 0.1.0 bundle id and the same ad-hoc signature; started with an empty home folder it showsBatchMkvMerge v1.0.0, the Welcome page and About, and quits cleanly on Cmd+Q495d255: Linux, macOS (x86_64 + arm64) and Windows green; seven artifacts with1.0.0in their names (…-linux-x86_64-1.0.0-{deb,rpm,AppImage},…-windows-x86_64-1.0.0-{msi,nsis},…-macos-{x86_64,arm64}-1.0.0); the.debDependsand the.rpmrequirements as listedcargo build --release --workspace --all-targets --lockedwithout warnings andcargo test --release --workspace --locked: 2320 tests pass (the spike's 17 removed), clippy clean for the app crate,cargo fmt --checkcleancargo llvm-cov --release -p bmm-core --summary-only --fail-under-lines 90: 93.67 % lines.dmgof495d255, an empty home folder, real MKVToolNix): version and bundle version 1.0.0, the 0.1.0 bundle id, macOS 12.0 minimum, ad-hoc signatureger→de, the Default flag cycle and row reordering in the track table; a group card with Copy All Commands; the F8 menudd7d969: Linux, macOS (x86_64 + arm64) and Windows greencargo test --release --workspace --locked: 2325 tests pass (4 new), clippy clean for the app and platform crates,cargo fmt --checkcleanC:and asubstdrive) merge in parallel, one at a time per drive, with no console window; the title counts done/total; Cancel on a card stopsmkvmerge3808f59): the window reopens at its saved size and position on the second display, four restarts in a row; the Welcome page fills a tall window495d255read without installing: the MSI shortcut carries the AppUserModelID, the MSI carries 0.1.0's UpgradeCode, and neither installer installs WebView2main3808f59: Linux, macOS (x86_64 + arm64) and Windows greencargo test --release --workspace --locked: 2338 tests pass (13 new), clippy clean for the app and platform crates,cargo fmt --checkcleanEpisode.mkvandEpisode.mksof one folder merged by one Merge All writeEpisode (1).mkvandEpisode (2).mkv; the window saves each display's UUID and reopens on the second display across restarts, also from a config without the fieldaca1343: Linux, macOS (x86_64 + arm64) and Windows greenmain: the rest of the release checklist ofdocs/development.mdwith the CI installers: installs and the 0.1.0 upgrades (NSIS, MSI, deb, rpm, dmg), Linux (X11 and Wayland), an Intel Mac, the taskbar, Dock and launcher progress, and an Explorer drag and the word keys on Windows