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(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>
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>
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
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.
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.
A PDF page is one bitmap by the time it reaches the DOM, so a picture inside it
has no element to click and no way to be read at its own size. A thumbnail in a
600-page scan could not be opened at all.
The operator list still knows where each picture was placed: `paintImageXObject`
draws the unit square through the current transformation matrix, so replaying
save/restore/transform/form-object pairing recovers the rectangle each picture
covers. Those rectangles become hotspots; clicking one opens the picture whole in
a preview with pan and zoom.
Four things that only show up once this meets real documents:
- **Hotspots sit UNDER the text layer, not over it.** They were DOM siblings
after the text layer, so they stacked above it — and on an OCR scan, where one
image covers the whole page, a single button sat over every word: selection,
highlighting and clicking an existing annotation all stopped responding. A box
covering most of the page is dropped in the geometry layer (it is the page
bitmap, not a picture in it), the hotspots render before the text layer, and
the mouseup guard that swallowed a selection ending on a picture is gone.
- **Only the active page is measured.** `getOperatorList` runs its own rendering
intent, cached separately from the display one, so measuring the whole retained
window parsed and decoded thirteen pages of images twice — full-resolution
bitmaps kept on the main thread, past the canvas budget the visible ones obey.
- **Pictures inside annotation streams are skipped.** A stamp or signature is
painted into the annotation's own canvas after the renderer resets the
transform, so replaying its matrix as page space put the hotspot near the page
origin, over whatever happened to be there.
- **The preview is a real modal.** It declared itself one but never took focus,
so ⌘+/− acted on the page behind it and closing dropped focus on `<body>`. It
focuses itself on open, restores the previous element on close, and stops
Escape from also reaching the Guided Learning handler — both listeners sit on
`window`, so `preventDefault` was never going to work. The stage no longer
swallows every click either: a click on the empty area closes the overlay, a
click on the picture does not.
The preview also sizes the canvas from the picture's box rather than its width
alone: a scanned page — one full-page hotspot — opened at 2.7x showing its middle
third, with zoom clamped at 1 and no way out.
A PDF page was drawn at the pane's width, so the document's own white margins
sat on screen twice over — the page's margins plus the pane's padding. On a
1440px window that is roughly 735px of page inside a ~1165px pane, and the type
was about a fifth smaller than the pane could show. Zooming fixed the size but
cost horizontal scrolling: past Fit, reading meant dragging the page left and
right on every line.
**Fit text** trims the page's white margins by measuring where the ink actually
stops, then draws the page wider than the pane and clips it to the text block —
so the type fills the column without horizontal scrolling. **Fit page** is the
old behaviour, kept as its own mode. The zoom step became continuous (a factor
rather than a ladder), so a pinch settles anywhere and the next press starts
from what is on screen.
The measurement is the part that is easy to get wrong. It renders the page into
a 200px-wide scratch canvas rather than reading the operator list, because a page
that paints a white rectangle behind its text — which most do — would report a
full-page box from the operators alone, while the pixels show where the text
actually stops. Two consequences are handled here: a page whose render promise
never settles (some embedded browsers paint but never resolve) is given a
one-second bound and drawn uncropped, and a timed-out answer is not cached, so a
remount measures again instead of inheriting "nothing to crop" from a browser
that never replied.
Marks and paints are stored and converted in page space, not strip space: the
annotation layer paints on the full page while the visible strip is a crop of it,
so a rect normalised against the strip was stretched and shifted — a rect at
100px rendered at 62px.
A step is measured against the width that actually landed, and past the canvas
budget's ceiling the control disables rather than asking for a size below what is
drawn: a small page in a wide pane, trimmed to a half-width text block, can be
drawn above 400%, and clamping the ratio then stepping made "zoom in" shrink it.
A zoom that lands on the committed width drops its scroll anchor instead of
leaving one behind for the next pane resize to consume.
The crop ratio is state rather than a ref: the toolbar's enablement is derived
from it, and a ref write does not re-render — so the button stayed live until
something else happened to render.
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.
The add/edit form had no control for MCPServerConfig.auth, so a custom
OAuth-only remote server connected with no credentials, got 401, and never
showed the Connect button. Add an Authentication select (None / OAuth) to the
remote block, thread it through buildMcpServerConfig as an explicit draft field
that keeps the stored value when unset, and cover the new-URL-server,
header-only, and catalog-edit paths in tests.
Signed-off-by: evan188199-tech <238371241+evan188199-tech@users.noreply.github.com>
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.
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.
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>
Defer protocol selection until provider configuration. Start custom providers on Auto and preserve manual protocol selection in settings.
Co-Authored-By: GPT-6 Astra
BookCreator and CreateTopicWizard passed i18next's t to
useTopicSourceLibrary, which calls its translator as (zh, en). i18next
read the Chinese text as the key and the English text as the default, so
labels such as "Untitled question" stayed English even in Chinese.
catalogTranslate() builds the (zh, en) translator from t for all three
callers, and the message and file counts become interpolated keys.
The resource and personalization shelves in the sidebar and command
palette, the tools page section titles and availability notes, and the
system and general workspace names picked the English text directly
outside Chinese. They now go through t(). The settings search heading
and the appearance blurb get their missing catalog entries.
The mastery dashboard and the learner profile showed the next-step
labels in English for every language but Chinese. The labels now go
through t(); the server-provided reason stays as-is.
The EduHub import dialog chose between inline English and Chinese text.
Its labels now go through t(), and the download count and import error,
which were assembled from fragments, become interpolated keys.
Data migration chose between inline English and Chinese text, so other
languages saw English. Labels and statuses now go through t(), the
conversation and file counts use the existing plural keys, and the
feature list is joined with a comma outside Chinese instead of 、.
The connected-agents page, the subagent settings editor and the run
transcript toggle picked between inline { zh, en } text, so every other
language saw English. The non-Chinese branch now goes through t(); the
three strings that were template literals become interpolated keys whose
Chinese values are the old inline text. The subagent sync time follows
the interface language instead of zh-CN or en-US.