Commit Graph

401 Commits

Author SHA1 Message Date
633aede41c Release v1.48.0
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-22 23:00:00 +02:00
0fa042f494 Release v1.47.1
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-22 22:56:06 +02:00
e00103dfb9 Release v1.47.0
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-22 22:15:11 +02:00
bc3f82d975 Release v1.46.0
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-22 21:16:42 +02:00
0e75b24a7a Release v1.45.0
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-22 21:09:29 +02:00
48acbf6e00 Release v1.44.0
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-22 20:54:01 +02:00
94331320c0 feat(magazine): one-click draw tool, table regions, batch approve, MP3 export, remove-all-boxes
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Bundles this session's magazine review work: a single "Draw region" tool
replacing six preset-kind buttons; "Table" as a real, non-narrated region
type; uniform auto-OCR for every text-like drawn/re-read region with a
Tesseract fallback when the vision OCR backend is unreachable; a thumbnail
grid view and inline title editing for the article list; batch
approve/reject; standalone MP3 export with embedded title/author/album,
lyrics and cover art (adds mutagen); "Remove all boxes" for starting a
tangled page from scratch; Approve advancing straight to the next article;
a merged, sticky review toolbar; and a fix for stale image previews after
resizing a region's box.

Also fixes several character-portrait rendering biases confirmed live
across this session's DSA audiobook cast (routes/conversation.py): modern
or bald/receding hair regardless of established coverage, armored women
rendering masculinized, duplicated/malformed weapons, a ranged weapon
rendering as a firearm due to a German compound-word regex miss, an
established dwarf rendered with human proportions, and occasional extra
hands or lost non-human species in scene panels.

See CHANGELOG.md [1.43.0] for the full list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 20:14:11 +02:00
197696e653 fix(magazine): show pictures, charts and tables clearly in the import preview
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 02:30:51 +02:00
6384530dc6 fix(magazine): top-align the page in the import preview
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 01:14:58 +02:00
1edc941dbf feat(magazine): live region boxes in the import preview; interrupted imports no longer spin for ever
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
The preview carries each page's regions (percent of the page, type, reading
order) for the reading pass and the labelling pass, drawn over the page image
with a legend. A server restart that killed the import left it "running" for
ever; the status route now reports it as failed. v1.42.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 01:09:12 +02:00
703052d1d2 fix(magazine): adding a region crashed after a byline split; undo could roll back later changes
original_text is now a Block field, so paths that rebuild blocks keep it
instead of crashing. Undo snapshots are sealed with a digest of the saved
state and refused once anything else changed; actions without their own undo
point clear the Undo button. v1.41.1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 00:50:33 +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
5009f388e7 fix(magazine): approve failed with unknown block ids after deleting or converting a region
The review selection now follows deletes, merges, splits and text-to-image
changes; approve sends only existing ids and no longer overwrites the image
list with a stale one; deleting a region removes it from articles. v1.38.1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 12:22:20 +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
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
981341de3f feat(characters): check every render, retry with a new seed, and take the sheet's face from the profile
The job checks the portrait crop, then the turnaround, story panel and
same-person against the sheet, re-renders on failure (up to 3 attempts) and
keeps the attempt with the fewest faults. ReActor transfers the profile's face
onto the turnaround and the largest face in the story panel. If the checker is
down, retries stop and the pair is marked unverified. The outcome is saved
with the pair and shown on the character page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 10:32:47 +02:00
5852d7a2d5 feat(engines): searchable dropdown for the Active LLM and OCR model pickers
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 16:19:26 +02:00
4ab345d1c1 fix(audiobook): warm the model before span cast/verify; keep tests off the real LLM
A cold-booting model server would otherwise time out the first passage into tag guessing.
Documents that the custom attribution prompt applies to the classic engine only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 21:08:01 +02:00
75e452fdfc fix(audiobook): route the Verify menu action to the advisory second pass
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 20:55:39 +02:00
f34266c0d2 feat(audiobook): calibrate span-cast confidence on pass agreement
Pooled over three hand-corrected novels (~54k spoken words): agreed 82% right, disputed 48%,
Unknown ~0%, unverified ~76%. The old heuristic bands claimed 16% for lines that were 62% right
and tag/role signals did not discriminate in span casts; classic casts keep the old model.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 20:41:25 +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
e3d6cb2cca feat(magazine): fix Edit boxes, add spread view, searchable narrator picker and Prepare audio
- fix: Edit boxes and page-nav controls were dead clicks (handlers never exported
  to root); resize from any edge/corner instead of only bottom-right
