1645 Commits

Author SHA1 Message Date
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
yogev-nimble
ac484b27d9 feat(search): add WebRouter as a keyless search provider 2026-11-26 20:26:04 +02: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
kuanjames
97506419a3 fix: replace en dash in Turkish timeout tooltip (locale style rule) 2026-11-26 08:05:23 +08:00
kuanjames
9d0b1e7d03 fix: add request-timeout tooltip key to all web locales 2026-11-26 07:46:46 +08:00
kuanjames
a6459056cf feat: make imagegen/videogen request timeout configurable per model
Image and video generation hardcode request_timeout (120 s / 60 s) with no
catalog override, so slow-but-valid self-hosted backends (e.g. local
unified-memory image servers) reliably fail with an opaque 'request error'.

Follow the existing voice convention: a per-model 'request_timeout' field in
the model catalog, resolved in provider_runtime and bounded centrally.

- generation_http: resolve_generation_request_timeout() + shared defaults/bounds
- provider_runtime: wire the override into imagegen/videogen resolution
- openai_compat + async_task adapters: timeouts now report the limit and point
  at the setting instead of a generic request error
- settings UI: 'Request timeout (seconds)' field for imagegen/videogen models
- tests: override/default/invalid resolution + timeout message
2026-11-25 21:13:56 +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
Bingxi Zhao (Frank)
47a2595af0 fix(settings): align the pinned toolbar with the content column
The toolbar's PageContainer still spanned the whole settings pane while
the content column was capped at 780px and centered, so the draft status
text and the Apply button sat 32px left / 42px right of what they pin
under at 1280. Two causes: a different column, and the 780px column not
reserving the scroller's stable scrollbar gutter.

PageContainer now takes maxWidth/gutter as props instead of callers
appending conflicting max-w-*/px-* utilities to className: Tailwind
emits its own order, not the class attribute's, so md:px-8 lost to
md:px-9 and pb-16/pt-5 lost to lg:py-9. Defaults are unchanged, so no
other caller emits different classes.

Reviewer patch from #2918 (OrdoAbChao7), verified below.
2026-11-25 14:53:49 +08:00
yaqi
19b568c909 chore(i18n): translate the fallback-chain strings for every web locale 2026-11-25 14:41:14 +08:00
lipeih
681447fc65 feat(desktop): add Windows session file actions and preview recovery 2026-11-25 13:44:42 +08:00
yaqi
46fb4ae9d1 docs(settings): explain what the fallback chain covers 2026-11-25 10:51:34 +08:00
yaqi
f73d90a382 fix(settings): sync the chain editor with the catalog after it loads 2026-11-25 10:28:26 +08:00
yaqi
066054d248 fix(failover): keep the caller's model, fast-fail with a chain, reset the ladder 2026-11-25 10:25:10 +08:00
yaqi
625016cea4 fix(settings): stop the chain editor from offering an already chosen model 2026-11-25 09:53:41 +08:00
yaqi
b49fec136e feat(settings): edit the fallback chain from the language models page 2026-11-25 09:36:07 +08:00
Benjamin Schwing
015f23898f chore(contracts): regenerate the frontend contracts for the judge verdict fields
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-25 01:32:46 +00:00
Benjamin Schwing
f9bf2ba81d fix(quiz): keep the stored grade when a re-judge is unsure
A non-final verdict on a typed answer resolved to is_correct=false, and
the judge PATCH then stored result=incorrect, turning a judged-correct
answer back into a mistake. Send only the judgment and verdict for an
unsure verdict; only a final verdict re-grades.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-25 01:31:34 +00:00
Benjamin Schwing
0cba402415 fix(learning): ignore the abbreviation dot in unit words
"4,5 Mio" and "4,5 Mio." were different units and so not comparable,
and the quiz viewer marked the dotless answer wrong. Both ports now
drop a trailing dot from the unit word before comparing.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-25 00:31:35 +00:00
Benjamin Schwing
8cd5a640c7 fix(learning): leave an exact 1000x unit-scale mismatch to the judge
Accounting tasks often state "in TEUR" or "in Mio. EUR" in the question
text, not next to the key, so the stored key is a bare "1.250". An
answer of "1.250.000" is then the same amount in full euros, yet it was
graded a final incorrect at confidence 1. An answer that equals the key
times 1000, 1000^2 or 1000^3 (or the reverse), with no unit or percent
on either side, is now ambiguous, so the judge decides with the question
in view. "1.251.000" for "1.250" stays a final incorrect. Both ports
share the new vectors.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-25 00:29:51 +00:00
Benjamin Schwing
cee23a5011 fix(learning): leave sign-only and percent-point mismatches to the judge
"1.250" for a key of "-1.250" (a loss or deduction asked as an amount)
and "42" for a rate key of "0,42" were final incorrect verdicts. Both
may be what the question asked for, so they are now ambiguous, like the
existing "50%" for "50" and "0.5" for "0.5%" cases. Zero keys are not
rescaled.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 23:35:39 +00:00
Benjamin Schwing
37bcb6331a fix(learning): settle numeric rounding only where the key can
A fraction key compared the answer's rounding instead of its own, so at
an exact half the wrong rounding won: "0,12" was correct for 1/8 and
"0,13" only ambiguous. The key is now rounded to the answer's places.

