Skip to content

Canifol v1.6.1

Choose a tag to compare

@github-actions github-actions released this 25 Nov 03:37

Canifol 1.6.1 - bug-fix release

KNOWLEDGE BASE / DOWNLOADS

  • Fixed the "2 KB corrupted PDF" bug. Google Drive answers errors (404/403,
    quota exceeded, virus-scan warning) with a small HTML page; the old code
    never checked the HTTP status or the body and cached that page as a PDF.
    Downloads now:
    • require a successful HTTP status;
    • reject HTML / <!DOCTYPE pages and non-file payloads;
    • validate PDFs (%PDF header + %%EOF trailer) and JSON (catalog);
    • write atomically via a temporary file + rename.
  • Corrupt or truncated files already in the cache are detected, removed and
    downloaded again automatically (no manual cache clearing required).
  • Google Drive: full confirmation handling (download_warning cookie, HTML form
    confirm/uuid/at, confirm=t) and retries for transient network/5xx errors.
  • Clear error messages instead of a corrupt file, plus an "Open in browser"
    fallback when Google Drive is blocked/unreachable.
  • Shared HTTP clients with timeouts, gzip, cookies and system-proxy support.
  • Catalog refresh keeps the previous catalog if the new download fails.
  • "Download all": correct downloaded/skipped/failed counters, working ETA,
    per-file failure reason shown in the UI, invalid files re-downloaded.
  • Settings > Local database: size and Clear now use the selected folder and
    only remove database file types (pdf/fz/cad/bdv/brd/pcb/tvw).
  • MEGA fallback catalog is validated before it is used.

DATASHEETS

  • PDF read/download validates the file; corrupt cache entries are removed and
    downloaded again instead of being served forever.
  • Fixed offline favorites: names ending in ".pdf" were sanitized twice, so the
    saved PDF was never found.
  • "Save PDF" works in any folder (Desktop, Downloads, USB drive) through a Rust
    command; the Tauri fs scope no longer blocks it.
  • PDF bytes are passed to the UI as raw binary (ArrayBuffer) instead of a JSON
    number array - much faster and far less memory.
  • Datasheet URLs: protocol-/site-relative links are normalized.
  • LCSC/JLCPCB: real API errors are reported instead of "No results"; datasheet
    lookups for all results run in parallel.

BOARDVIEW PARSERS

  • GenCAD: the UNITS header is now applied (USER n -> 25.4/n mm,
    MM / INCH / MIL variants), so mil- and inch-based CAD files no longer get a
    wrong scale.
  • GenCAD: pad rectangles/circles keep their real centre coordinates.
  • GenCAD: NaN/inf coordinates are ignored instead of poisoning the board.
  • XZZ (.pcb): checked arithmetic in block parsing (no overflow/panic on
    malformed or hostile files); bad blocks are skipped safely.
  • FZ: plain-text FZ files are supported as a fallback; UNIT:MM variants are
    recognised; garbage pin radius values are capped.
  • Apple BRD and BRD2: the board outline is accepted only if it actually
    surrounds the pins; otherwise a fallback frame is drawn (no more camera
    flying far away from the board).
  • TVW: net-name fallback scan is bounded (was O(n^2) and could hang for minutes
    on large or garbage files); ASCII TVW components derive bounds from their
    pins; TVW boards get a fallback outline; zero-size components are dropped.
  • Removed panic = "abort" from the release profile, so the existing
    catch_unwind guard around the BoardView parser actually works and a broken
    file produces an error instead of crashing the app.
  • BoardView files are limited to 128 MB; other binary reads to 512 MB.

UI / UX / LOCALIZATION

  • Fixed a results-list crash caused by duplicate {#each} keys in datasheets
    and in analog/parametric transistor searches.
  • Knowledge-base search highlighting escapes HTML (prevents script injection
    from the remote catalog) while still highlighting matches.
  • PDF preview: blob URLs are revoked, and the full-screen body class is
    removed when leaving the viewer.
  • Unified theme store (sidebar and Settings no longer disagree); language
    switch updates and reloads the RSS/Bilibili feed.
  • Sketch: fixed the broken i18n namespace, Delete key, Android double-tap
    (double stamps / double points), drag Undo, crash on unknown symbols,
    storage-full handling, background-photo downscaling, and saving PNG /
    loading photos through Rust.
  • Pinouts: EN/ZH fall back to RU pin data (Arduino Mega and Pico showed only
    2 of 20/40 pins); an empty search result clears the stale selection.
  • Units: milliohms are no longer shown as ohms (0R22 -> 220 mOhm), inductor
    units fixed (mH/uH/nH), kV/uA and time units added.
  • SMD search: raw (non-proxied) state for the 50 MB database and prefix lookup.
  • Removed dead files (unused PdfViewer wrapper, duplicated MicrochipScheme,
    duplicated uiScale store, unused devBoards.json).
  • Guide feed: "Load more" is localized and no longer skips a page after a
    failed request; empty feed is distinguished from an error.
  • Soviet analog database is now compiled into the binary and parsed once
    (previously it was read from the build machine's source path, so the feature
    did not work for end users).

SECURITY

  • Datasheet downloads and "Open in browser" reject non-http(s) URLs and
    localhost/private-network addresses.
  • File names are sanitized against path traversal; database Clear only deletes
    known database extensions in a user-selected folder.

Downloads:

  • Windows: .exe (NSIS installer) - attach manually
  • Android: .apk (Universal) - attach manually
  • Linux: .deb, .rpm, .AppImage - auto-built