Commit Graph

163 Commits

Author SHA1 Message Date
9ad881ada8 feat(magazine): manage OPDS catalogues in the app, env-based login, result paging
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 11:03:03 +02:00
85c5b8427a feat(magazine): hands-free listening (Media Session, wake lock); fix Listen not starting audio
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 10:50:41 +02:00
268ed391a3 feat(magazine): EPUB 3 Media Overlay export with measured sentence timings; tolerate missing mutagen
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 10:33:08 +02:00
4a20a12f66 feat(magazine): show sidebars in the reading view as labelled, never-narrated asides
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 10:26:27 +02:00
30b80fcbf7 feat(magazine): mark hand-edited text, show a word diff against the recognised text, restore it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 10:24:27 +02:00
0f4b28ba14 feat(magazine): link a tail to its head from 'continued from page N'
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 10:20:35 +02:00
0005ae0ebd feat(magazine): import a magazine from PNG/JPEG page images
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 10:19:14 +02:00
6faaa349d5 docs: OCR porting brief; test: current prompt version fixture, known phone-width issue
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 21:38:28 +02:00
35e0a64665 feat: OCR benchmark harness and first candidate results (docling, PaddleOCR)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 17:55:48 +02:00
c3c5c55f17 feat(magazine): find and import issues from the Internet Archive and OPDS catalogues
Also reuses the existing magFmtClock for the contents list (the duplicate
tripped the frontend collision gate).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 17:35:08 +02:00
f1b12993a1 docs: mark magazine live ingest preview as done
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 15:11:26 +02:00
f2c338aa96 docs: add TODO for a general UI/UX simplification pass on settings/config screens
User's own comparison: VoiceStudio's integrations screen is cleaner than
this app's Settings/Engines equivalent (880-line s-llms.html, 31+ fields
all visible at once vs VoiceStudio's collapsed per-category model cards).
Direction: progressive disclosure over one long flat form.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:41:26 +02:00
b7202e030d docs: add TODO items for VoiceStudio-inspired features the user picked
Projects nav grouping (Audiobooks/Magazines/Script Rehearsals/Video
Dubbing), Video Dubbing itself, Live STT Dictation, an onboarding/setup
wizard, a global command palette + cross-app recent history, and a
curated voice-design preset gallery. Telephony integrations were in the
same gap list but not picked -- left alone.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:40:15 +02:00
ed41cbadf0 docs(magazine): record the healing Auto-fix run on the live production magazine
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:35:01 +02:00
fd43710caa docs: evaluate and compare VoiceStudio (debpalash/VoiceStudio)
Studied the repo (README, license notice, engine catalog, MCP/API docs) and
the GitHub API record, and probed the user's already-running instance at
192.168.178.8:3900 read-only (/health only). No integration attempted.
Written comparison at architecture/voicestudio-comparison.md; TODO items
1-3 marked done.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:23:16 +02:00
faa3c16a91 fix(magazine): exclude advertisement pages from magazine-comparison statistics
A page either side marks as a full-page ad is skipped by that side's quality
run, so comparing its near-empty boxes against the same page freshly OCR'd
on the other side (ad-marking is a one-time manual step) was a review-state
difference, not a pipeline one, skewing whole-issue numbers. Verified: text
similarity 0.837->0.870, box precision 0.62->0.66 on the real re-import.

Also records the clean from-scratch re-ingest results: the ingest-time
duplicate-check ordering fix is proven in isolation (0 additional duplicates
found afterward, vs 13 before the fix), and the auto-chained Auto-fix ran
end to end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:11:00 +02:00
6f2dfca89a docs(magazine): record D-E re-run results with both G fixes applied
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 09:18:11 +02:00
ac1153b782 fix(magazine): re-check for duplicate boxes after box-fitting/seam-mending grows them
The duplicate detector only ran once, before geometry fixes could merge or
grow a box into one that now duplicates another's text -- narrating it
twice. Now re-run after the geometry loop at ingest and after
recover_missing_text in the whole-issue quality run. Confirmed live: 13
such duplicates in a fresh import, 6 in the already-reviewed magazine.

TODO: F decided unnecessary per user; G updated with both universal fixes
from this pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 08:50:13 +02:00
1fb5528112 fix(magazine): drop hallucinated vision-OCR refusal text tiled over unreadable images
TODO A-E marked done for this pass; comparison report saved as evidence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 23:26:59 +02:00
1b9a4bd3bc fix(magazine): clipped-edge audit requires ink on the box's own text lines
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 17:54:12 +02:00
25eea74096 feat(magazine): mend column seams; docs: TODO for verify/re-import/compare and Voice Studio evaluation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 17:44:28 +02:00
f4892dbde4 feat(magazine): fit text boxes to their ink in Clean up boxes
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 08:12:12 +02:00
91caa6cf90 feat(magazine): fuse paragraphs across columns/pages, article-aware acronyms, German/English spellcheck
- fuse_paragraph_blocks joins a paragraph split by a column or page break into one
  narration block (reader, podcast source and MP3), keeping source regions for highlighting