Keys with fewer than two places took their last written digit as the
precision. A key stored through a float ("12.5" from 12.50) accepted
"12,46", while an integer key ("417", "ca. 417 €") rejected "416,67"
with confidence 1. Such keys are now correct only on equality; a finer
answer that rounds to them is ambiguous and goes to the judge.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 23:35:31 +00:00
Benjamin Schwing
56bb06e6af fix(quiz): report quiz results once and keep one authoritative badge
The quiz-results report no longer depends on judge verdicts, so a verdict
that arrives after the quiz is complete no longer posts another
[Quiz Performance] chat message. The verdict is stored through the entry
PATCH, and the server now keeps that judged grade on later re-posts.

When exact matching decided the grade, the verdict summary hides its result
badge and points, so 'Correct' and 'Incorrect' no longer show together.

parseQuizVerdict now only checks the shape (known result, boolean final,
usable steps) and trusts the server's final/is_correct/points.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 21:59:38 +00:00
Benjamin Schwing
05cb49e473 fix(learning): never read a numeric key in the answer's notation
An ambiguous key such as "12.500 €" was read in the convention the
answer proved, so "12.5" became a final "correct" for what is 12 500 in
German notation (likewise "12.5 TEUR" for "12.500 TEUR"). Only the key's
own notation now fixes how the key is read; the answer may still borrow
the key's convention. An unproven key must match under both readings,
otherwise the result is ambiguous.

Precision follows half-away-from-zero rounding with exact rationals:
"3.48" accepts [3.475, 3.485) instead of a closed interval plus an
epsilon, which also made "1.5e-99" equal to an integer key "0". A key
more precise than the answer's rounding ("3,48" for "3,4833") and a bare
value below 1 for a percent key ("0.5" for "0.5%") are ambiguous instead
of a final verdict.

The web port now uses BigInt rationals like Python's Fraction, and both
ports reject tokens over 30 digits, so the shared vectors cannot drift on
large values. The unused rel_tol/abs_tol parameters are removed.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 21:55:19 +00:00
Benjamin Schwing
73835e9c37 fix(quiz): keep re-judged notebook entries consistent
A re-judge that lowers a verdict now replaces the stored result instead
of leaving result=correct behind an is_correct=0 row: the client always
sends an explicit result and the entry PATCH derives result and resolved
from is_correct with the upsert's rules. Invalid step entries are
trimmed or dropped rather than voiding a clear verdict, and the verdict
is saved even when the submit upsert lands after the judge starts.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 18:51:55 +00:00
Benjamin Schwing
31dbcf036c fix(learning): keep uncertain numeric verdicts out of final grades
Second review round for numeric_equivalent and its web port:

- Without a proven separator convention, also try cross readings so
  "12.500" vs "12,500" is ambiguous rather than a final "incorrect".
- A percent answer that only matches a bare key at x100 ("50%" for
  "50") is left undecided, so "0.5%" is no longer accepted for "0.5".
- Apply the percent scale to an answer's decimals for fraction keys
  ("33.80%" no longer passes for "1/3").
- Never drop a unit word next to a currency ("5 kg" vs "5 €"), accept
  letters only in units (no "m²"), and cap denominators at 15 digits.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 18:43:14 +00:00
Benjamin Schwing
702b4854d1 fix(learning): harden numeric answer parsing
Review follow-ups for numeric_equivalent and its web port:

- Limit exponents to two digits; "1.5e10000000" made Fraction
  arithmetic block the event loop for about a minute.
- Treat a separator convention borrowed from the key as a preference,
  not a proof: "-12.500" for "-12500.00" is now ambiguous instead of a
  final "incorrect", since a comma-decimal learner may mean -12500.
- Accept "50%" for a bare "50" key, and two or more decimals that round
  to a fraction key ("0.333" for "1/3").
- Allow at most one trailing unit word; prose ("5 or six"), symbols
  ("3²"), single letters and magnitude words ("Tausend") are no longer
  dropped. Reject repeated signs ("--5").