- feat: two-page spread in review (page images above, OCR lists beneath)
- feat: searchable voice picker for narrator and podcast hosts
- feat: Prepare audio synthesises the whole article ahead of playback; playback
  also stays three sentences ahead
- fix: sync index.html cache-busting version with VERSION (was stuck at 1.26.12)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 23:10:16 +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
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
96b0b9dd71 fix(magazine): finish and harden the live ingest preview
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Resumes an in-progress, uncommitted change from a previous session: the
live "page image + recognised text" preview shown during ingestion was
reworked to render formatted HTML (styled headings, a figure
placeholder) instead of a plain-text dump, but was left with a
duplication bug, dead code, inline styles, and no tests.

- Fixed duplication: a figure block's own transcribed text (usually its
  on-screen UI copy) was rendered as an ordinary paragraph in addition
  to the new figure placeholder box. Figure/chart/table/code blocks are
  now represented only by the placeholder.
- Furniture/sidebar/pullquote/ad text is shown muted instead of being
  dropped with no replacement, and is never promoted to a heading
  regardless of font size.
- Factored the formatting logic out of the progress closure into a
  standalone, unit-tested _render_ingest_preview_html().
- Replaced dead getattr(bbox, "y0", ...) calls (bbox is always a plain
  [x, y, w, h] list) with direct indexing, moved statistics/logging
  imports to module level, switched manual character replacement to
  html.escape(), and bounded the preview by an accumulated line budget
  instead of a blind slice that could truncate mid-tag.
- Replaced inline style="..." with CSS classes matching the panel's
  existing dark console treatment.
- The frontend now always uses innerHTML (every text node is escaped
  server-side), dropping the startsWith('<') content-type sniffing.
- Marked the preview panel aria-hidden -- decorative, and would
  otherwise churn noisily for screen reader users on top of the
  adjacent progress bar.

Verified against the real c't KI Wissen 2026 layout: a figure's raw
OCR text no longer appears twice, a real headline renders as <h3>, a
footer/pull-quote render muted, and all text is correctly escaped.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 15:24:16 +02:00
55f147d7a7 fix(magazine): derive figure boundaries from the page render
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
A vision OCR engine grounds a figure far less precisely than it
transcribes one. Over all 138 figure regions of a 204-page issue the
transcribed contents were right while the boxes were routinely offset,
undersized, or sitting on the neighbouring text column -- page 23's card
grid was reported at x 0.24-0.54 where the graphic runs 0.41-0.95.

snap_visual_bboxes() reduces the page render to an ink-coverage grid,
seeds a connected-component search with the engine's box, and re-joins
tiles a gutter apart so a card grid comes back as one figure. Text
blocks are excluded from the mask, which is what stops a figure
swallowing the column beside it. A candidate must be solidly inked or
framed on nearly all of its rows and columns (admitting a white-interior
screenshot), may not shrink below 30% of the seed, and reverts when two
figures land on the same graphic; anything else keeps the box it had.

Runs before the figure crop in both OCR paths, so the images shown
during playback are framed correctly too. Replaces refine_picture_
bounds(), which only recognised coloured panels and had no text fence.

