Commit Graph

1481 Commits

Author SHA1 Message Date
Antonio-Faure
75636f0735 perf(web): improve knowledge-base and settings accessibility and payload (#3139)
* 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>
2026-12-01 17:12:12 +08:00
lipeh1
c1a2967045 feat(web): filter learning records by type (#2754)
Co-authored-by: lipeih <lipeihan@eazytec.com>
2026-12-01 14:02:04 +08:00
游标卡尺
8b18b7a020 feat(providers): add LiteLLM as a local OpenAI-compatible provider (#2832)
* 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>
2026-12-01 13:00:40 +08:00
lipeh1
681b23766f feat(rag): support local rerankers for LightRAG queries (#3009)
* 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>
2026-11-30 18:46:49 +08:00
Qiu
ff0b7be3f8 fix(book): use the active clock for standalone chapter retries (#3098) 2026-11-30 06:33:07 -03:00
Chen jizhou
a3173eeb0e perf: reuse the textarea sizing mirror across edits (#2700)
Co-authored-by: chen-12-03 <184723954+chen-12-03@users.noreply.github.com>
2026-11-30 15:53:03 +08:00
Ding Junyao
f187580271 fix: add Source Han Fonts in font-family beside Noto Fonts (#2939) 2026-11-30 15:49:22 +08:00
Chen jizhou
79a66cb3c1 perf: stop idle activity orbs and narrow theme observers (#2704) 2026-11-30 11:12:41 +08:00
1zrj
24aa2632d9 fix learning activity (ReadingCompanion, MasteryStudy, NoteCompanion) chat auto-follow (#2935) 2026-11-30 11:12:23 +08:00
lytanjie
ab51601b89 fix(web): keep statistics notation as inline math (#2878)
* 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>
2026-11-29 15:29:03 +08:00
lytanjie
305eb7bf75 fix: parse inline math in note tables and statistics notation (#2737)
* 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>
2026-11-29 15:11:07 +08:00
lytanjie
284e06145d fix(web): render GFM tables in learner card stems (#2879)
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>
2026-11-29 14:53:07 +08:00
lytanjie
cf03cebdcb fix(web): split display fences that hug a matrix environment (#2880)
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>
2026-11-29 14:52:50 +08:00
欧八同学
a345d44aef fix: remember the selected consult partner per chat (#2775) 2026-11-29 14:52:34 +08:00
Benjamin Schwing
648443b5dd fix(chat): don't open the quiz settings sheet when a quiz session loads (#2950)
* 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>
2026-11-29 14:52:18 +08:00
mocias
23189ca690 fix(reading): keep Invidious picker controls inside its dialog (#3025) 2026-11-29 14:52:01 +08:00
Antonio-Faure
2df7cd1958 fix(web): center the new-partner wizard content (#2856)
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>
2026-11-29 14:51:44 +08:00
欧八同学
5a1bd72ca2 fix: give the glass session viewer an opaque background (#2774) 2026-11-29 14:51:27 +08:00
Qiu
506cea9d4f feat(desktop): finish Windows chat file actions (#3051)
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>
2026-11-28 13:09:15 -03:00
Carl
0b93ddd697 fix: use canonical npmjs.org URLs in web/package-lock.json (#3004) 2026-11-28 12:29:35 -03:00
Qiu
8c475445d2 fix(web): render bare scripted math in quiz prose (#2808)
* 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.
2026-11-28 21:03:56 +08:00
Qiu
6d0183d6f3 Merge pull request #2915 from Qiuner/mobile/react-native
feat(mobile): scaffold React Native chat client
2026-11-28 08:12:24 -03:00
LIziak112
ad355f454e feat(desktop): sync Windows menu preferences with web settings (#2971)
* 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
2026-11-28 08:07:22 -03:00
Jinhang HE
76e3c0a4d4 fix(web): keep glass composer surface opaque over tucked tray (#2977)
* 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
2026-11-27 12:35:15 -03:00
游标卡尺
efe575f0a1 fix(web): treat null supported_reasoning_efforts as missing (#2732) (#2733)
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>
2026-11-26 19:52:59 +08:00
LIziak112
c328eff55c fix(chat): keep the classic extension tray off the composer controls
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)
2026-11-25 17:56:40 +08:00
Qiuner
67deec1070 feat(mobile): scaffold React Native chat client 2026-11-24 04:08:27 -03:00
Bingxi Zhao (Frank)
66571c79db feat: acknowledge SiliconFlow partnership 2026-11-18 16:15:57 +08:00
Bingxi Zhao (Frank)
4c1e000d85 release: v1.7.3
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
2026-11-16 02:17:36 +08:00
Bingxi Zhao (Frank)
1ceec47b55 style: trim trailing blank lines in issue regressions 2026-11-15 01:43:44 +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)
ce4434e75a fix(workspaces): reuse knowledge references in selective conversation moves
Fixes #2289
2026-11-15 01:42:46 +08:00
Bingxi Zhao (Frank)
53bc9eb99d fix(learning): paginate and search question bank sources
Fixes #2641
2026-11-15 01:20:53 +08:00
Bingxi Zhao (Frank)
e96cba219c feat(docling): expose optional enrichments and version remote cache
Fixes #2518
2026-11-15 01:20:52 +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)
20ac8aacf6 fix(chat): restore account-scoped side chat tabs
Fixes #2291
2026-11-15 01:20:52 +08:00
Bingxi Zhao (Frank)
9437173514 fix(i18n): translate tool hints through the selected UI catalog 2026-11-15 01:00:49 +08:00
Bingxi Zhao (Frank)
719e2a8e30 fix(chat): inherit ready workspace knowledge bases for untouched sessions 2026-11-15 01:00:49 +08:00
Bingxi Zhao (Frank)
2ea5292f9f fix(visualize): inherit the application color scheme in HTML widgets
Local dev repairs for #2600.

Theme changes and explicit widget themes tested. Web typecheck, 1407 Node tests, eslint and i18n passed.
2026-11-15 00:50:31 +08:00
Bingxi Zhao (Frank)
d0fcddecac fix(mastery): keep mobile next step in normal document flow
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.
2026-11-15 00:50:31 +08:00
Bingxi Zhao (Frank)
b9287142df fix(reading): retain the library picker during multiple selections
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.
2026-11-15 00:50:30 +08:00
Bingxi Zhao (Frank)
b46d9b5763 fix(mcp): reconnect after consent and refresh authorization status
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.
2026-11-15 00:50:30 +08:00
Bingxi Zhao (Frank)
fa1edb75a2 fix: reconcile provider branding and locale contracts after PR integration
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.
2026-11-14 23:47:30 +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)
59922626ee Merge PR #2613: fix(mastery): prevent narrow topic pages from overlapping
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.
2026-11-14 23:33:17 +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)
af403550ce Merge PR #2639: fix: explain missing LLM access in chat
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.
2026-11-14 23:19:09 +08:00
Bingxi Zhao (Frank)
2d493edb84 Merge PR #2521: feat(i18n): add Hindi as a reply language
Regenerate the lazy route index after the reply-language contract changes; targeted tests passed.
2026-11-14 23:16:33 +08:00
Bingxi Zhao (Frank)
bbdb77fd0f test(reading): exercise question help without exposing answer keys 2026-11-14 23:03:04 +08:00