The Add Materials dialog sent any file the user picked. A file over the
reader's 200 MiB single-file limit then crossed the Next proxy's 210 MiB
body cap, was truncated, and the submit button kept spinning with no
explanation.
Read the limit from /api/reading/supported-formats (already the server's
source of truth for the picker), mark an oversized file as soon as it is
chosen, and keep submit disabled until it is removed. If the limit cannot
be loaded, behaviour is unchanged and the server's own check still applies.
Closes#3151
* fix(i18n): accept Korean as a backend interface language
The web picker offers Korean (added in #2359), but the backend UiLanguage
contract, its normalizers and the settings spec never learned "ko". Choosing
Korean and applying settings therefore fails with HTTP 422 on
PUT /api/settings/ui, and the saved language falls back to English on the
next load.
Register "ko" in the same seams Japanese used in #2213: UiLanguage and
_normalize_language() in interface_settings.py, the launch-settings
normalizer, and _LANGUAGE_CHOICES in settings_spec.py, then regenerate the
frontend API contracts. Add Korean to the existing router and launch-settings
tests, and add a registry test that fails whenever a web APP_LANGUAGES code
is missing from the backend contract.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* style: apply ruff format
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): refine knowledge and settings accessibility and layout
Name row controls from their visible titles, portal tooltip descriptions out of tablists, and make the knowledge tabs keyboard-complete. Also stack the KB master-detail on phones, add a section-scroll hint, demote the indexing diagnostic to its detail tab, and consolidate the knowledge type scale.
* perf(web): cut knowledge and settings payload
Serve raster engine marks through next/image, stop preloading the serif face on pages that do not use it, and prefetch settings routes only on hover or keyboard focus instead of on first paint.
* docs(perf): record knowledge and settings audit
Document the protocol, baseline and after medians, payload and accessibility results, limits, and reproduction commands, with mobile before/after screenshots.
* test(web): match the model row's visible accessible name
The row no longer overrides its name with a provider-first aria-label; select it by the model-first text a screen reader now reads, which also contains the visible default/task badge.
* fix(web): keep the MinerU download-type name in the locale catalog
Reuse the existing Download models and Type strings instead of introducing a new t() literal, so the strict i18n audit stays green.
* docs(perf): link the UI audit from the handbook index
The docs contract requires every guide under docs-for-dev to be reachable from README.md.
* docs(perf): record the isolated knowledge-detail LCP
Re-measured the detail route with the host pinned away from unrelated work; the 668 ms row was contention, while the isolated median is 568 ms and the stable repeats overlap the baseline.
---------
Co-authored-by: Antonio-Faure <209759495+Antonio-Faure@users.noreply.github.com>
* feat(providers): add LiteLLM as a local OpenAI-compatible provider
* test(web): keep LiteLLM on the generic provider-branding fallback
---------
Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
* feat(rag): support local rerankers for LightRAG queries
Allow administrators to select a cross-encoder alongside the native LightRAG role models. Run scoring in a reusable worker and partition cached answers by reranker so model changes take effect on existing indexes.
Refs #2701
* fix(api): refresh the router index for LightRAG settings
* fix(rag): run LightRAG reranking in the shared reranker worker
anyio's process pool re-runs the server's __main__ file by path. When the
backend runs as `python -m deeptutor_cli.main serve` (the desktop app),
that file's relative imports fail, so every rerank call failed with
'Error during worker process initialization' and LightRAG silently kept
the original chunk order. Reuse the python -m reranker worker that the
LlamaIndex pipeline already uses.
---------
Co-authored-by: lipeih <lipeihan@eazytec.com>
Co-authored-by: zszz3 <zszz3@users.noreply.github.com>
* fix(web): keep statistics notation as inline math
plausibleMathBody judged inline math by Latin words, so $Var(N)$, $Cov(X,Y)
and $Corr(X,Y)$ fell through escapeStrayDollars and displayed as source.
Add the common statistics functions to MATH_WORDS.
Also recover control characters left by JSON tool-argument decoding
(U+0008/U+000C/U+000D followed by a letter) back into \b, \f and \r, so
formulas already stored in notes render again.
Tests: latex-normalize.test.ts.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(web): only restore a decoded escape that spells a KaTeX command
A form feed or carriage return in front of a word is not always a mangled
\frac or \right: text extracted from a PDF keeps a form feed between pages.
Rewriting every one of them showed a stray "\f" in front of the next word.
Restore the backslash only when the letters after it name a KaTeX command.
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: zszz3 <91608029+zszz3@users.noreply.github.com>
* fix: parse inline math in note tables and statistics notation
BlockNote only renders `inlineMath` nodes, and two common shapes never
became one:
- `parseNoteMarkdown` converted inline `$...$` in a block's top-level
content, but table cells live under `tableContent.rows`, which the walk
never reached.
- The normaliser treated `$Var(N)$` and `$Cov(X, Y)$` as prose because the
Latin-word heuristic did not recognise statistics function names, so it
escaped the delimiters as stray dollars.
Recurse into `tableContent` cells and add the common statistics function
names to the math-word allowlist, with regression tests for both.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(web): count statistics names as maths only when they are called
"mean", "median", "rank", "span" and "var" are English words and a
keyword too, so with them in the word list "$52k mean, $48k median" became a
formula and a backticked `var x = 1` on a page with maths turned into KaTeX.
Keep them out of MATH_WORDS and accept them only before "(", which is how
Var(X) and Cov(X, Y) are written.
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: zszz3 <91608029+zszz3@users.noreply.github.com>
Learner-card stems go through InlineMarkdown, which only switches to the
rich renderer for math, emphasis, code and links; a stem whose only markup
was a table reached the learner as raw pipes. Detect GFM tables and route
those stems through RichInlineMarkdown, and add markdown-table.ts (table
detection plus a blank line after each table so a trailing sentence is not
swallowed as another row).
Tests: learner-card-table.spec.tsx, markdown-table.test.ts.
Co-authored-by: Claude Code <noreply@anthropic.com>
processLatexContent now runs normalizeEditorMdInlineMath, so a stem written
as $$P=\begin{pmatrix}...\end{pmatrix}$$ gets each $$ on its own line.
remark-math otherwise parses it as inline math and KaTeX fails on the first
ampersand or row break.
Tests: latex.test.ts, learner-card-math.spec.tsx.
Co-authored-by: Claude Code <noreply@anthropic.com>
* fix(chat): open quiz settings only when the learner picks the mode
The Activity panel auto-open watched the active capability, so loading or
reloading a session that was already in Quiz / Visualize / Research mode
counted as a switch into that mode. On a phone the panel is a full-screen
sheet, so every reopened quiz session started covered by its settings.
Open the config card from handleSelectCapability instead, the only path
for an explicit mode change (composer picker, slash command, launch
intent). Session hydration no longer opens it; restored per-session
settings are untouched.
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
* test(chat): record viewer panel props through a spy
Assigning to the hoisted fixture inside the forwardRef stub trips
react-hooks/immutability; capture the props with a mock call instead.
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
* fix(quiz): translate question badges and the German mimic label
The quiz card header printed the raw question type (short_answer,
fill_in_blank) and difficulty ids instead of the labels the quiz
settings already use, and the German catalog left "Mimic Paper"
untranslated.
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
---------
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
The step body and footer capped themselves at max-w-2xl but stayed at the
left edge of the 1180px page container, leaving a wide empty column on the
right. Other partner surfaces (archives, chat) already center their
max-w-2xl column. Wrap the step header and body in a centered max-w-2xl
column and center the Back/Next row with it.
Layout-only change.
Co-authored-by: Antonio-Faure <209759495+Antonio-Faure@users.noreply.github.com>
Continues #2978 and closes#2887. Includes the original Windows file actions, integrates the changes with dev, and adds an explicit default-app action.
Co-authored-by: Botong Wu <2048400180@qq.com>
* fix: render bare scripted math in quiz prose
* fix(web): recover quiz subscripts parsed as emphasis
Adjacent bare formulas can share Markdown emphasis delimiters. Mask candidate underscores only while locating prose ranges, then wrap the original symbols for KaTeX. Cover the reported circuit options through all three rendering routes.
* feat(desktop): sync Windows menu preferences with web settings
* fix(settings): reconcile desktop preferences after updating the live baseline
* fix(desktop): guard menu zoom handlers against missing web view
* fix(web): keep glass composer surface opaque over tucked tray
- web/features/ui-layout/modern/modern.css: under theme-glass, set .dt-composer-surface background to --surface-raised so translucent --card no longer lets the tucked tray show through (#2329)
- Why: glass modern layout made the composer visually leak the tray behind it; opaque raised surface restores a solid input area without changing non-glass themes
MUST NOT commit: .env; .venv/; __pycache__/; node_modules/; dist/; target/; *.db; credentials*; *.pem; nested .git/
* fix(web): keep glass composer opaque in classic layout too
The non-admin /api/settings/llm-options path publishes
supported_reasoning_efforts: null for models without
codex_supported_reasoning_levels. supportedReasoningEffortValues guarded
with `!== undefined`, so null reached reasoningEffortOptionsFromSupportedLevels
where values.map threw, tripping the chat page error boundary for learners.
Guard with Array.isArray so a null/non-array value falls back to the
provider/model tables like an absent field, matching the admin path's
semantics. Widen the option field to string[] | null and add a regression
test covering null, the missing-field equivalence, and the empty-list case.
Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
In the Classic layout the tray under the main input card (skills,
connectors, create, partners, answer mode) tucks up 20px behind the
composer and painted over its bottom row: the + button, the Chat mode
chip and the send button lost their lower halves to the tray's rounded
top edge at Windows display scaling. Modern was never affected - its
stylesheet already lifts the composer surface above the tray; Classic
had no such rule.
Scope the fix to Classic only: when the surface sits directly above the
tray it gets z-index 1, so it paints over the tucked tray at any
scaling. The shared Composer, the tray geometry and all Modern styles
are untouched.
Evidence (Windows 11, Chromium):
- web/tests/e2e/composer-tray.audit.ts, per-layout regression added
with this commit: before the fix the classic case failed with
"Resources is obstructed at its lower edge"; after it 3/3 pass
(classic buttons clear, modern buttons clear, upward tray menus
reachable).
- npm run typecheck: clean.
- npm run test:unit: 1468/1468 passed.
- npm run test:node: 1407/1407 passed.
- Before/after screenshots of the classic composer bottom row: the
tray edge cutting the buttons vs. the buttons clear of the tray.
(cherry picked from commit a3d2a30cd85c81dbd245f6a61414b9607c357be1)
Prepare v1.7.3 notes for reading and book editing, expanded provider and
agent connections, learning records, model streams, and desktop upgrades.
Sync README prose and 11 translations, archive older release notes, and
update the package version. Resolve release lint/type blockers with explicit
parser and capability contracts, compatible Book call forwarding, accurate
auth task types, and quoted SQLite schema identifiers. Cover positional Book
calls and quoted legacy columns; align KB seed tests with visible retrieval
failure reporting. Keep HTTP fixtures independent of host proxies and translate
new Portuguese UI copy.
Release notes: assets/releases/ver1-7-3.md
Local dev repairs for #2681.
The existing narrow-grid fix is preserved; Next up no longer overlays content on phones. Web typecheck, 1407 Node tests, eslint and i18n passed.
Local dev repairs for #2478.
UI interaction test verifies two selections, preserved search and no premature write. Web typecheck, 1407 Node tests, eslint and i18n passed.
Local dev repairs for #2586.
OAuth owner isolation and refresh-token stability verified. Hook polls until connected, refreshes on focus and stops on unmount. Python rechecks: 56 passed; UI batch: 25 passed. Web typecheck, 1407 Node tests, eslint and i18n passed.
Register the verified SearchApi favicon with provenance, complete Italian many plurals and translated counts, and review the Italian/Hungarian language endonyms in Portuguese. Align labeled-stream fixtures with preserved Markdown examples and accepted thinking-tag aliases. Keep PDF layout memoization tied to the effective page ratio.
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.
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.
Validated real mastery topic with 20 objectives at 390 and 1440 px: no horizontal overflow; mobile content scrolls at natural height; desktop keeps its two-column bounded layout. Screenshots inspected.
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.
Retain admission error text and localized model-access guidance; allow explicit retry to revalidate access instead of permanently blocking stored messages. No automatic retry on reload. Backend tests and both manual retry paths passed.