Also adds "Fix figure boundaries" in review and POST
/api/magazine/{id}/figures/refine behind it, so an issue ingested before
this pass can be corrected without re-running OCR. Verified live against
c't KI Wissen 2026: 78 of 138 boxes corrected, the rest declined.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 10:17:00 +02:00
a4b7c18a2f Fix magazine dropzone upload button and finalize side-by-side layout 2026-09-10 17:44:37 +02:00
c1a2d6dc74 Release v1.26.14: Studio-style side-by-side Magazine upload layout with Durchsuchen button
Some checks failed
Test and SonarQube / quality (push) Has been cancelled
2026-09-10 14:45:00 +02:00
30e01a5cec Release v1.26.13: Fix drag-and-drop file opening in tab & improve magazine dropzone reliability 2026-09-10 14:31:16 +02:00
11142842c2 Release v1.26.12: Fix page-wide drag-and-drop interception & magOnShow navigation hook
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-10 13:22:26 +02:00
f5f887bb1d Release v1.26.11: Enhanced layout-aware OCR element recognition, grounding parsing, and preview thumbnails
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-10 13:08:53 +02:00
29dc913ed1 Release v1.26.10
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-10 12:50:33 +02:00
e6211f1333 Release v1.26.9
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-10 12:45:42 +02:00
9b1e29bb79 feat: automate semantic magazine layout
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-09 17:48:56 +02:00
f8af18e8f7 fix: release current magazine UI assets
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-09 17:40:25 +02:00
31b13a4e16 feat: improve magazine review navigation
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-09 17:36:27 +02:00
c1d86ec13d fix: return All magazines to library
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-09 17:14:27 +02:00
272d4872bd fix: use native Unlimited-OCR layout regions
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-09 13:27:14 +02:00
b43bacc275 chore: add local maintenance utilities
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-09 07:53:13 +02:00
037f3dd74d fix: stabilize OCR and character sheet casting
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-09 07:51:59 +02:00
b7aade39db Release v1.26.1
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
2026-09-08 23:39:44 +02:00
85080f4b82 feat: add live ingest preview, region icons/ownership badges, manual region drawing to magazine review
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Ingestion now streams each page's image and recognised text into a
console-styled preview panel (Baidu Unlimited-OCR demo style) as pages
finish, instead of a bare progress bar -- raw text is written to a
per-job ingest_preview.json file since the background-job result field
strips text-like keys for data minimization.

Split-screen review boxes and their matching list rows now show a
centred icon for the region's kind and, when a region on a shared page
belongs to a different article, a badge naming that article, so a
claimed region is never mistaken for unclaimed text.

Added a "Draw it" mode: click-drag a box directly on the page image to
add a region the layout engine missed, as typed/OCRed text or as a new
figure (add_manual_region, POST /api/magazine/{doc_id}/pages/{page}/regions).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 18:52:21 +02:00
5adba6b4c0 feat: split-screen article review with numbered regions, per-page/whole-magazine "OCR again", and a real column-interleaving fix it found
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
Split-screen review: the rendered page (left) with a numbered box per
detected block, the extracted text (right) with matching numbers.
Clicking either side highlights the other. Checkboxes moved from a flat
list into this layout without changing their semantics (still gate
what gets narrated).

"OCR again": reocr_page() forces one page through the configured
vision engine again, replacing only that page's blocks -- deliberately
does NOT call build_articles(), so an already-approved article is not
silently re-grouped. A magazine-level option re-reads every page and
re-runs detection (with a confirmation, since that does reset article
status). extract_pages() gained force_vision_ocr to skip its quality
gate for this case.

Building the numbered-box review immediately did what it was built to
do -- surfaced a real bug on live production data (real magazine, real
scan, not a synthetic fixture): a photo caption at 49.9% of the page
width sat in the gutter between two genuinely separate columns and
merged them into one, so every block on the page came back column=0
and reading order fell back to pure top-to-bottom, interleaving the
two columns' sentences. Fixed two compounding causes: column boundary
detection now excludes blocks much wider than the page's median width,
and detect_columns' gutter threshold (3.5%) was itself narrower than
some real magazine gutters (~2.1% measured) -- lowered to 1.5%.

