Skip to content

A full review: crashes, lost settings and slow spots fixed in both apps (2.24.3) - #216

Merged
mwo-dk merged 51 commits into
masterfrom
fix/review-code
Oct 16, 2026
Merged

mwo-dk merged 51 commits into
masterfrom
fix/review-code

Conversation

@mwo-dk

@mwo-dk mwo-dk commented Oct 16, 2026

Copy link
Copy Markdown
Owner

The fixes from the full codebase review: 23 reviewers, every finding checked twice (does it reproduce, is the fix right); 237 confirmed. This PR carries the code fixes of five areas, merged into one branch so their overlaps are resolved once. CI, packaging and docs are in #214; the OpenIndiana recipe goes in #215.

High-severity fixes

  • config.toml that cannot be read is no longer replaced by Settings: one locked, atomic config::update_config for every writer (core).
  • Every git command spawned an extra git config; now only where filters matter, and git status runs are shared per repository (core).
  • Search helper Status: the costly counts are cached for 2 s and shared; the status lock is no longer held across a request (core); the terminal app asks only while Find is open.
  • Terminal app: Find's draw no longer indexes past its rows (panic); menu on a tiny terminal; Settings builds its rows once per frame.
  • Packing .tar.zst to a full disk returns an error instead of panicking inside ruzstd; no temp files left.
  • PDF: bounded ToUnicode bfrange walk and trailer rebuild; zip-based documents read within a byte budget (quadratic EOCD scan).
  • BOM dates: no slice panic on a non-ASCII offset.
  • Desktop: mail preview through core's bounded reader (no stack overflow); EPUB through core's reader (.., %20, #); Windows cmd quoting for Ctrl+Enter; Duplicates can no longer trash the last real copy; Enter in the search-setup URL field no longer closes the window.

Also

  • zip 8 -> 9 (zip 8 is yanked). candle-core 0.11 still pins zip 8, so a fresh cargo install needs --locked until candle moves (docs in Install scripts, release downloads, CI and docs put right (2.24.2) #214).
  • Keys: a bound key leaves its default action; a key bound to two actions is an error.
  • Batch rename all-or-nothing, Windows-reserved names caught; copies that fail remove their partial target; renames never replace a dangling link.
  • Cancel stops model downloads and Ollama pulls at once; a 60 s header timeout.
  • Code passages go to 1,200 bytes (SCHEME 4): every user's code vectors are made once again.
  • Requests to model servers carry User-Agent: coxswain/<version> (docs/reference/privacy.md).
  • Many errors and issue texts translated (new keys in all 24 base locales).
  • Repetition removed: one mountinfo parser, one HTTP agent builder, one tools::capture, one zip opener, one percent decoder, BOM/provenance error texts from core, archive endings from core, natural sort ported once.
  • The terminal app's main.rs is now lib.rs plus two thin bins, so tests compile once.

Checks (fake HOME): cargo test --workspace --locked 0 failed (core 459 passed); svelte-check 0 errors; npm test 20/20; npm run build ok; clippy: no new warnings (29, all on master already).

Before merge: tools/preview-check.py on a release build (mail, EPUB, Mermaid with KaTeX, sheets changed), and the VM checks here.

Follow-ups for a later PR: desktop hints via menu::hint_in; open_default off the terminal app's main thread; mail text through book's HTML reader; clippy as a CI gate; cargo fmt over the workspace (master is not rustfmt-clean).

mwo-dk added 30 commits October 16, 2026 09:51
…he terminal is tiny; a panic turns the mouse off
…ile beside it on every path, inline tables editable
…ters per status, and status runs shared per repository
… connect to draw, leave the other app's registration alone
…the known map, prepare gone statements once, drop old vectors and errors, clear Index now after any scan, log store errors with the time
…odels on disk only when they change; tool install lines are asked once; the guide names an own theme by its name and uses base64
…the async workers

The mail preview used mail-parser's full parse, which overflows the stack on
deeply nested messages; it now uses extract::mail::summary, with the same
depth and size limits as the search. The EPUB preview joined spine links as
plain strings; it now uses extract::book::first_chapter, which resolves '..',
%20, #fragments and case. Percent decoding is one function, fs::percent_decode.
The preview commands run their disk and process work on the blocking pool.
…d is open, the quick poll only while an answer is out, the hint only after a change, git only for the panel that moved
…s goes back to the dialog it came from, and a folder not found in a commit says why
…o actions is refused by name; one way to show keys (Ctrl+F for ctrl+f) in Features, hints and the guide
…s, Ask's list opens on a model by Space as by Enter and skips headings; the setup guide marks built-in models slow on a Mac set to the processor
…s no half file; one size walk, one name sanitiser, Entry::default in listings
… read once, one rule for a server's address, downloads that Cancel stops even on a dead connection, the model's files as pinned files
…s let go and said, so the app can still quit
…elf, not in a commit, pick a commit, not in the trash; read-only texts without a colon that cause() cut
… one fail; advice listed once each; the language set once at start-up
… caught in the plan, and a failure undoes the whole batch
….log, and a top-level folder excluded by name is not watched
…e-limited) for tools, bsd and zfs; fc-list without the AppImage's libraries; the font notice names NetBSD's package and no Linux list elsewhere
… cloud notice names each cloud once; empty test gone
mwo-dk added 20 commits October 16, 2026 10:04
…anguage's digits, sizes from 1 PiB labelled right
…olders, and every action has its name; branches' switch-where text gets its key
- archive::endings, update::host, provenance dependency_key and the server's
  host and locality go to the page from coxswain-core instead of copies there.
- BOM and provenance errors are translated in core's Display, for both apps;
  an output missing from a statement has a message of its own.
- generate_handler names each command once; run_command and run_script wait
  on the blocking pool; command-line folders need not be Unicode.
- Converters read stderr to its end (keeping the last 64 KiB), use
  tools::wait, and find a LaTeX document's main file once.
- The asset protocol answers the dev server's origin in debug builds.
- git_status returns the recent repositories as saved; BOM advice is shown
  once each; the two-file caches are one Recent<T>.
- Ctrl+Enter quotes a name for cmd on Windows.
- Duplicates: a copy inside a trashed or marked folder counts as gone, so a
  group never loses its last copy; rules keep the marks of groups they skip;
  waste is counted again; home is shortened with the system's separator.
- The search setup window keeps Enter for its fields and returns to the
  first-run guide by its back link; F1 twice returns to the dialog.
- Sorting a column sorts the listing in the page (natord as in core).
- Fonts previewed are removed again; late note and size answers are dropped;
  a statement with a CycloneDX predicate stays provenance with Source on.
- Shared helpers: addTab/closeTab, showInTab, keysOf, transferTo, day().
- Settings polls the index and models only where they are shown, and opens
  at tui_theme; mermaid 12.2 (katex advisory).
Every zip 8 release is yanked on crates.io. ZipFile::name() and file_names() now give a Result; the readers skip an entry whose name cannot be decoded, and aes_mode is read through aes_settings().
…or one page only

A ToUnicode map walks at most MAX_CODES codes over all its ranges. The trailer search reads each candidate only up to the next one, at most 64 KiB, so a file of trailer words is linear. Forms quieted for a page too dear to read are put back afterwards, so later pages keep their text. Attachments and XMP are hushed without being inflated, and a predictor stream is no longer inflated twice.
…l characters, shared helpers

Presentations, books and spreadsheets open zips through the same meter as Word files. A text file with a stray non-UTF-8 byte keeps its text. Control characters part words everywhere. A page named .xls follows its charset. Charts and formulas set into an .odt are read. Notebooks skip null values. OCR finds tesseract before reading a picture and uses the language Coxswain is set to. The LibreOffice profile URL is percent-encoded. MD5 comes from md-5; the char-boundary cut, attributes and XML entities have one copy each.
…rors for locked zips

A .tar.zst whose disk fills comes back as an error instead of a panic, and a plain .tar's last write is no longer lost. A write error on a locked zip entry is shown as it is, not as a password question. Search reads past a zip entry it cannot open. The entry list is shared, not cloned, and a preview that read the whole archive is kept for browsing it. Errors are translated, and the peek and provenance folders share one helper.
…errors, less copying

parse_time no longer slices inside a character. Issue texts and load errors go through t!. Each component keeps its own fields only, and statements are moved, not cloned. A DOCTYPE is refused by the parser alone, so the words in a comment pass. Windows source paths nest. sources() looks checkouts up once. sniff/load, is_crypto and the dependency key have one copy each.
@mwo-dk
mwo-dk enabled auto-merge (squash) October 16, 2026 09:33
@mwo-dk
mwo-dk merged commit 0999dc9 into master Oct 16, 2026
27 checks passed
@mwo-dk
mwo-dk deleted the fix/review-code branch October 16, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant