|
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>
|
||
|---|---|---|
| .. | ||
| audiobook | ||
| tesseract | ||
| ai-backends.js | ||
| audiobook-cast.js | ||
| audiobook-parse.js | ||
| audiobook-pipeline.js | ||
| audiobook-preview-export.js | ||
| audiobook-segmentation.js | ||
| audiobook.js | ||
| benchmark-voice-picker.js | ||
| benchmark.js | ||
| character-columns.js | ||
| character-sheets.js | ||
| characters-library.js | ||
| conversation.js | ||
| dump_state.js | ||
| engines.js | ||
| fishaudio-browser.js | ||
| generation.js | ||
| i18n.js | ||
| image-cache.js | ||
| init.js | ||
| integrations.js | ||
| jobs.js | ||
| library-characters.js | ||
| library.js | ||
| magazine.js | ||
| namespace.js | ||
| reader.js | ||
| rehearser-cast.js | ||
| rehearser-io.js | ||
| rehearser-library.js | ||
| rehearser-parse.js | ||
| rehearser-playback.js | ||
| rehearser-recording.js | ||
| rehearser-stage.js | ||
| rehearser-train.js | ||
| rehearser-training-ui.js | ||
| rehearser-voice-design.js | ||
| rehearser-voice-picker.js | ||
| rehearser.js | ||
| routing.js | ||
| seed-finder.js | ||
| settings.js | ||
| sillytavern.js | ||
| stt.js | ||
| studio.js | ||
| tts-preview.js | ||
| utils.js | ||
| voice-cache.js | ||
| voice-clone.js | ||
| voice-inspector.js | ||
| voice-library.js | ||
| voice-picker.js | ||
| voice-sources.js | ||