10 new/updated tests, including one built directly from the real
measured page-17 block coordinates that exposed the bug.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 14:00:34 +02:00
e81fa64448 fix: magazine state persistence, misfiled in book library, confidence badge layout, docker-socket-proxy crash loop
Magazine "forgets" the open document (real bug, confirmed live):
- A full page reload or the browser's own Back button tears down all
  in-memory JS state; magInit() always defaulted to the empty library
  view with no way back to what was open. Persists the last-opened
  magazine id in localStorage and auto-reopens it on load, falling back
  to the library only if that document no longer exists.
- The actual root cause of the reported duplicate: readerRenderLibrary()
  (Studio/Reader "Source") and libraryRenderBooks() (Library > Books)
  both listed EVERY document from the shared reader_library store with
  no kind filter, so a magazine (kind: "magazine") was already showing
  up there disguised as a plain book. The magazine never actually
  vanished -- it was misfiled in a different list, which is what led to
  the user re-uploading it and getting a real duplicate under a
  different kind. Both listings now exclude kind: "magazine".

Confidence badge layout (Studio Characters review):
- The badge (radiobox is already positioned after the speaker name in
  DOM order) rendered on its own line far below the name because both
  .ab-cv-spk and .ab-cv-txt were `display: block`, forcing a line break
  regardless of markup order. Wrapped the name + badge + check button in
  a shared flex row (.ab-cv-spk-row) so the badge now sits directly
  beside the name/after "NARRATOR" as requested, without needing to
  touch the two existing incremental-patch code paths (they insert
  relative to the same elements, now just nested one level deeper).

docker-socket-proxy crash loop (found while restarting for the magazine
Python changes to take effect -- unrelated to this session's earlier
work, landed in an earlier commit during the interruption):
- read_only: true left the entrypoint with nowhere to write its own
  haproxy.cfg ("Read-only file system"), crash-looping the container and
  leaving the app without Docker access. Removed read_only for this one
  service -- cap_drop: ALL, no-new-privileges, and the :ro socket mount
  already provide the real hardening.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 09:39:20 +02:00
3c210df8a4 fix: magazine dropzone opened the file in the browser instead of accepting the drop
Two real bugs, both confirmed live:

1. dragover's preventDefault() was gated on dataTransfer.types including
   'Files' -- during a real OS file drag, Chromium does not reliably
   populate that list synchronously on every dragover event, so the
   condition failed often enough that preventDefault was silently
   skipped. Per the HTML5 DnD spec, an element only becomes a valid drop
   target once dragover (and, in some browsers, dragenter) has been
   cancelled -- without that, the browser falls through to its native
   "open the dropped file" behaviour, which is exactly what was
   reported. Removed the gate entirely; dragenter is now also handled,
   not just dragover.

2. No page-wide safety net existed, so a drop landing even slightly
   outside the dropzone element bubbled to the browser's default action
   uncontested. Added a window-level dragover/drop preventDefault
   installed once regardless of which section is active.

This also explains the "no hover highlight" symptom: the same
gated-preventDefault bug meant dragover never reliably reached the
class-toggle code either.

Verified live: dragenter/dragover/drop each report defaultPrevented,
the highlight class appears on dragenter and clears on drop, the
dropped file populates the hidden input, and a drop dispatched directly
on <body> (simulating one that misses the zone) is also intercepted by
the new window-level guard.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 00:11:54 +02:00
5b0c8e0bf5 feat: add drag-and-drop dropzone to the magazine upload form
Replaces the plain <input type="file"> with the same reader-dropzone
component the Book/Source screen already uses (reused CSS, no new
styles needed beyond grid/layout adjustments) -- drag a PDF onto the
zone or click "Choose file", both paths route through the same hidden
input magCreate() already reads via a DataTransfer handoff, so no other
logic needed to change. Shows the chosen/dropped filename in place of
the default hint text, and resets it after a successful add.

