Skip to content

Release v1.3.0 - #11

Merged
AbdoslamB merged 33 commits into
mainfrom
release/1.3.0
Nov 1, 2026
Merged

AbdoslamB merged 33 commits into
mainfrom
release/1.3.0

Conversation

@AbdoslamB

Copy link
Copy Markdown
Owner

v1.3.0. See CHANGELOG.md.

Interface preferences (theme, engine choice, hidden engines, auto-save,
Auto's tip) are saved in settings.json and applied before the window
first draws. The desktop window clears browser storage at every launch,
so they were lost before; InkDoc 1.2's browser-storage values are moved
over once.

- Settings -> Engines: a "Show on main screen" switch on each engine
  card; a hidden engine stays installed and Auto still uses it
- Settings -> General -> Restore defaults, and POST /settings/reset
  (never the save folder or engine and add-on setup)
- POST /settings writes strictly: a failed write is retried briefly,
  then answered with 503 instead of being lost at the next launch
- an engine that can't be used yet makes InkDoc use Auto until it can,
  instead of switching to MarkItDown and forgetting the choice

MarkItDown now runs in a worker process (the same executable with
--markitdown-worker), started on signs of intent (POST /convert/warmup)
or by the first conversion, and stopped after 5 idle minutes. InkDoc's
own process no longer imports markitdown (tests/test_startup_imports.py).
Results come back through private files, never the pipe; a crash fails
only that conversion; the worker is contained by a Windows Job Object
and exits with its parent elsewhere. Whole app on Windows 11, idle after
startup: 247 MB -> 166 MB.
A new "Auto quality" setting and per-request auto_quality: Fast (the
default, conversions exactly as before), Balanced or Thorough.

Balanced and Thorough check a PDF conversion's tables against the PDF's
own, read from its ruling lines and text layer in the MarkItDown worker
(pdfplumber never loads in InkDoc's own process). With Auto, a table the
engine got wrong (side-by-side tables merged, loose lines, a picture
placeholder, dropped, shapes in cells, a shifted header) is rebuilt only
when every PDF word inside it lands in a cell, and is marked
<!-- inkdoc:table page=N source=... checked=text-layer -->. Explicit
engines are only checked. Responses carry a "tables" object; text
responses carry X-Tables-Rebuilt and X-Tables-Warning.

Thorough also:
- sends digital PDFs to Docling in 12-page parts (GLM-OCR without it)
- splits mixed PDFs by page: Docling reads the text pages, GLM-OCR the
  scanned ones, joined in page order
- finds borderless tables from word positions, written only when
  GLM-OCR's reading of that area agrees
- reads marker rating grids, adds chart text and dropped paragraphs,
  and restores the PDF's &, dashes and quotes

On InkDoc's table test pages, tables read exactly: MarkItDown 2 -> 12
of 12, Docling 3 -> 10 of 12 (12 of 12 at Thorough).
Every step Auto adds at Balanced and Thorough is declared once in
app/core/thorough_passes.py: level, stage, engines needed, cost, the
finder detector it uses and the table kinds it may write. run_auto asks
a PassPlan which steps are on and records what each did in a PassLog.

- table_finder: detectors (rating_grids, borderless_tables, segments)
  replace the deep flag, which is still accepted; every table has a kind
- table_check.repair(kinds=...) writes only tables whose step is on
- ConversionOptions.passes_off switches steps off (no setting yet)
- API: tables.passes lists each step of the level (ran, changed, skipped)

Auto's output is unchanged: 17 documents at 3 levels replayed byte for
byte against recorded engine replies.
Settings -> General -> Auto quality -> Steps has one switch per step of
Balanced and Thorough, built from the registry that GET /settings now
returns (thorough_passes). The new thorough_passes_off setting lists the
steps switched off, so new steps arrive on; POST /settings accepts only
registry names (422 otherwise) and Restore defaults clears it. A step
whose engine isn't usable is greyed out, with a button to install it.

- Thorough polishes the result Auto keeps, after any re-conversion
  (a result re-converted with Docling or GLM-OCR was never polished)
- tables without lines need GLM-OCR: without it the finder no longer
  looks for tables it could never write
- every conversion endpoint reads the steps with the level, once

Auto's output is otherwise unchanged: 17 documents at 3 levels replayed
byte for byte against recorded engine replies.
A feature becomes a download only if it needs model weights or a native
runtime, adds over 25 MB or slows startup, needs builds per platform,
has a non-permissive license, or uses the network (AGENTS.md "Core or
add-on", CONTRIBUTING.md). Everything else is core; a step that needs a
download names it in needs_all / needs_any.

Each step now names the modules that do its work (PassInfo.modules), and
tests/test_step_imports.py holds them to the rule: the standard library
without network modules, ctypes or subprocess, InkDoc's own code, and
the PDF libraries InkDoc ships, imported lazily and listed with a
permissive license in LICENSES/python-packages-desktop.txt.
At Thorough, with GLM-OCR and the layout model, each table on a scanned
page is found by the layout model (docling-layout-heron, ONNX, run in the
MarkItDown worker) and read again by GLM-OCR on its own. That reading
replaces what GLM-OCR wrote for the table, a table or plain lines of its
words, only when it is a full grid holding at least 90% of those words,
in the same script, and differs from it. Marked
source=glm-ocr checked=layout,page-reading.

Add-ons can now install into InkDoc's own folder (target "inkdoc") and
name a pinned copy inside the Docling pack, used with nothing to
download. layout_model ships unreleased; scripts/build_layout_addon.py
builds its reproducible archive and catalogue entry.

On the table test pages scanned at 200 DPI: tables read exactly 4 -> 9
of 13, no invented cells, no false tables.
From the Python, FastAPI and security reviews of the Auto quality work:

- scanned tables: in a paragraph, only the lines made entirely of the
  reading's words are replaced, so a note or source line next to the
  table stays (up to 10% of a paragraph could be dropped before); each
  place is used by one page only, ties go to the earliest; text is NFKC
  normalised before the script check (º, µ, Ω); pages the layout model
  didn't look at are named; the write runs off the event loop, and any
  failure leaves the Markdown as GLM-OCR wrote it
- layout model: pages render at most 2000 px on the long side (a huge
  MediaBox could take ~10 GB); the model is read once and loaded from
  the bytes that were hashed
- add-ons: verify fails when there is nothing to check; InkDoc's own
  install counts only while the catalogue pins it; the pack copy is
  pinned by size and all four files by digest; a published "inkdoc"
  entry must pin the same files as its pack copy; an install that can't
  make its folder ends as an error instead of staying "downloading"
- build_addon.py and build_layout_addon.py verify only the entry they
  built (the Docling add-on build failed on the unreleased entry)
- a table step that is switched off gives no table warning
- the UI says when a table came from GLM-OCR's second reading
- requirements.txt lists onnxruntime and numpy, imported directly

Docs: the landing page (steps and scanned tables, all 9 languages),
API.md, AGENTS.md and CHANGELOG brought in line with the code.
From the pre-release Python, FastAPI and security reviews of the
preferences, MarkItDown worker and table check work:

- table check: a page drawn with more than 10,000 edges or 60,000
  characters is skipped as "too_complex" before pdfplumber's table
  search, which compares every vertical edge with every horizontal one;
  a crafted page could otherwise hold a conversion lane for hours at
  Balanced or Thorough. The result's details name the skipped pages.
- /convert/file: an upload refused as too large ends its job, as
  /convert/batch already did, instead of leaving it "running" in
  GET /convert/progress until the registry expires it.
- MarkItDown worker: a relative source path is resolved from InkDoc's
  working directory, since the worker runs in its private results folder.
Clearer Settings: shorter descriptions, the most used settings first,
the Docling fallback in the Docling card, engine cards in the main
screen's order, and Code/Formula Enrichment renamed Code and Formula
recognition. Support links: a heart at the foot of the Settings sidebar
and "Buy me a coffee" in About (and on the website), opened in the
system browser in the desktop app; .github/FUNDING.yml.

Settings -> Updates: the release notes are no longer a Markdown box that
could scroll sideways. "What's new in vX" sits at the bottom of the
update card and lists five entries, the first ones of each heading in
turn, each cut to its first sentence (a short lead-in takes the next),
built from text nodes only with no links from the notes, then
"+ N more changes" and "Full release notes", which opens the release
page in the system browser on click or middle click.

The notes are now the CHANGELOG's section for the version:
scripts/changelog_notes.py extracts it, release.yml puts it on the
release page (GitHub's generated notes only as a fallback; the tag now
reaches the script as an environment variable), and sign_manifest.py
signs the same text into the update manifest.

Links in converted documents: a middle click, and links in image maps
and SVG drawings, are handled like ordinary links (web links open in the
browser, others are ignored) instead of reaching WebView2's new-window
path, which hands any URL to the system.

Tests: release_notes_ui.test.js (in CI), test_changelog_notes.py,
support_link_ui.test.js; preview_links and settings_drawer tests updated.
"(changelog) finalize v1.2.0" (less's help screen) and "t generous time
budget for ... (CI flake)" (a coloured diff) were shell-redirect
accidents swept into the v1.2.0 release commit by git add -A.
CHANGELOG: [Unreleased] becomes [1.3.0] - 2026-10-16, with each
heading's most visible entries first (Settings -> Updates shows the
first ones of each heading), and the comparison links updated.
Starlette spools the whole upload to disk before the handler runs, so the
100 MB refusal (413) saved nothing and only discarded the upload. Any size
is now accepted; the page warns that large files can take longer (a toast
and a "Large file" chip) without stopping anything.

To keep the computer responsive with very large files:
- the preview shows the first 5 MB of a larger result; Copy, Download and
  the saved file keep all of it, and a cut Raw view is read-only;
- on Windows the MarkItDown worker may use at most half of RAM (at least
  2 GB, INKDOC_CONVERSION_MEMORY_LIMIT_MB); running out says so, also when
  MarkItDown wraps the MemoryError;
- a file over 100 MB is refused (507) only when copying it would leave less
  than 1 GB free, and a full disk is a 507 instead of a 500.

Also fixes the partial temp copy a refused upload left behind on Windows
(it was deleted while still open).
A 401, 403 or 429, or a Cloudflare bot check (cf-mitigated: challenge),
raises UrlBlockedError and gets a message saying why and how to convert the
page through the user's own browser, instead of "HTTP error 403". Still
502; one request, as InkDoc, never retried or disguised, and the refusal
page is not read.
A page whose body shows no text without JavaScript (an app shell, such as
an Ashby job page) is converted from the schema.org JSON-LD it carries for
search engines (job posting, article, product, event), with a note in
warnings. Without one, and when its <noscript> asks for JavaScript, the
request gets a 422 saying how to convert it, instead of a one-line file.
Every other page is converted exactly as fetched.

Listed under [Unreleased] in the changelog: meant for the release after
1.3.0.
setup-python's "3.11" stayed on 3.11.9 (April 2024): later 3.11 security
fixes are source-only, so the apps shipped without them. Benchmarked with
the new scripts/runtime_bench.py (python.org builds of 3.11.9, 3.13 and
3.14, identical dependencies where pip allows): byte-identical Markdown,
speed within noise, +22 MB peak in the MarkItDown worker on 3.14 (half
the interpreter, half onnxruntime 1.31, which magika's win32 pin allows
only from 3.14 on). The release log now records the exact interpreter.
…s GTK

1.2.0's Linux zip carried part of Ubuntu 22.04's GTK stack (GTK, GLib,
libstdc++, ICU) but took WebKit2GTK from the host, so its window failed
on Ubuntu 24.04 (undefined symbol), Debian 13 (CXXABI_1.3.15) and Fedora
44 (no WebKit2 typelib). The release now builds on ubuntu-24.04 with
setup-python 3.14 and a hash-pinned PyGObject 3.58.1 compiled in CI
(scripts/linux-gtk/), excludes gi.repository.* from PyInstaller, and
scripts/linux_host_libs.py removes everything in the host WebKit2GTK's
dependency closure (only libgirepository-2.0 stays). app/core/linux_host.py
points GI_TYPELIB_PATH at the host's typelibs and gives xdg-open the
host's LD_LIBRARY_PATH. scripts/build_appimage.py packages the result with
the pinned appimagetool 1.9.1 and static type2 runtime 20251108:
inkdoc-linux-x86_64.AppImage, 113.6 MB (the zip was 150 MB).

- release.yml: the AppImage replaces the zip; smoke test with a render
  check (xwd) under Xvfb, plus the FUSE mount when the runner has it; new
  linux-compat job runs it on ubuntu:24.04, debian:13 and fedora:44, and
  publish-release waits for it.
- ci.yml: ubuntu-24.04 on 3.14, plus a 3.10 source-floor job.
- Updater: a verified .AppImage is made executable; min_glibc in the
  signed manifest (2.39) keeps an update off systems that can't start it.
- Without WebKit2GTK, the release opens its UI in the browser and says
  what to install, instead of exiting silently.
- Licences: AppImage runtime (MIT, with LGPL-2.1 libfuse) and LGPL-2.1
  texts; GTK/ICU no longer bundled.

Verified locally in containers: the AppImage passes the smoke test with
the window rendered on Ubuntu 24.04, Debian 13 and Fedora 44; refuses to
start on 22.04 (GLIBC_2.38); the browser fallback works on Debian 13
without WebKit2GTK. pytest passes on 3.14 (Windows) and 3.10 (Linux).
6dd8dc5 listed it under [Unreleased] for the release after 1.3.0; it is
on the 1.3.0 branch and ships with it. Placed last in 1.3.0's Fixed list,
so the in-app highlights (the first entries of each heading) are unchanged.
…back tests

run_desktop sets the server's port, INKDOC_DESKTOP_RUNNER and the update manager's desktop mode for the whole process; left behind, they failed later CORS, session-token and update-apply tests in the same run.
The note above a result (a warning, a tip, tables rebuilt) stayed in view
for as long as the result was open. It now has a × that hides it for that
result; the note comes back when the result is opened again after another
one, or converted again. A failed conversion's message can't be closed.

- app.js: showConversionNotice takes opts.dismissible; result notes pass
  it, other notices don't. Focus returns to the active preview tab.
- index.html/style.css: the button, in the note's own colour.
- tests/notice_dismiss_ui.test.js, run by ci.yml and listed in AGENTS.md.
The release build installs from requirements.txt with no lock, so the
">=0.1.7" floor would have shipped whichever MarkItDown was newest on the
day of the tag, untested. It is now pinned to 0.1.8 (bug fixes in CSV,
Word, HTML and Atom output); Dependabot proposes newer versions.

MarkItDown guesses a text file's charset from its first 64 KB, so a CSV
that is plain ASCII there and has accented letters further on failed with
"'ascii' codec can't decode". run_markitdown now retries such a file once
as UTF-8, only when the failure was a decode error, no charset was given,
and the whole file is valid UTF-8 (read in 1 MB pieces).

Tests: tests/test_charset_retry.py.
…ings

Docling 2.130.0, in pack v1, has two denial-of-service advisories fixed
in 2.132 (GHSA-cgc7-9qp3-86m3, GHSA-3cr3-8m4c-fpxw). Pack v2 pins Docling
2.140.0 / core 2.103.0 / parse 7.22.3, plus rapidocr 3.9.2 and omegaconf
2.3.1 (2.4 renamed what the worker patches). manifest.json moves to the
docling-pack-v2 release once build-packs.yml has built it (runbook,
"Docling engine pack"); until then test_the_shipped_pack_matches_the_pin
fails, by design.

Users with pack v1 keep a working Docling: EARLIER_PACKS holds each earlier
pack's launch hashes, /engines reports update_available, and the Docling
card offers Update Docling with the download size. The update downloads
and verifies the new pack first, then waits for a running Docling
conversion and stops the worker (DoclingWorkerClient.paused), swaps the
folders, moves the add-ons installed in the old pack across
(AddonManager.carry_over) and has the new worker load them (reconfirm).
Any failure keeps the installed pack. The old pack is deleted after
Docling resumes; a rename held up by a just-killed worker or an antivirus
scan is retried; an update interrupted between its two renames is
restored by the next install.

- The worker launches exactly the files the launch check hashed (an
  earlier pack's own paths) and no longer copies worker.py into a pack;
  a launch hash the manifest lists but leaves empty fails closed.
- /engines reports security_fixes, the advisories the update fixes, and
  the card says "with security fixes".
- A carried add-on is re-hashed before the new worker loads it, and
  carry_over keeps to the packs' models folders.
- Verify on an earlier pack checks its interpreter and worker and says
  so (outdated + note); it also reports files_checked, and a failed
  install shows its reason.
- build_pack.py: smoke conversion limit 180 s (a fresh pack is read cold
  and scanned by Defender).
- scripts/pack_license_list.py keeps LICENSES/docling-pack-packages.md
  in step with a pack; NOTICE and THIRD_PARTY_NOTICES name pack v2.
- build-packs.yml defaults to docling-pack-v2; API.md, AGENTS.md and the
  runbook describe the update.
- Tests: test_docling_pack_update.py, test_pack_license_list.py,
  docling_update_ui.test.js (in ci.yml); release_notes_ui.test.js expects
  the Security highlight.
macOS users had to unzip the app and move it themselves. The release now
builds inkdoc-macos.dmg (scripts/build_dmg.py): a read-only ULFO image
with an HFS+ volume "InkDoc" holding inkdoc.app and a link to
/Applications. The bundle keeps its name, so dragging it replaces a 1.2
install. The script checks the app's signature before packaging and
inside the mounted image, and retries detach.

- release.yml: package, copy, smoke test (mounted read-only, the app
  copied out first, as a user drags it), size cap and publish gate all
  name the .dmg. The cap still holds the last zip's numbers: re-baseline
  from the first CI build. A format comparison runs on manual runs only.
- sign_manifest.py: TARGET_ASSETS at module level, so
  tests/test_release_assets.py checks every list of asset names agrees.
- The updater is unchanged: the file name comes from the signed
  manifest, so 1.2 Macs save the disk image to Downloads.
- AGENTS.md, the runbook and CHANGELOG describe it; README and the
  landing page switch their links in a separate commit, after release.
The frameless window reclaims its top frame as client area, where
WebView2 sits, so its top edge answered as page content: only the sides,
bottom and outer corners resized. With the whole header a caption region
(CSS app-region: drag, IsNonClientRegionSupportEnabled was already on),
WebView2 itself answers HTTOP, HTTOPLEFT and HTTOPRIGHT in the top 8 px
(at 96 DPI) and only while the window is restored. Measured on a live
window and with real drags.

- style.css: the header is the caption; its buttons, the Settings drawer
  and its scrim (inside the header in the DOM) opt out.
- The pywebview-drag-region class (pywebview's JavaScript move loop) and
  the page's double-click handler are gone; dragging, double-click to
  maximise, snapping and the system menu are the shell's own.
- win_chrome.py: its own top-edge hit test, which Windows never reached,
  is removed; WM_NCCALCSIZE uses the window's DPI with fallbacks.
- tests/test_titlebar_regions.py guards the contract.
The natively drawn maximise button got the new theme's colours the moment
the page switched, but the page reveals the new theme through a 350 ms
View Transition circle. Switching to dark, the shrinking circle uncovers
the button only at the end, so the button turned dark about 350 ms before
the title bar around it.

The colours are now sent when the circle's edge reaches the button, read
from the animation's eased progress each frame and one frame early for
the trip to Windows and the repaint, and at the transition's end if the
circle never got there (skipped, cancelled or a newer click); a failed
send is retried then. Instant switches still sync at once. Measured on a
live window: within 0-14 ms of the header in both directions, down from
~350 ms (dark) and 30-55 ms (light).
_find_window_handle used FindWindowW(None, "InkDoc"), which matches any
process's window with that title. With a second InkDoc open, the styles
and window-procedure subclass could go to the other window (or fail on
it when it runs elevated), leaving this one without its resizable
border, Snap Layouts and native maximise button.

It now enumerates top-level windows and takes the visible one owned by
this process. Titles are read only for this process's windows, with
InternalGetWindowText, so no WM_GETTEXT is sent to the UI thread from
pywebview's event thread.
- A short "Upgrading from 1.2" paragraph opens the section: settings,
  engines and add-ons are kept; Linux needs Ubuntu 24.04, Debian 13,
  Fedora 40 or newer; the Mac download is a disk image; Docling should be
  updated for its security fixes. Plain text, so the app's highlights
  (the first entry of each heading) are unchanged.
- The three Windows title-bar fixes are one entry.
- Two entries reflowed where their lines broke mid-sentence.
docs/support/index.html sends visitors on at once (refresh with no delay
plus location.replace, both in <head>), with a plain link for anyone with
neither. noindex, not in the sitemap, nothing loaded from elsewhere.
Released apps link here from 1.3.0, so the page must stay at /support/.
The Settings heart, About's "Buy me a coffee" and SUPPORT_URL now point to
https://abdoslamb.github.io/InkDoc/support/ instead of Buy Me a Coffee, so
the destination can change without an app update. The heart's aria-label
no longer names the platform. The landing page keeps its direct links.
The test finds the app's links by data-support-link and checks the page.
CHANGELOG, DISCLAIMER, AGENTS.md and the release runbook say so.
WebKit (the Linux and macOS windows) refuses pywebview 6.2.1's new Function
and its eval-wrapped call results under the page's policy (no unsafe-eval),
so the page never got pywebview.api there: no Save dialog, no save folder,
no links in the browser. webview_bridge.py replaces both (a closure, and
run_js for results) for the pinned pywebview==6.2.1 only; the policy is
unchanged and now built in one place (server.page_csp). --selftest-bridge
checks a real window under that policy, and the release smoke test runs it
for every artifact. tests/test_webview_bridge.py pins what is replaced.
@AbdoslamB
AbdoslamB merged commit 971e419 into main Nov 1, 2026
12 checks passed

This branch was successfully deployed

1 active deployment
github-pages — 971e419a Deployed Nov 1, 2026 by AbdoslamB via deploy #14
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