- language decided once per article; per-article acronym glossary (LLM classifies unknown
  acronyms from context), letter-spelled acronym lists, extended DE/EN database
- core/spelling: dictionary findings (compounds, inflections, line-break hyphens, other-language
  words), marked in review and listed per page/article; guarded LLM agent fixes; quality run
  now includes the spelling pass
- keep suspended compound hyphens (Programmier- und) when merging regions / building layouts

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 08:09:30 +02:00
d94d85b21b docs: note the docker-compose.yml rsync footgun in the NUC deploy process
Some checks failed
Test and SonarQube / quality (push) Has been cancelled
Rsyncing the tree without excluding docker-compose.yml overwrites the
NUC's own compose file with the DGX's (wrong build/image, dgx_net/
docker-socket-proxy the NUC doesn't have), breaking `docker compose up -d`.
Hit and fixed during the v1.54.0 deploy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 15:12:24 +02:00
9904459913 feat(magazine): whole-magazine quality check, page stages, ad pages, driving-mode player
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
- Quality run: per-page missed-text recovery, guarded OCR re-read and a pixel audit
  (uncovered ink, overlapping boxes, clipped box edges); report saved as quality_report.json
- Thumbnail grid: quality-stage colours, flag badge, live per-page indicator for every
  batch step (OCR, detection, figure fixing, quality run, audio)
- Pages can be approved as advertisements (not narrated, skipped by quality run)
- Driving mode: +/-15 s, seek bar, playback speed, text and image toggles
- Plus the previously uncommitted 1.53.5 magazine/OCR work in the same tree

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 19:29:43 +02:00
b1c0197652 Release v1.53.2
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-24 07:44:16 +02:00
cddc3c226d docs: note the delete-region crop-cleanup gap found during magazine QA
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 05:05:06 +02:00
f155839300 feat(magazine): select many boxes and act once, undo instead of confirm, fold labels into new pictures
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Bulk delete/type for a click- or rectangle-selected set; every destructive
region change returns an undo token (one level, refused once something newer
happened); text inside a region that becomes a picture is folded into it.
TODO: model-based layout detection (PP-DocLayout, LayoutReader) with licence
notes. v1.39.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 16:33:01 +02:00
99f2f2260e feat(magazine): edit, split, merge and re-OCR a region from its row, with keyboard control
Split at the cursor and merge-with-next keep article membership right; typed
letters in the editor never fire shortcuts; focus returns to the same row
after a redraw. v1.38.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 12:11:14 +02:00
b7aa823455 feat(magazine): clean up boxes - text in pictures, OCR noise, duplicates, run-on author lines
Rules sized on a real 204-page issue before writing them; each re-types
(not read aloud, reversible), none deletes. A run-on author line's sentence
becomes its own paragraph instead of being glued to "the next paragraph",
which was right in only 1 of 5 real cases. Runs on import and re-OCR, and on
demand with a layout backup. v1.37.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 12:06:33 +02:00
baab49dbdf feat(magazine): set a page's reading order by hand (type a position or click in order)
A hand-ordered page is locked: Fix reading order, type changes and newly drawn
boxes leave it alone until Automatic order. v1.36.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 11:58:37 +02:00
04c75b2ea3 docs(todo): magazine podcasts via Open Notebook's multi-speaker generator
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 11:50:03 +02:00
fd1de80f83 feat(magazine): column reading order, region type picker and delete per row, fix reading order
Columns are found from where column-width text starts, not from the whitespace
between them (loose OCR boxes shrank one gutter to 4-6 pt and a pull-quote
bridged it, collapsing page 38 into one interleaved column). Headlines get
their own band, pull-quotes are read at the end of the page. Measured over a
204-page issue: 89 sentence continuations kept vs 85.

Each review row gets a type picker (text kinds, page number, source, ad,
image) and its own delete button; text<->image conversions keep the region
in its article. Fix reading order re-reads existing issues without OCR and
leaves hand-ordered pages alone. The shared confirm dialog is now an
alertdialog for screen readers. v1.35.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 11:38:33 +02:00
52e5c14f18 docs(todo): overhaul magazine region boxes and OCR approval handling
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 09:45:59 +02:00
7999ad484b docs(todo): magazine region ordering — manual order and column-aware reading order
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 09:42:08 +02:00
ded70c3853 docs(audiobook): record the rejected scene-cast experiment
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 20:54:22 +02:00
37e2622d4e feat(audiobook): advisory verify and span-native recast for span casts
Verify / recast now run span-natively (no text re-emission): a second differently-windowed
pass marks lines agreed/disputed and records the other answer, without changing any speaker
(~9 min vs ~49 min). Measured on the real pipeline, overruling disputed lines with a reasoning
adjudication made them worse (66.5% -> 61.4%), so that step was removed; agreed lines were 83%
right vs 48.5% for disputed ones, which is the signal used for confidence and review.
Auto-repair no longer runs after a span cast; segments carry a spanId.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 20:17:38 +02:00
5877aa2edc fix(characters): persist base-appearance image pairs, deterministic prompts, form-aware review; add forms panel
- fix: base-appearance matched pair lost its concept image + metadata on reload; visual save
  wrote base concept art to the record root; one save path for base and forms now
- fix: extraction no longer lets the LLM author image_prompt (source of avatar/concept drift);
  avatar-only generation uses the deterministic prompt and flags an existing pair
- fix: prompt writes and Physical/Clothing edits go to the active form; review endpoint checks
  each form's own pair; fingerprint parity with the browser incl. visual_* overrides
- feat: appearance forms panel (add/rename/delete/show, per-form stale flag, generate one/all)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 15:27:21 +02:00
e7cb92c572 feat(audiobook): span-mode casting - deterministic quote spans, LLM only names speakers
Split the book into narration/dialogue spans from its own quotation marks and ask
the LLM only who speaks each dialogue span (POST /api/attribute-spans), so text can
no longer be fused, dropped or duplicated and a novel takes ~10 min instead of ~4 h.
Book 1 vs the hand-corrected reference: every-word-right 87.0% -> 92.3%, type
agreement 93.6% -> 97.4%; Books 2/3 (not tuned on) 90.8% / 89.9%.

- static/js/audiobook-spans.js (pure, unit-tested) + audiobook-cast-spans.js
- core/attribution_spans.py, route, tests; scripts/score_attribution.py
- default on; localStorage ab-span-mode=0 restores the classic engine
- architecture/audiobook-attribution.md, Manual, CHANGELOG 1.32.0, TODO

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 08:30:26 +02:00
2dd5cea7b7 feat(magazine): let review screen boxes be moved, resized, deleted, and re-OCRed in place
Some checks failed
Test and SonarQube / quality (push) Has been cancelled
Adds "Edit boxes" mode to article review: drag an already-detected
region to move it, its corner handle to resize it, or press its x to
delete it -- for correcting a box the layout engine got wrong, not one
it missed entirely ("Draw it" still covers that case). Moving or
resizing opens a confirm panel; "Save" keeps the region's existing
text at its new position, and for text regions "Save & re-OCR" reads
the corrected area again and replaces the text.

New core/magazine.py update_region()/delete_region() and PATCH/DELETE
/api/magazine/{doc}/pages/{page}/regions/{block_id}. An image region
is re-cropped from the page render whenever its bbox changes, since
its saved file is exactly that crop.

Live-verified against the real ingested c't KI Wissen 2026 magazine:
add -> move -> move+re-OCR (correctly kept old text when the corrected
area had nothing readable) -> delete -> confirmed gone, repeat delete
404s.

275 tests passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 12:40:07 +02:00
53624d470b fix(docker): remove undefined-variable reconnect that broke all container status/start/stop/restart
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
_docker_get_json/_docker_post called sock.connect(sock_path) a second
time after _docker_connection() had already connected the socket --
sock_path was never defined in either function, so every call raised
NameError. Surfaced in the UI as every engine card reporting "Not
installed" and the Active OCR Engine model dropdown reporting "Not
Found" regardless of what was actually running, found while diagnosing
a user report of that dropdown. Docker socket API calls (list/status/
start/stop/restart) were affected for every engine card, not just OCR.

Added tests/test_docker_client.py, which did not exist before, to
catch this class of regression going forward.

Also records a request to make the magazine ingestion "watching it
work" panel draw detected region boxes live over the page image as
each is classified, instead of today's static page-image-plus-text-
list (TODO.md; no code change for that yet).

254 tests passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 18:14:22 +02:00
531cb50cae docs: list docling, PaddleOCR, DeepSeek-OCR, Qwen3-VL-30B-A3B for OCR-engine evaluation
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
User-requested candidates to install as Docker containers alongside the
existing engines and add through the Engines tab, to be benchmarked
against the two already wired (baidu/Unlimited-OCR, KDL-Frontier-Parser-
nano) for both page-text transcription and open-ended figure/chart
description. No code change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 17:57:31 +02:00
c81ae28da2 feat(magazine): add figure/chart/table description generation and spoken narration
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Adds a "Describe" action per figure in article review: sends the cropped
image to the configured vision engine (with fallback) for a type-aware
one- or two-sentence description -- a chart gets a prompt about what it
measures and its trend, a table about headings and what stands out, etc.
Editable before approval. A new "Read figure descriptions" toggle in the
reading controls speaks these where they occur; purely additive, off by
default, and a figure with no description behaves exactly as before.

New core/magazine.py describe_visual_region()/_chain() reuse the same
reliability guards as page OCR (repetition-loop detection, sentence-
boundary truncation). New routes: POST .../images/{id}/describe
(background job), PATCH .../images/{id} (manual edit), descriptions=1 on
the article-text endpoint.

Live-verified end to end against the ingested c't KI Wissen 2026
magazine. Also found and documented a real, config-dependent limitation:
the currently-configured primary vision engine is transcription-only and
returns empty content for any descriptive prompt (confirmed with three
different prompts) -- not a code defect, but description generation
needs a genuinely caption-capable engine reachable as the fallback.

251 tests passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 17:39:57 +02:00
1a2ea421c4 fix(engines): resolve LiteLLM card's own key server-side instead of a stale global one
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Connect and "Use as LLM" on the LiteLLM Gateway card now resolve that
card's own saved key (engine_api_keys[name]) server-side in
routes/docker.py, ahead of the old global llm_api_key fallback. The
browser can no longer reliably forward a saved key at all -- it's
masked to "__configured__" in every /api/settings response the moment
it's saved -- so relying on a frontend-forwarded header alone left
Connect silently using a stale global key after LiteLLM's own key was
rotated, surfacing a misleading /api/version 404 instead of the real
401.

"Use as LLM" now goes through a dedicated /use-as-llm endpoint that
saves the exact credential Connect just verified (llm_url normalized
to .../v1, llm_api_key copied from the card), rather than a
separately-typed value that could drift again.

Also documents per-user provider-key storage as an explicit item for
the deferred multi-user/identity planning pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 13:58:54 +02:00
4c6f41c831 docs: record work-order priority (Magazine, Character, Audiobook)
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
No code change. User set explicit priority for upcoming feature work:
Magazine reader roadmap first, then the character-identity system,
then audiobook speaker attribution. Recorded in TODO.md so it survives
a context reset. Deployment and the deferred multi-user initiative
stay explicitly parked, not part of this order.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 12:58:01 +02:00
4249382ac6 feat(deploy): stand up correspondence-nuc as a second instance
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
The NFS blocker from TODO.md's deployment entry is resolved (export
set up by the user on the DGX); picks up from there and completes the
deployment end to end.