Verified live: click-to-choose and a simulated real 'drop' DragEvent
both populate the file input correctly, dragover highlighting toggles,
no console errors from the app itself.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-07 00:03:01 +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
71a398b82f feat: add magazine reader frontend (P1)
Studio -> Magazines: library, contents tree grouped by section with
confidence/pages/listening-time/audio status, the Stage D review
screen (tick/untick layout blocks, correct title/author, approve or
reject), a reflowed article view with click-to-seek sentence
highlighting, a linked original-page view showing the source bounding
box, and a podcast panel (2-3 host pickers, script generation,
turn-by-turn playback).

Wired into the existing lazy-module system (module-manifest.json,
loader.js, nav.js) rather than a separate app. Reuses /api/tts-preview
for both narration and podcast turns -- no new audio pipeline.

Fixes found building this:
- The pane toggle used role="tab" without the full ARIA tabs pattern
  (aria-selected, roving tabindex, arrow-key nav) -- fails WCAG 2.2 AA
  and hid the buttons from role-based tooling. Replaced with a button
  group + aria-pressed, matching the plain-click interaction it
  actually has.
- Print layout cues ("(continued on page 8)") were being sent to TTS
  verbatim -- narration would have spoken the parenthetical aloud.
  Stripped from the narration copy only; layout.json keeps the
  original for the review screen.
- has_podcast now comes from the articles listing so opening an
  article without a generated script skips a doomed GET instead of a
  routine 404 on every open.

