40 Commits

Author SHA1 Message Date
SteeleHu
1985ed4f6b feat(providers): integrate Ark embeddings, Doubao Custom search and PaddleOCR (#1015)
* feat(embedding): add Volcengine Ark multimodal embedding provider

Add a volcengine binding to the embedding provider registry backed by a new
VolcengineEmbeddingAdapter. The adapter talks to the Ark multimodal endpoint
(/api/v3/embeddings/multimodal), which serves doubao-embedding-vision-*
models for both plain text and image/video content. Each input item is
embedded in its own request because the service fuses all items into one
vector; the optional dimensions knob is passed through, and 429/5xx
responses are retried with backoff.

- embedding_endpoint: add volcengine endpoint constants and per-model
  routing helpers (multimodal vs OpenAI-compatible text surface)
- provider_runtime: register the volcengine spec (default model
  doubao-embedding-vision-251215, 2048 dims, multimodal) and resolve the
  per-model endpoint in the runtime config

* feat(search): add Doubao Search Custom provider

Add a DoubaoSearchCustom provider speaking the feedcoopapi SERP protocol
(open.feedcoopapi.com/search_api/web_search) used by the Doubao Search
Custom API-key console product. This is a standalone SERP surface, distinct
from the existing Ark Responses-API doubao provider, so consolidation
supplies the answer (supports_answer=False).

Maps WebResults rows (Title/Snippet/Summary/Url/Content/PublishTime) onto
the standard SearchResult/Citation shapes, with SearchType web/web_summary
and NeedSummary/NeedContent filters.

* feat(parsing): add PaddleOCR cloud document parsing engine

Add a PaddleOCR (飞桨) engine to the document-parsing registry. It parses
PDFs and images through the PaddleOCR AI Studio cloud API
(paddleocr.aistudio-app.com/api/v2/ocr/jobs, PaddleOCR-VL-1.6), the same
backend the official paddleocr-mcp server uses — no local models or GPU.

- New engines/paddle package: PaddleParser (Parser protocol) + cloud
  backend implementing submit -> poll -> JSONL -> markdown (+ image
  download), with a Settings test-button credential check
- runtime_settings: register the paddle engine slice (constants, defaults,
  normalize, loader) and add a _coerce_float helper
- factory: register the paddle loader + UI metadata
- tests: extend engine-set assertions for the new engine

* fix(rag): disable NLTK CWD-import security hook for venv-in-root installs

NLTK 3.10+ installs a CWE-427 meta-path finder (nltk.inisec) that blocks
`import regex` whenever the module resolves inside the process CWD.
DeepTutor keeps its virtualenv inside the project root, so site-packages
always sits under the CWD and every NLTK-initiated `import regex` is
blocked, breaking LlamaIndex sentence tokenization during KB indexing
("Blocked import of regex from current working directory for security
reasons").

The project root is the user's own code, not an untrusted directory, so
the hook's protection is unnecessary; disable it via the official
NLTK_DISABLE_IMPORT_SECURITY switch:
- deeptutor/__init__.py sets the env default before any NLTK import
- launcher.py forwards it to spawned backend processes

* fix(ima): list cloud documents in the Knowledge Center file browser

Connected IMA KBs are cloud pointers with no local raw/ directory, so the
GET /{kb}/files endpoint returned an empty listing and the Knowledge
Center showed no files even though retrieval worked. Serve the listing
from IMA's get_knowledge_list instead: walk the library breadth-first
(mirroring the inventory reader's budget) and flatten folders into POSIX
paths for the existing file tree.

Also teach the IMA payload parser to recognize folders listed as
media_type 99 / media_id "folder_*" inside knowledge_list — previously
they were misrouted as content-less documents, polluting inventory and
retrieval results.

* fix(ima): serve cloud document content for preview and download

The Knowledge Center file list now carries each IMA document's media_id,
and the raw-file endpoints accept it: preview/download stream the content
from IMA (note text directly, file media from the short-lived COS link)
instead of 404ing on the missing local raw/ directory. The office-text
preview endpoint follows the same path.

Refactor the listing's inline client construction into _ima_client_for_kb
so listing, preview, and text preview share one resolution path. Add
router tests covering the listing media ids, binary/text content serving,
text preview, and the 404 degradation for unavailable media.

* fix(server): use the telemetry logging API supported by FastAPI

* feat(search): register the dedicated Doubao Custom search provider

* feat(parsing): add the hosted PaddleOCR document engine and settings

* fix(settings): localize the PaddleOCR panel title

* Keep parsing translations with existing document engine settings

* fix(settings): register the Doubao Custom provider branding

* fix(i18n): cover the new settings and figure labels in supported locales

* fix(setup): offer Doubao Custom search in the CLI wizard

---------

Co-authored-by: SteeleHu <SteeleHu@users.noreply.github.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-12-04 15:13:49 -05:00
Gao Chenkai
0c10954744 feat(chat): present verified knowledge-base figures in live and replayed messages (#1268)
* feat(rag): show LlamaIndex source figures in chat

Freeze parsed document images into the index version, return them on retrieval, and render citation thumbnails so STEM diagrams stay with the answer.

Fixes #1249

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(server): use the telemetry logging API supported by FastAPI

* fix(i18n): cover the new settings and figure labels in supported locales

* perf(chat): load RAG figure cards only for turns with source events

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-12-04 15:03:49 -05:00
Bingxi Zhao (Frank)
33d640bc8d feat(web): refine model selector reasoning controls, ModelGo promo card, and locales 2026-12-03 06:55:58 -05:00
Bingxi Zhao (Frank)
bcf8cffb3d fix(i18n): sync partner scheduled-task locale keys and regenerate API contracts 2026-12-03 05:22:47 -05:00
yuzhef
07e90555b1 feat(partners): open scheduled task descriptions from chat 2026-12-03 05:21:16 -05:00
yuzhef
322e85130e fix(partners): show scheduled triggers as chat events 2026-12-03 05:21:16 -05:00
Botong
b86f06e906 feat(i18n): refine Traditional Chinese terminology and activate zh-tw across web, desktop, and backend
Complete full-stack activation of Traditional Chinese (zh-tw) on top of #3064 and #3065:

- Review and refine 683 app.json entries and 9 common.json entries in web/locales/zh-tw/ for Taiwan Traditional Chinese terminology (fixing OpenCC s2twp artifacts and mainland variants such as 許可權→權限, 賬號/賬戶→帳號/帳戶, 回撥→回呼, 自定義→自訂, 閘道器→閘道, 例項→實例, 只讀→唯讀, 憑據→憑證, 服務端→伺服器端, 配置檔案→設定檔, 地址→位址, 埠→連接埠, 映象→映像/鏡像, and curly quotes→「」) while keeping every key, placeholder, code span, and URL intact.
- Add language.chinese_traditional ("繁體中文") across all 14 web locale catalogs (and portuguese_unchanged_ui.json).
- Register zh-tw in web/i18n/languages.ts (preserving zh-tw/zh-hk/zh-mo/zh-hant before zh), dynamic loader web/i18n/init.ts, and web/lib/datetime.ts (zh-TW).
- Add complete Traditional Chinese Desktop shell copy in apps/desktop/src/i18n.mjs and register zh-tw in apps/desktop/src/main.mjs with zh-tw/zh-hant normalization.
- Wire zh-tw into backend deterministic copy and settings: settings_spec.py, runtime/banner.py, services/i18n.py, book/overview_copy.py, book/export.py, book/language.py, api/routers/quiz_judge.py (+ router_index.json), and zh-hk/zh-mo/zh-hant/繁體中文 handling in interface_languages.py and interface_settings.py (_normalize_response_language).
- Add full-stack regression coverage in tests/i18n/test_traditional_chinese_locale.py, apps/desktop/test/i18n.test.mjs, web/tests/language-preferences.test.ts, web/tests/account-role.test.ts, and tests/book/test_overview_copy.py.

Related to #2933
Related to #684
2026-12-03 04:43:27 -05:00
Bingxi Zhao (Frank)
c109211997 feat(subscriptions): add Antigravity model discovery, catalog source visibility, and GitHub Copilot web login (#2897) 2026-12-02 05:42:35 -05:00
Bingxi Zhao (Frank)
b8bf9ec411 feat(llm): provider failover with cooldown-based failback (#2932) 2026-12-02 05:35:15 -05:00
Bingxi Zhao (Frank)
f99b8bc5d4 feat(web): gate external markdown images behind a click (#3154) 2026-12-02 05:30:31 -05:00
Bingxi Zhao (Frank)
bb90a65195 feat: make imagegen/videogen request timeout configurable per model (#2967) 2026-12-02 05:28:29 -05:00
Benjamin Schwing
e6b61bf3b8 Merge remote-tracking branch 'origin/dev' into HEAD
# Conflicts:
#	deeptutor/api/router_index.json
#	web/locales/de/app.json
#	web/locales/en/app.json
#	web/locales/fr/app.json
#	web/locales/hu/app.json
#	web/locales/it/app.json
#	web/locales/ja/app.json
#	web/locales/ko/app.json
#	web/locales/pl/app.json
#	web/locales/pt/app.json
#	web/locales/tr/app.json
#	web/locales/uk/app.json
#	web/locales/vi/app.json
#	web/locales/zh/app.json
2026-12-02 02:01:54 +00:00
Leveling
920f88b1a2 feat(workspace): add a web file manager with revocable write access (#3128)
* feat(workspace): manage workspace files from the web UI behind an explicit grant

Files inside a workspace (question banks, notes, source material) could only
be placed there over SSH/scp, which locks non-technical users out of the very
folder the app is built around. This adds a file manager to
Settings -> Personal -> Workspace: browse, create folders, upload, rename, and
soft-delete, with a trash view to restore.

The write path is deliberately narrow, because a workspace folder also holds
DeepTutor's own state:

* ``ContentWorkspaceService.resolve(write=True)`` already confined writes to
  ``outputs/`` and demanded "an explicit user grant" for anything else. That
  sentence had no implementation; this adds it rather than widening the rule.
  ``file_grants`` records one grant per workspace id in the caller's own
  account settings tree, so granting one folder never opens another.
* ``.deeptutor/`` (session store, learning progress, caches), ``skills/`` and
  SQLite files are refused for reads and writes alike. The tree holds data
  whose loss is not "file management".
* Deletes move entries into ``.deeptutor/trash/<batch>/`` keeping their
  relative path, so a mis-click on a question bank is reversible without shell
  access. Oldest batches are pruned past 30.
* Uploads are bounded at 50 MB and names are validated for separators,
  reserved names and the protected extensions.
* Every mutating service call re-checks the grant itself. The router check is
  defence in depth, not the only gate: a future caller that imports ``files``
  directly cannot skip it.

The router is mounted from ``server.json`` with ``auth: "admin"``, so the
module loader's ``require_admin`` policy covers every endpoint. A learner
account, or a workspace id belonging to another account, cannot reach it:
``binding_by_id`` re-derives the id from the caller's own bindings.

A missing grant now answers 403 with the prompt the UI needs. Without that
translation FastAPI turned the synchronous ``FileGrantError`` into a 500 and
the panel could not tell "grant this workspace" from a real fault.

Front end: a ``WorkspaceFileManager`` dialog (file list, breadcrumb, upload,
rename, trash/restore, Markdown preview) plus a client in
``lib/workspace-files-api.ts``. Strings go through ``t()`` with en/zh entries;
the panel is reachable from the workspace row in settings.

Tests: 16 service-level cases over grant scoping, path confinement, protected
paths, upload limits and the trash round trip; 3 router cases covering the
manifest's admin policy, the full create/upload/rename/trash/restore cycle and
the 403 mapping; 5 client cases for URL shape, verbs and error surfacing.

Verified locally: pytest 19 passed, ruff clean, tsc clean, eslint clean,
i18n parity OK, dependency-cruiser clean, vitest 5 passed.

* fix(workspace): root uploads, folder-aware trash, bounded uploads

Reviewing the file manager against real use surfaced four correctness bugs
that the original 19 tests missed because they never exercised the root
destination or a deleted folder.

Root destination (#1). ``_normalise_relative`` rejects ``"."`` because a
workspace-relative *file* path may never be empty, but the workspace root is a
legitimate *destination directory* — it is the default upload target and the
default restore target. Both went through the same normalisation and failed
with "cannot leave the workspace" (HTTP 400) on the root. ``_resolve_target_dir``
handles ``""``/``"."`` as the root and leaves every other path on the existing
guard; ``create_folder``/``rename_entry``/``trash_entry`` keep rejecting ``"."``
because those name an entry, not a directory to write into.

Trash structure (#2). Deleting a folder used to scatter its children into
``files/<relative path>`` while ``rglob`` skipped the directory rows, so an
empty folder vanished from the trash entirely and restoring a child of a
deleted folder failed with "The restore folder does not exist." Each delete now
gets its own slot: ``<batch>/entries/<uuid>/<name>`` plus a ``manifest.json``
holding ``original``, so a folder is one restorable row and comes back whole. A
parent removed by the same delete is recreated on restore.

Restore names (#3). With slots carrying identity the trash never appends
``.1``/``.2`` any more, so ``_strip_collision_suffix`` only did harm: a file
legitimately named ``report.1`` or ``v1.10`` came back as ``report`` or ``v1``.
Removed; the recorded name is restored verbatim.

Uploads (#4). The route read the whole body with ``file.read()`` before
``save_upload`` checked the 50 MB cap, so a multi-GB upload would exhaust memory
first. It now streams in 1 MB chunks and answers 413 as soon as the limit is
passed, with an early check on the declared size.

Also: preview now refuses database suffixes like the listing and the write
paths do; ``trash_entry`` no longer resolves a symlink before moving it, so a
link is trashed as a link instead of taking its target with it.

Tests: 19 -> 37. New cases cover root upload/restore, empty and non-empty
folder round trips, parent recreation, same-name entries in one batch, and
names that merely look like collision suffixes.

* fix(workspace): adapt the panel to the slot contract, i18n and input polish

Companion to the backend fix in this same PR. This cannot ship on its own:
the restore contract moved from ``{batch, name, destination, trashed_path}``
to ``{batch, slot, destination}`` and ``list_trash`` now returns one row per
delete operation, so the previously committed client would break the trash
view against the new server.

Contract adaptation:

* ``workspace-files-api.ts`` — ``WorkspaceTrashItem`` carries ``slot``,
  ``restoreWorkspaceEntry`` posts ``{batch, slot, destination}``. An empty
  destination means "put it back where it came from".
* ``WorkspaceFileManager`` — the restore action passes the slot, and the row
  key uses ``${batch}:${item.slot}``. The old ``${batch}:${item.name}``
  collided when two same-named files from different folders were deleted within
  the same second.

Experience fixes:

* Notices went through ``t()`` with en/zh entries. Nine ``setNotice`` calls were
  hard-coded English, so a Chinese UI still showed "Created …", "moved to
  trash", and so on.
* Preview opens ``.MD``/``.TXT`` too — the suffix test was case-sensitive.
* The new-folder and rename inputs submit on Enter, matching every other dialog
  in the app.
* ``Dialog`` gained an optional ``closeTooltip`` (default ``true``) so a dialog
  whose close control sits next to other labelled controls can drop the hover
  bubble. All four file-manager dialogs turn it off; every other dialog in the
  app is untouched.

Also wraps the four dialogs in a fragment: the grant, new-folder and rename
modals were nested inside the manager's children, which trapped their backdrop
and stacked two modals at once when an ungranted write opened the grant prompt.
Those actions now close their own dialog before requesting the grant.

* chore(contracts): regenerate the frontend OpenAPI contract

The `export_frontend_contracts.py --check` job compares
`web/contracts/schema/openapi.json` against what the FastAPI app renders, so
adding a router without regenerating the artifact fails CI.

Regenerated with the documented command:

    python scripts/export_frontend_contracts.py

A deep comparison of the two documents before and after reports 13 differing
leaves, all of them additions: eight `/api/settings/workspace/files*` paths and
five request-body schemas (CreateFolderBody, DeleteBody, RenameBody,
RestoreBody, and the upload multipart body). Nothing was removed or modified;
the large line delta is the JSON being re-serialised with sorted keys.

* chore(contracts): regenerate the generated TypeScript API types

`npm run contracts:check` diffs `web/contracts/generated/api.ts` against a fresh
run of openapi-typescript, so the regenerated schema alone leaves this artifact
stale and fails the check.

Regenerated with:

    npm run contracts:generate

Pure addition: +611 lines, no deletions. It exposes the eight
`/api/settings/workspace/files*` operations and the five request-body types.

* i18n: translate the file-manager copy into all eleven other locales

The English catalog is the source of truth and every first-class locale is
expected to have no missing keys, so a feature that adds 25 keys to `en` and
`zh` leaves ten locales falling back to English. Recent feature commits update
every locale in the same change for this reason.

Translated the 25 file-manager keys into de, fr, hu, it, ja, ko, pl, pt, tr,
uk and vi, inserted at the same position as in the English catalog. Missing
keys per locale drop from 25 to 0; `npm run i18n:check` passes.

* fix(workspace): resume the upload after a first grant and ask before overwriting

Two upload defects found in browser verification.

**The selected file was lost when the grant was pending.** Choosing a file in a
workspace without a grant opened the grant dialog and stashed the action, but
the handler cleared the file input before `withGrant` ran. By the time the user
approved, the `FileList` was empty, so nothing was sent and the file had to be
picked again. The handler now snapshots the files into a plain array and resets
the input up front, and the confirm dialog no longer closes on Escape while a
pending action would be dropped with it.

**A same-named upload replaced the file without asking.** The client always
posted overwrite, and the service always wrote through. Uploads now default to
`overwrite=false` and the service creates the target exclusively, so a conflict
is reported even when the browser's listing is stale rather than being detected
by a racy pre-check. A conflict surfaces as 409 and the panel asks before
retrying with `overwrite=true`; declining keeps the original file and the rest
of the batch continues.

Also adds `UploadConflictBody` to the contract, the `Replace the existing file
"{{name}}"?` key in all thirteen locales, and tests: a router test asserting the
file survives a 409 and is replaced on the retry, an API-client test for the
overwrite flag and conflict error, and a component test covering both the
resumed upload and the declined/accepted replacement paths.

* chore(api): regenerate the router index for the workspace files router

`tests/api/test_router_loader.py::test_repository_index_matches_router_sources`
asserts that `deeptutor/api/router_index.json` carries the fingerprint of the
current router sources. Registering `workspace_files:router` in the module
manifest changed that fingerprint without regenerating the index, so the
assertion failed on every Python leg:

    AssertionError: Run scripts/build_router_index.py
    assert '89681f8f...' == 'cb9ea964...'

Regenerated with `python scripts/build_router_index.py` (56 routers, 742
routes). The diff is the fingerprint plus the eleven `/api/settings/workspace/
files*` operations; no existing entry changed.

---------

Co-authored-by: Qiuner <wdst3635@163.com>
2026-12-01 21:29:16 -03:00
Antonio-Faure
969238486f fix(web): keep Load keys and allow the consent KB
Restore the original Load entry in the ten locale catalogs and keep Load external image as an additional key. Raise the two chat raw-JS budgets by 2 KB for the consent component; #3142 reclaims more than 250 KB on the same routes.
2026-12-01 12:43:17 +01:00
Antonio-Faure
19329948ec i18n(web): translate the external image consent label
Add Load external image to de, uk, vi, tr, hu, it, ja, pl, pt and ko so the new consent label does not fall back to English in strict locale catalogs.
2026-12-01 11:19:01 +01:00
kuanjames
9d0b1e7d03 fix: add request-timeout tooltip key to all web locales 2026-11-26 07:46:46 +08:00
yaqi
19b568c909 chore(i18n): translate the fallback-chain strings for every web locale 2026-11-25 14:41:14 +08:00
Benjamin Schwing
01ec88b4fc feat(quiz): show and store the AI-judge verdict for photo answers
QuizViewer consumes the judge's verdict frame: a compact badge with
optional points, the reason for an ungraded result and a step list are
shown above the judgment prose. The verdict is persisted with the
notebook entry and, for answers exact matching cannot grade, sets
is_correct/result there and in the quiz results. Exact matching stays
authoritative for choice/true-false questions and is never downgraded
by the judge; photo answers are saved as ungraded until judged.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 18:32:31 +00:00
XingyuHou
1618734cc1 feat(subscriptions): add Antigravity model discovery, catalog source visibility, and GitHub Copilot web login 2026-11-23 21:13:55 +08:00
Bingxi Zhao (Frank)
66571c79db feat: acknowledge SiliconFlow partnership 2026-11-18 16:15:57 +08:00
Bingxi Zhao (Frank)
8ab4ecfee9 feat(books): review and undo scoped chapter and section edits
Fixes #2571
2026-11-15 01:42:47 +08:00
Bingxi Zhao (Frank)
706ce1db38 fix(reading): zoom document images and synchronize annotations
Fixes #2499, #2472
2026-11-15 01:20:52 +08:00
Bingxi Zhao (Frank)
47ae8a27e4 Merge PR #2515: feat(i18n): add Hungarian as an interface and reply language
Combine Hungarian with Italian UI and Hindi reply-language registries; translate 49 newly integrated keys and add the Hungarian endonym to Italian. Regenerate router and frontend contracts. 33 Python locale tests, full Node suite and locale parity pass.
2026-11-14 23:36:26 +08:00
Bingxi Zhao (Frank)
95aa81d624 Merge PR #2544: feat(i18n): add Italian (it) localization
Make Italian quality tests compatible with CommonJS Node test compiler; accept Italiano as reply-language alias; translate 48 keys added by other integrated PRs; regenerate router index and format i18n. 26 Python locale tests and full Node suite pass.
2026-11-14 23:34:48 +08:00
Bingxi Zhao (Frank)
3b267f2b8d Merge PR #2500: feat(reading): fit the page to its text, step zoom, and open a picture inside a PDF
Reconcile PDF zoom with cached text layers and 150 ms final repaint; let text gaps reach image hotspots; keep pointer-captured pan clicks from dismissing image preview. 97 PDF unit tests and 7 Chromium zoom/resize audits pass; real mouse image hotspot click verified.
2026-11-14 23:31:59 +08:00
Bingxi Zhao (Frank)
3fc9d2ce18 Merge PR #2534: feat(web_fetch): pluggable fetch backend with DeepSeek Fetch as first alternative
Combine independent locale additions and regenerate integrated route index.
2026-11-14 23:00:23 +08:00
Bingxi Zhao (Frank)
5c7dbb2a7e Merge PR #2547: fix(web): move settings nav copy into locale catalogs (#2134) 2026-11-14 23:00:04 +08:00
Bingxi Zhao (Frank)
83f18f1be2 Merge PR #2577: feat(sidebar): group a practice session's questions into one Learning Records row 2026-11-14 23:00:04 +08:00
Bingxi Zhao (Frank)
68220257af Merge PR #2568: feat(guardian): show scoped Reading progress and quiz records
Combine independent locale additions and regenerate integrated route index.
2026-11-14 23:00:03 +08:00
LaiYongqiang
b29ffffe52 feat(reading): zoom the PDF reader
A PDF page was drawn at `clamp(panel - 48, 240, 1100)` with no zoom control, so
on a 1440px window roughly 735px of page sat inside a ~1165px pane — the page's
own white margins were still on screen, and the type was about a fifth smaller
than the pane could show.

Two modes. **Fit** is the historical behaviour, word for word the old width
formula, so nothing changes for a reader who never touches the bar. **Fixed** is
a percentage of the page's real size (96/72 of its `scale: 1` width — the same
reading Acrobat and Preview show), stepped along a ladder rather than by a fixed
percentage so the displayed number, the checked menu row and the next press all
describe the same size. Gestures: ⌘+/⌘−/⌘0, ctrl+wheel and pinch, each anchored
on the pointer so the page grows from where the reader is looking, in both axes.

The canvas budget is the part that is easy to get wrong. Safari silently drops a
bitmap past roughly 16.7M device pixels and answers with a blank page, so the
shared CSS width is clamped from page one's aspect ratio — and then each page
clamps its own bitmap again, because every page inherits that width while its
height follows its own ratio. The bitmap gives, never the layout, so the column
does not change size from page to page.

**Every step is measured against the width that actually landed.** The budget
clamps the drawn width, so a stored 4x on a tall page lands at 211%: multiplying
the *request* left the first several notches of a zoom-out drawing the same
width, and a zoom-in from there did nothing at all. The button step walks past
the stops the budget has flattened, the wheel gesture starts from what landed,
and the bar disables a control whose press cannot change the width. A zoom that
lands on the committed width drops its scroll anchor instead of leaving one
behind for the next pane resize to consume.

**A reader typing in a field keeps the keys.** The reader binds the same ⌘+ / ⌘−
/ ⌘0 the browser does, and with the pointer over a page those fired while the
reader typed in a note — `preventDefault` swallowed the browser's zoom, so the
field lost the keystroke and the page did not zoom either. The shortcut matcher
takes an `editableTarget` flag now, and `lib/shortcuts.ts` holds the one
predicate both readers use: the text reader binds the same three combinations and
had the same gap.

**The row a reader picks is the size they get.** `MIN_PAGE_WIDTH` (240px) is
above a Letter page's 25% (204px), so picking "25%" drew 29% while the toolbar
said 29% and the row still claimed 25%. Rows print the landed value.

The bar floats over the pane rather than inside the scroll container, so it does
not scroll away; its wrapper is transparent to pointers and only the toolbar
opts back in, or it would swallow wheel, selection and annotation clicks across
the bottom band of every page. It reveals on hover near that band and on focus —
`opacity-0` does not remove an element from the tab order. The menu is a radio
group (`menuitemradio` + `aria-checked`) with arrow keys, Home/End, and Escape
handled in the capture phase so it does not also reach the Guided Learning
handler — `preventDefault()` cannot stop a sibling listener on the same node. The
percentage is announced with `aria-live`, because it is the only feedback a step
produces for a reader who cannot see the page resize.

Safari reports a trackpad pinch as `gesturestart`/`gesturechange` rather than
ctrl+wheel, so those are cancelled on the pane: without it the browser zooms the
whole page. A zoom changed inside the 150ms debounce is flushed on `pagehide` and
on `visibilitychange`, not only on unmount — a closing tab or a backgrounded
phone never unmounts the component.

The bar's locale keys are filed with the reader's own display-control keys rather
than appended at the end of the catalog, which is what keeps this PR and the
lightbox PR from conflicting on the same files.
2026-11-11 18:31:38 +08:00
evan188199-tech
a074bcfcb9 feat(sidebar): collapse one practice session's questions into a single Learning Records row
Practice notebook entries recorded in one session now share a single
sidebar row, titled by that session with its question count, expandable
to each question's own practice link. Entries without a session (and
sessions that produced one question) keep individual rows, and the
Question Bank, answers and review links are unchanged.

The learning index navigation read gains the existing session id and
title (no new persisted field); grouping happens in the projection.
Sidebar strings added to every locale.
2026-11-10 00:33:52 +08:00
Yin
627d15fb2c feat(guardians): show durable question help separately from attempts 2026-11-10 00:31:22 +08:00
Yin
054769a139 feat(reading): keep recorded help inside each quiz question 2026-11-10 00:23:38 +08:00
Yin
8e92927f90 fix(i18n): complete guardian reading report translations 2026-11-09 23:26:41 +08:00
evan188199-tech
da65a29e54 fix(web): dedicated voice nav key and bilingual settings search (#2134) 2026-11-09 17:46:38 +08:00
evan188199-tech
a312b26515 fix(web): move settings nav copy into locale catalogs (#2134) 2026-11-09 17:17:41 +08:00
Daniele Lucarelli
377bf10fa9 feat(i18n): add Italian (it) localization 2026-11-09 08:48:31 +00:00
evan188199-tech
91104d9a3f fix(web_fetch): settings UI for backend + harden DeepSeek fetch cap (#2448)
Addresses Air R1/R2 review blockers on top of the opened PR head:
Settings GET/PUT /api/settings/web-fetch with UI control; DeepSeek fetch
uses identity encoding, raw bytes, and capacity checks before buffer extend;
provider-branding treats `local` as generic.
Air Codex R3 on MacBook Air: READY.
2026-11-09 16:23:50 +08:00
gezakepek-tech
adc80e5038 feat(i18n): add Hungarian as an interface and reply language
Adds a complete Hungarian (hu) locale alongside the existing catalogs, wired
through every seam a language has to pass so none of them silently serves
English to a Hungarian reader.

Frontend: the hu catalog covers all 6,584 English keys with matching
interpolation placeholders, registered in the locale registry, the lazy bundle
loader, Intl date/number formatting (hu-HU) and the reply-language picker.
`language.hungarian` ("Magyar") is added to every existing catalog so the
endonym is shown whatever the current interface language is.

Backend: "hu" is accepted by the launch, interface and reply-language
normalizers and offered in both settings choice lists, named in the prompt
language labels, and carries the Hungarian copy of the CLI-app, MCP and
sandbox messages, the quiz-judge prompt, the book export labels, the book
overview front page and the voice language list.

Scope: the CLI installer banner (`deeptutor/runtime/banner.py`) keeps its
English text for hu and falls back through `_pick_language`; it is terminal
setup copy unused in server deployments and is left for a follow-up.

Evidence:
- `python -m pytest tests/i18n/test_hungarian_locale.py` — 33 passed
- `npm run test:node` — 1353 passed (adds hungarian-locale-quality.test.ts)
- `npm run typecheck` — clean
- `node scripts/i18n_parity.mjs` — OK
- `node scripts/i18n_audit.mjs` — hu: 4529/4529 used keys (100.0%), strict
- `node scripts/generate-contracts.mjs --check` — no drift
- `ruff format --check` / `ruff check` on the touched Python files — clean

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-07 14:20:07 +01:00
wayfarer6
1ae2bcf96a Offer Korean as a partial interface translation (#2359) 2026-11-06 02:07:17 +08:00