2026-11-08 · Architecture checkpoint after version 1.5.0

2026-11-08 · Architecture checkpoint after version 1.5.0

Context

Version 1.5.0 shipped to the Microsoft Store with the offline OCR vision models, run by llama.cpp’s own program on the processor or the graphics processor. A release is the end of a milestone, and several files had passed ~500 lines since the 4 November checkpoint. Pull request #136 (offline analyses with Gemma 4) was open at the same time and rewrites crates/offline (host.rs, llm.rs, vision.rs, llama.rs, cpu.rs), moves the analysis schema helpers into core/src/structured.rs, and touches core/src/lib.rs, media/src/lib.rs, the app’s setup.rs and offline and settings commands, the translation files, state.svelte.ts and the mocks. This checkpoint kept out of those files so the two branches would not conflict. #136 merged while it ran, with #137 (Whisper on the graphics processor through a Vulkan helper, which split whisper.rs into whisper/); the branch was brought up to date and the findings those files held were taken up where still worth it. What is left is listed below.

Two read-only reviews ran in parallel, one of the Rust workspace and one of the interface. Their findings were checked against the code before being acted on or recorded here.

What holds

Done in this checkpoint

All behaviour-preserving, except the one bug noted.

Accepted

Left for later

What the merged files hold

  1. FFmpeg’s and llama.cpp’s helpers. quiet() (no console window) and the lookup of a bundled program (environment variable, the app’s folders, then PATH in debug builds) are written in media/src/ffmpeg.rs and offline/src/llama.rs: export both from media, which offline may depend on.
  2. cfg!(windows) below the app: llama.rs’s locate_vulkan and locate_opencl test the system; drop the tests (those programs are bundled only on Windows and the file check fails elsewhere), or have the app say which builds exist.
  3. The four tests that write a JSON file for the interface (core/src/lib.rs, engine/src/rules.rs, search/src/fold.rs, search/src/terms.rs) repeat “write only if changed”: one helper behind a test feature of core.
  4. timed_lines (reading [hh:mm:ss] markers into segments) is a shared reading of stored results that the engine reaches into export for; it belongs in core.
  5. Sizes: offline/src/vision.rs (836 lines: placeholder, grounded and without_runaway into vision/answer.rs), offline/src/llm.rs (845) and llama.rs (560), each reviewed with the offline host in mind.
  6. The file picker’s extensions (tauri.ts EXTENSIONS) restate InputKind::from_path and have drifted: .aiff/.aif, .wmv/.m4v and .xlsx are read by the engine but hidden by the picker. Write each kind’s extensions into coreLists.json, with the export formats that need a layout (newJob.ts LAYOUT_FORMATS) and the tasks that write text (ProjectSearch’s GENERATED_TASKS). A fix with a visible effect, so a change of its own.
  7. tauri.ts (551 lines): the pickers and native questions into dialogs.ts, with state.svelte.ts’s imports.
  8. mock.ts (769 lines): settings, presets and pipelines into mockPresets.ts, the job and review commands into a jobCommand, and mockView into mockViews.ts, as profiles and projects already are.
  9. Reader sort order is written several ways (jobList.ts, projects.ts, activity.ts, SetupList, the collators of glossary.ts, languages.ts and OfflineModels): one readerOrder in i18n/index.ts, keeping each variant’s options.

The rest

Consequences