9 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
fa9d7aba70 Merge pull request #2058 into validated PR integration 2026-10-29 00:56:13 +08:00
Rudy Celekli
cbed908f6a fix(textbook_struct): keep the higher-page chapter hit when deduping
_dedupe_keep_last documents 'keep the body hit (higher page)', but both
branches assigned by_title[title] = chapter unconditionally, so it actually
kept the last occurrence in list order. rebuild() iterates layout['pdf_info']
without sorting (unlike the sibling rebuild_from_headers_level, which sorts by
page_idx), so when pdf_info is not ascending the TOC hit (lower page) could be
listed last and win — giving the chapter the TOC start page and a wrong page
range. Compare page_idx and keep the higher one.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-26 10:52:35 -04:00
Rudy Celekli
7842bafc0e fix(textbook_struct): keep two-char 单元 chapter token intact
The running-header normalizer's unit group used the character class
[课章节单元], which matches a single character. A 单元 (unit) token was
split: only 单 was captured and the orphaned 元 leaked into the chapter
name, so 第1单元 导论 normalized to 第1单 元 导论. The malformed title then
failed UNIT_RE_MAP[单元] matching, dropping header-embedded 单元 chapters
during rebuild. The function docstring already promises the canonical
第N单元 章名 shape. Match the two-char token first: 单元|[课章节].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-26 10:21:21 -04:00
Bingxi Zhao (Frank)
a053fecf6e release: v1.6.11
The interface ships in French and Ukrainian alongside English and
Chinese, and /language pins a reply language for one conversation.
Immersive reading organizes collections as colored folders, adds a
fullscreen learning mode, and turns Explain / Translate / Guide me on a
selection into ordinary messages in the reading chat; "Quiz me on this
page" runs one quiz turn without changing the conversation's mode, which
retires the reading-openers endpoint and its task model. Images embedded
in DOCX, PPTX and PDF are extracted in place and reach vision models.

Office files preview as paged PDFs through LibreOffice (now in the Docker
image), falling back to the in-browser renderers without it. Web sources
re-sync on a durable schedule, linked folders sync on demand, .bib files
index, and a zotero_search tool queries Zotero. Settings gains Learning
progress and credential-free presets; admins import users from CSV;
split deployments can hand a session to a public device. Grok CLI joins
the subagents, Unifically the providers, ChatGPT exports the importers.

Gate cleanup: mypy/bandit findings in the new launcher, audio-overview,
web-source, reading-store and textbook modules; the task-model copy test
follows the retired reading_openers kind.

See assets/releases/ver1-6-11.md for the full notes, and the README
Releases row plus its eleven translations.
2026-09-24 09:59:56 +08:00
Bingxi Zhao (Frank)
98529ad0c7 fix(chat, text): replay the visible failed turn and retain repeated section titles 2026-09-23 11:03:23 +08:00
Bingxi Zhao (Frank)
ad958a5cd7 fix(textbook): retain shared boundary pages in chapter spans 2026-09-23 10:44:09 +08:00
Bingxi Zhao (Frank)
c323516312 fix(textbook): expose header rebuild and preserve final page range 2026-09-23 10:38:16 +08:00
interia
4a01a8cffc feat(textbook): rebuild chapters from running headers embedded mid-text
Some publishers print the chapter name embedded mid-text in the running
header (e.g. "集合第1章", "空间向量与立体几何 第6章"), often without a
leading "第", while the footer only carries the publisher name — a
footer-only pass then finds zero chapters.

page_facts() now reads chapter-shaped furniture from both positions:
footer blocks matching CHAPTER_RE verbatim, and header blocks whose
chapter token sits mid-text, extracted via HEADER_CHAPTER_RE and
normalized to the canonical "第N章 章名" shape by
normalize_header_chapter() (bare token / name-before-token /
name-after-token forms; book titles, token-less headers and long prose
are rejected as boundaries). Both channels share the existing level
filter and seen-dedupe; the printed-page offset check verifies boundary
correctness end to end. Covered by 9 new tests including two-level
running-header unit filtering and offset constancy.
2026-09-11 13:30:58 +08:00
interia
0b6d5be583 feat(textbook): add textbook_struct chapter-rebuild core (footer path)
Deterministic, zero-LLM chapter tree extraction from MinerU layout.json:
column blacklist -> chapter regex -> page-top position band -> adjacent
merge, plus a header/footer path that reads the running chapter title and
the printed page number from discarded page furniture. Nothing in this
package imports deeptutor.
2026-09-11 13:28:42 +08:00