- Mounted the DGX's TTS_Voices export read-write on the NUC at
  /mnt/dgx-tts-voices, persisted in /etc/fstab -- confirmed writable
  and confirmed the NUC instance sees the DGX's real voice library
  (344 voices), not a separate copy.
- Deployed by rsyncing the working tree from the DGX (excluding .git,
  config/, logs/ and other local-only paths) and building the image
  directly on the NUC, rather than pulling ghcr.io/martin-b78/... --
  that registry copy turned out to be both several versions stale and
  private with no credentials configured on the NUC, and the source
  was already right there to build from.
- Found and fixed a real gap while wiring it up: vision_ocr_url and
  vision_ocr_fallback_url default to host.docker.internal, which
  resolves to whichever host the container is running on -- correct
  on the DGX itself, silently wrong on the NUC (would have pointed at
  the NUC's own nonexistent OCR engine). Pinned both explicitly to the
  DGX's LAN IP via environment overrides.
- The container crash-looped on first start (sqlite3.OperationalError:
  unable to open database file) because docker compose had created
  config/ and logs/ root-owned under this session's root SSH access to
  the NUC, while the image's app user is uid 1000 -- chown -R 1000:1000
  fixed it.
- New docker-compose.nuc.yml, tracked here as the reviewable reference
  for that host (docker-compose.yml stays the DGX's own -- different
  build/network/socket-proxy shape). Deployed to the NUC as its own
  docker-compose.yml, since that host has no .git checkout to diff
  against, only the rsynced tree.

Verified: container stable (no restart loop), HTTP 200, settings
confirm all four engine URLs correctly resolve to the DGX, voice count
matches the DGX exactly, restart policy is unless-stopped.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 10:06:55 +02:00
8e74060394 docs: scope magazine contents-view redesign and legal source browsing
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
No code change. Added to TODO.md:

- Magazine contents view (#s-magazine): logged three candidate layouts
  as open options rather than picking one -- three-column page/text/
  figures, synthesis-state-and-inline-play (the recommended quick win
  under any layout), and a flipbook with content columns underneath.
  Needs a decision before implementation.

- Browsing free PDF magazine sources: the two sites given as examples
  (freemagazines.top, pdf-magazines.org) redistribute current commercial
  titles without licence, so no scraper was built against them. Scoped
  instead against OPDS catalogues, archive.org's public-domain
  periodicals, publisher-run free issues, and open-access journals.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 10:25:12 +02:00
c7b473910a docs: record public multi-user readiness as a deferred cross-app initiative
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Three research passes into what multi-user hosting would require found the
app has zero multi-tenancy today: one global settings/database/voice
library, no browser-UI authentication at all, global (not per-user)
concurrency limits, and no consent/audit mechanism for voice cloning.

The user wants a single shared, interconnected login/profile system across
all their self-hosted apps rather than a per-app login, extending the
GoTrue+Postgres+PostgREST stack OurFlashcards already runs on the NUC — so
this is recorded as a deferred, cross-repo initiative rather than
implemented now. One policy decision was made and is captured for future
implementation: voice cloning will require a consent attestation with an
audit trail once accounts exist.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 22:33:01 +02:00
948c8a453e docs: track NUC deployment as a deferred TODO, blocked on DGX sudo access
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Recorded the exact NFS setup needed on the DGX (export the voice
library read-write, scoped to the NUC's IP) so the app's voice list
never drifts from what the DGX's TTS engine actually has on disk, plus
the accepted cross-host limitation on voice-change auto-restart.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 21:38:17 +02:00
813e06c914 feat: complete magazine P1 (images, play-all, karaoke, driving mode, sidebar exclusion) + OCR engines page + second OCR engine
Magazine P1:
- Images shown automatically during playback (assign_images_to_articles
  links each figure to the article whose column it falls in; the client
  shows the last image reached in reading order as playback advances).
- "Play all articles" queues every approved article and advances
  automatically at the end of each rather than stopping.
- Word-level highlighting, explicitly documented as an ESTIMATE (no
  forced-alignment/timestamp source exists): each word's share of the
  sentence's real measured audio duration is proportional to its
  character length. A checkbox turns it off; sentence highlighting
  (measured, not estimated) is unaffected.
- Driving mode: full-screen overlay, two oversized controls, reuses
  whatever is already playing/queued.
- Sidebars/pull-out boxes excluded from narration automatically
  (mark_sidebars: an anomalously narrow column vs. the page's regular
  grid). Fixed a real defect found while building this: a full-width
  headline was left in the column-width analysis and could bridge two
  genuinely separate columns into one, hiding a real sidebar column
  entirely -- caught by a failing test before the fix.

Second OCR engine + fallback ladder:
- KDL Frontier Parser nano wired in via vision_ocr_page_chain (ordered
  engine list, first usable result wins, tesseract last resort).
  Confirmed live: ~3x faster than Baidu (~12s vs ~40s/page) but returns
  plain text with NO coordinate markers, unlike Baidu's labeled regions.
  _whole_page_region treats the whole response as one ambiguous
  full-page block (gated by ocr_quality_score) rather than discarding
  usable text just because it lacks layout structure.

OCR engines page + a real UI bug:
- The OCR & Document Parsing page had no .s-engines-page[data-page="ocr"]
  markup at all -- renderLocalContainers already supported an OCR grid
  generically, but $('dc-grid-ocr') was always null, so the card grid
  silently never rendered. Added an Active OCR Engine panel mirroring
  Active Language Model exactly, plus the Local grid -- both configured
  engines now appear as ready-made cards, no "Add Custom" dialog needed.
- Fixed the audiobook pipeline's "Previous/Next" nav bar bleeding into
  every .section-head in the document (confirmed live on the Engines
  page: a "Cast Audiobook" button and "STEP 1/8" hint that made no sense
  there). Changed from a blocklist (naming each unrelated section as
  noticed) to an allowlist of the pipeline's three actual destinations.

Verified live end-to-end: play-all queue building and manual advance,
word-span markup, driving-mode toggle, OCR page showing both engines as
local cards, zero stray nav bars on the Engines page, no console errors.

20 new backend tests (156 total in the magazine module).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 23:39:34 +02:00