Verified against the real API contract with Playwright (library,
review pre-selection, approval, sentence highlighting + PDF-page
linking, podcast approval gate, zero console errors across the flow)
and manually end-to-end against a real ingested fixture, screenshots
included. Full suite: 94 Python tests, 33/34 desktop Playwright tests
(one unrelated pre-existing flaky DOM-count assertion).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 15:00:58 +02:00
6553d5003d fix: preserve custom OCR engine cards 2026-09-05 08:11:57 +02:00
60ef436ce1 feat: add OCR engine profiles 2026-09-04 22:29:11 +02:00
2caa417401 fix: preserve audiobook dialogue boundaries 2026-09-04 15:36:26 +02:00
18e586d06f refactor: scope conversation state 2026-09-04 13:42:02 +02:00
417d7215d2 refactor: scope i18n state 2026-09-04 13:40:07 +02:00
ee4208ec51 refactor: scope cast compatibility modules 2026-09-04 13:38:40 +02:00
542f44fbb8 refactor: scope seed finder 2026-09-04 13:36:55 +02:00
10f618c179 refactor: scope character columns 2026-09-04 13:35:10 +02:00
d2a8dd43b4 perf: tighten character pagination 2026-09-04 13:31:18 +02:00
7938f9ca74 refactor: scope frontend utilities 2026-09-04 13:27:43 +02:00
d055596504 refactor: scope voice inspector 2026-09-04 13:25:13 +02:00
67ee55d3ac refactor: scope character library 2026-09-04 13:23:54 +02:00
73f8f92826 refactor: scope character sheets 2026-09-04 13:21:31 +02:00
e5bd2a149f refactor: scope voice library 2026-09-04 13:19:52 +02:00
1b7d6b2346 refactor: scope generation module 2026-09-04 13:15:30 +02:00
ababdf6741 refactor: scope stt module 2026-09-04 13:13:10 +02:00
c53c47ce2d refactor: scope ai backends 2026-09-04 13:10:51 +02:00
716e601fac refactor: scope integrations module 2026-09-04 13:06:59 +02:00
3fffae9015 refactor: scope combined library 2026-09-04 13:04:46 +02:00
260c5c22a7 refactor: scope engine support 2026-09-04 13:02:29 +02:00
b747553bf6 refactor: scope routing module 2026-09-04 13:00:10 +02:00
28c72c76dd refactor: scope voice sources 2026-09-04 12:57:53 +02:00
d219aec676 refactor: scope voice clone 2026-09-04 12:55:50 +02:00
998a65f2ba refactor: scope tts preview 2026-09-04 12:53:44 +02:00
656d0473d4 refactor: scope settings module 2026-09-04 12:51:29 +02:00
8002ca1d75 refactor: scope character library 2026-09-04 12:49:22 +02:00
0e615d52de refactor: scope studio module 2026-09-04 12:47:30 +02:00
ac55cd88a3 refactor: scope rehearser cast 2026-09-04 12:44:58 +02:00
df95ada578 refactor: scope rehearser voice design 2026-09-04 12:44:08 +02:00
0f3d410260 refactor: scope rehearser voice picker 2026-09-04 12:43:11 +02:00
dea1de5c57 refactor: scope rehearser stage 2026-09-04 12:42:22 +02:00
da3957347c refactor: scope audiobook network 2026-09-04 12:41:35 +02:00
7ee5f65e00 refactor: scope rehearser library 2026-09-04 12:40:56 +02:00
0ee43421b7 refactor: scope reader module 2026-09-04 12:40:09 +02:00
66c5dd6e0c refactor: scope audiobook core 2026-09-04 12:37:37 +02:00
c6db55e55b refactor: scope rehearser core 2026-09-04 12:33:55 +02:00
6c62a0f75e refactor: scope rehearser recording 2026-09-04 12:31:03 +02:00
3a7f0bf677 refactor: scope rehearser io 2026-09-04 12:30:13 +02:00
a202230654 refactor: scope rehearser playback 2026-09-04 12:29:19 +02:00
cc4fc4ae2e refactor: scope audiobook state modules 2026-09-04 12:26:21 +02:00
2aca152fe8 refactor: scope training ui module 2026-09-04 12:23:03 +02:00
302dbe1279 refactor: scope pure frontend leaves 2026-09-04 12:20:33 +02:00
cefd4bd494 refactor: extract rehearser training mode 2026-09-04 12:12:11 +02:00
0c7cc04643 refactor: extract rehearser recording 2026-09-04 12:10:00 +02:00
ba7b3115b9 refactor: extract audiobook preview export 2026-09-04 12:05:50 +02:00
76421dfe88 refactor: extract audiobook casting pipeline 2026-09-04 12:04:05 +02:00
eaf2f29d62 refactor: extract rehearser io 2026-09-04 12:01:38 +02:00
f97fd60e43 refactor: extract rehearser playback 2026-09-04 11:59:09 +02:00
e096b3e529 refactor: wire audiobook namespace APIs 2026-09-04 11:54:56 +02:00
6f2c0b7b3d refactor: extract audiobook cast view 2026-09-04 11:53:04 +02:00
262e37fffd refactor: extract rehearser voice matching 2026-09-04 11:47:51 +02:00
eb008475ed refactor: extract rehearser cast renderer 2026-09-04 11:39:45 +02:00
ae9df4f7f0 feat: distinguish provider configuration and health 2026-09-04 11:35:52 +02:00
7c14f41cb9 refactor: extract audiobook speaker normalization 2026-09-04 11:32:20 +02:00
0d1299b19c refactor: extract audiobook cast cleanup 2026-09-04 11:30:12 +02:00
1951ce0646 refactor: extract audiobook dialogue merging 2026-09-04 11:27:49 +02:00
41349867a1 refactor: extract audiobook cast normalization 2026-09-04 11:25:52 +02:00
0876527554 refactor: extract audiobook quote segmentation 2026-09-04 11:22:15 +02:00
2fde0a176d refactor: extract rehearser voice design 2026-09-04 11:19:01 +02:00
c0ac5dd775 refactor: extract audiobook cast serialization 2026-09-04 11:08:49 +02:00
d3bc806f33 refactor: extract rehearser training comparison 2026-09-04 11:06:23 +02:00
d613591526 refactor: extract rehearser cast controls 2026-09-04 11:04:13 +02:00
ed3b2d42cd refactor: publish feature APIs through TTVC 2026-09-04 11:00:22 +02:00
66ebd1a8b8 refactor: extract audiobook parsing primitives 2026-09-04 10:56:31 +02:00
0bfb6d694b refactor: extract rehearser voice picker 2026-09-04 10:54:21 +02:00
e98c5ffe33 refactor: extract rehearser stage controls 2026-09-04 10:52:05 +02:00
2712843322 refactor: extract rehearser library persistence 2026-09-04 10:46:02 +02:00
c815b7941a feat: expand resource diagnostics 2026-09-04 10:42:08 +02:00
8d7511cdbf test: measure constrained character workloads 2026-09-04 10:34:27 +02:00
4b01a853fb perf: bound browser library image cache 2026-09-04 10:28:07 +02:00
0f1d93c9df perf: bound rehearser audio cache 2026-09-04 10:11:44 +02:00
bf186387f9 perf: coalesce voice library fetches 2026-09-04 10:10:10 +02:00
55d0dd1012 refactor: add frontend namespace migration bridge 2026-09-04 10:07:46 +02:00
aa8a96c48f feat: add safe retries for background jobs 2026-09-04 09:58:45 +02:00
6ca044ef64 feat: validate canonical image asset digests 2026-09-04 09:53:50 +02:00
90e74149d9 feat: add constrained-device resource diagnostics 2026-09-04 09:51:49 +02:00
690673625d feat: persist background job result artifacts 2026-09-04 09:48:37 +02:00
b648bbdf0b feat: add safe background job history panel 2026-09-04 09:44:31 +02:00
0fd39d4acb test: cover profile completeness counting 2026-09-04 09:33:45 +02:00
a7a6bb1cdc feat: add visual pair review workflow 2026-09-04 09:20:27 +02:00
d03c9841e9 test: cover constrained browser concurrency 2026-09-04 08:59:09 +02:00
fbb5fc52dd fix: stabilize async library navigation 2026-09-04 08:58:01 +02:00
3456b5a3b0 feat: support character appearance forms 2026-09-04 08:51:33 +02:00
0b51a76c21 fix: flag inconsistent current image pairs 2026-09-04 08:39:01 +02:00
cb653d15d0 perf: reduce library pages on low memory devices 2026-09-04 08:35:18 +02:00
4ffe6e9012 feat: add consistent image job cancellation 2026-09-04 08:34:35 +02:00
47d6a5d247 fix: release local preview object URLs 2026-09-04 08:11:32 +02:00
e52d462dac perf: paginate large voice libraries 2026-09-04 08:05:09 +02:00
b5d2e773d8 perf: paginate large character productions 2026-09-04 08:01:29 +02:00
9517cca00c feat: detect stale character image identity 2026-09-04 07:59:17 +02:00
94f09c110d feat: version character visual identity 2026-09-04 07:58:16 +02:00
c6ce3e4803 security: keep provider credentials server-side 2026-09-04 07:50:30 +02:00
a8f8779736 Release v1.22.3 2026-09-04 07:28:26 +02:00
fe807d1682 Release v1.22.2 2026-09-03 16:12:02 +02:00
c9d063d0c7 Fix character profile view missing fields (Race, Age, Languages, Nationality, Class) 2026-08-23 12:18:08 +02:00
882e1ede55 Fix audiobook export modal bindings and position for SPA routing 2026-08-23 11:58:36 +02:00
ee17ed97d1 Fix audiobook export modal visibility and eliminate 4-10s TTS delay for narrator blocks 2026-08-23 11:45:20 +02:00