- Use an absolute epsilon so large integer keys stay exact.
- Align Python and TS on ASCII digits, Unicode spaces and lower().

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 18:38:58 +00:00
Benjamin Schwing
5c3db14565 refactor(quiz): break the notebook-api/quiz-verdict type cycle
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 18:36:45 +00: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
Benjamin Schwing
7aa4a9bb78 fix(quiz): accept numeric notations in fill-in-blank checks
QuizViewer compared fill-in-blank answers with lowercase equality, so
"1.250,50" was marked wrong for "1250.50". Port numeric_equivalent to
web/lib/numeric-answer.ts and run it against the shared vector fixture.

Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
2026-11-24 18:27:49 +00:00
Bingxi Zhao (Frank)
dca4f5c562 fix(ui): keep the popover entrance off the card-lift keyframes
globals.css defines dt-pop-in as a 6px card lift (translateY(6px) scale(.985)), but modern.css redefined the same keyframes as a popover rise (scale(.97) translateY(-2px)). A duplicate @keyframes is last-one-wins, so every .animate-pop-in consumer — the settings card added here, the notebook record menu — silently ran the popover curve instead of the lift it asked for.

Rename the popover copy to dt-popover-in and point its three call sites (workspace menu, command palette, note toolbar panel) at it. Popovers keep their current motion; .animate-pop-in gets its documented 6px/0.985 lift back, verified by sampling the card transform at 0/60/120/200ms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-24 21:26:59 +08:00
yaqi
714e5ec292 feat(settings): show the fallback chain on the language models page 2026-11-24 18:30:19 +08:00
Bingxi Zhao
84cd0b44a9 feat(settings): ease the card in and give the apply button press feedback
The floating settings card used to appear in a single frame over the dimmed
app. Reuse the product's existing overlay/pop entrance classes so the panel
reads as placed over the page rather than popped in front of it, and add a
97% press state to the primary apply action so a click is acknowledged before
the request lands. Both inherit the global prefers-reduced-motion clamp.
2026-11-24 18:24:20 +08:00
Bingxi Zhao (Frank)
ed3a82eaf0 style(tests): format the new settings spec 2026-11-24 17:01:10 +08:00
Bingxi Zhao (Frank)
ef363546cb docs(settings): correct the rail exit comment 2026-11-24 16:57:21 +08:00
Bingxi Zhao (Frank)
a660c30f1e fix(settings): reuse the app scrim and keep the rail exit legible
The card's scrim was an 18% foreground tint, which turns into a cream veil in
the dark theme; the shell now reuses var(--overlay) like Modal, so the dimming
is the same colour the rest of the app uses in both themes.

The 224px rail had no room for a title and a labelled back button once a locale
spells both long, so the rail keeps an icon-only exit (aria-label kept) and the
phone header keeps the label. The rail's section list is taller than the card,
so it now shows a bottom fade while there is more to scroll and drops it at the
end, instead of leaving the last row sliced in half with no cue.
2026-11-24 16:49:55 +08:00
Bingxi Zhao (Frank)
d4a6fd344b fix(settings): keep the card readable across breakpoints and exits 2026-11-24 16:49:55 +08:00
Bingxi Zhao (Frank)
a75e804e75 feat(settings): render preferences as a floating card
Settings used to replace the whole window: a fixed full-height shell with a
248px rail and sections drawn as bare hairlines. It now opens as a
Claude-style preferences card — a scrimmed, rounded panel capped at 1080x820
(88dvh) with a 224px rail, and each section sits in its own bordered card so
the page stays light without going full screen. Phones keep the full sheet
because a floating card has no room there.

The settings heading drops from the 30/32px feature-page title to a 20px
card-scale heading via a local header instead of PageHeader, and the shared
save/discard toolbar stays pinned inside the card.
2026-11-24 16:49:55 +08:00
Qiuner
67deec1070 feat(mobile): scaffold React Native chat client 2026-11-24 04:08:27 -03: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
XingyuHou
6cd25b7b71 feat(codex-auth): auto-sync model catalog with multi-source version discovery and weekly drift check 2026-11-23 20:15:28 +08:00
ZQR1101
ade2d4ab1a feat(settings): add Persian (fa) as a model reply language
Persian can now be chosen as the language the model replies in, reusing
the same response-language seam that ar/ru/es/ms/hi already use: the
shared SUPPORTED_RESPONSE_LANGUAGES set, the settings router Literal,
the prompt language directive, the normalize aliases, and the web
response-language options/union.

This is reply-only: the UI locale stays English, and no Persian
translation pack or RTL dashboard is introduced. That broader
localization is a separate, design-level follow-up.

Regenerated the contracts (openapi.json + api.ts) to reflect the router
enum change so contracts:check stays green.
2026-11-21 18:24:23 +08: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