Commit Graph

225 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
9d822fcdf0 fix(ci): align preview fixtures and formatting with current contracts 2026-10-27 01:44:57 +08:00
Bingxi Zhao (Frank)
6bbcc00c55 Merge dev into preview, preserving preview features
Integrate dev fixes with preview's Python/TypeScript schedulers, chat queue, learning navigation, and live turn persistence.
2026-10-27 01:16:58 +08:00
Bingxi Zhao (Frank)
28c11e2ae8 feat: update notes, chat interactions and workspace UI on preview
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.

Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.

Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
2026-10-26 22:13:34 +08:00
Bingxi Zhao (Frank)
a31d82624c release: v1.6.15
Document Guided Learning improvements, chat and parsing recovery, retrieval comparisons, and native Gemini speech in assets/releases/ver1-6-15.md.

Synchronize README prose and 11 translations, archive older release notes, and bump the version. Resolve release-gate typing diagnostics, a prompt-only Bandit false positive, and SVG formatting.
2026-10-19 04:12:56 +08:00
Bingxi Zhao (Frank)
4fe1b5b24a fix(mastery): finish bounded memory and count preparation usage (#1920, #1926) 2026-10-19 03:44:51 +08:00
Bingxi Zhao (Frank)
e28c803636 fix(runtime): persist live prefixes and reclaim completed streams (#1971) 2026-10-19 03:29:21 +08:00
Bingxi Zhao (Frank)
583bdfc714 Merge PR #1945: fence edited submissions and isolate recovery by account and backend support 2026-10-19 01:03:40 +08:00
Bingxi Zhao (Frank)
8b73efbaeb Merge PR #1958: stabilize cached prefixes with bounded sources and complete summary accounting 2026-10-19 00:59:30 +08:00
Bingxi Zhao (Frank)
1497994c9f Merge PR #1938: bound tutoring history and retain exact recall when condensation fails 2026-10-19 00:57:48 +08:00
Bingxi Zhao (Frank)
3196b6d792 Merge PR #1954: prepare source evidence through a generic capability prerequisite contract 2026-10-19 00:48:43 +08:00
Bingxi Zhao (Frank)
0fd8dc8384 Merge PR #1953: source-bound assessment with portable lexical page lookup 2026-10-19 00:43:33 +08:00
Bingxi Zhao (Frank)
59cdd81170 Merge PR #1943: preserve grouped questions through reviewed outline revisions 2026-10-19 00:40:44 +08:00
Bingxi Zhao
2c4a02f7cc Merge pull request #1830 from dajiaohuang/fix/turn-admission-lease
fix(session): release admission leases after preference failures
2026-10-19 00:20:58 +08:00
Bingxi Zhao
3de64fdd02 Merge pull request #1834 from dajiaohuang/fix/pocketbase-message-cursors
fix(session): preserve opaque PocketBase message cursors
2026-10-19 00:20:34 +08:00
Bingxi Zhao (Frank)
399297e7f0 feat: preserve TypeScript engine migration and workspace updates 2026-10-18 23:09:10 +08:00
Bingxi Zhao (Frank)
857a82e74a feat(notes): add block notebooks with inline reviews and linked favorites
Add rich text and learning blocks, media uploads, page trees, and revisioned notebook storage. Present AI suggestions at their target blocks with durable accept and dismiss actions.

Unify saved outputs as Favorites with typed expandable blocks, stable source links, atomic batch insertion, nesting, dragging, and undo/redo.

Validation: 99 frontend tests and 99 backend tests pass in an isolated snapshot, along with TypeScript, scoped ESLint, dependency architecture, and locale parity checks.
2026-10-17 23:15:23 +08:00
Bingxi Zhao (Frank)
d70ab8609a Merge branch 'dev' into dt-exp-idp 2026-10-16 17:25:36 +08:00
Bingxi Zhao
0e784d5080 Merge pull request #1910 from YizukiAme/codex/fix-1909-image-compaction
fix(session): budget projected image replay before compaction
2026-10-15 03:23:49 +08:00
Bingxi Zhao
d348b42336 Merge branch 'dev' into codex/fix-1909-image-compaction 2026-10-15 02:04:18 +08:00
Bingxi Zhao
be0bd5d2e1 Merge branch 'dev' into fix/reading-viewport-time-seconds 2026-10-15 02:03:40 +08:00
zane-i
00b92f20c6 fix(session): stop the rolling summary from breaking the prompt cache
The summary was prepended inside the replayed history, so every
compaction rewrite changed bytes at the head of the request and threw
away the whole cached prefix behind it. Measured on a six-turn session
on a custom OpenAI-compatible route: the turn that rewrote the summary
dropped the shared prefix to one message and ran 21,629 prompt tokens
for 5,888 cached (27.2%).

Deliver it where the runtime-snapshot machinery already puts per-turn
context: as a trailing role=user message tagged _context_snapshot. A
rewrite is then a pure append, and an unchanged revision is a no-op.
replay_history no longer injects the summary, which is what kept it
mid-request whatever position it was given.

Two smaller fixes ride along, both in the same summary path:

* The summariser's scratchpad leaked into compressed_summary when the
  route emits reasoning inline. The stored summary was 6,933 characters,
  half of them the model's drafting monologue under an unclosed think
  tag, and the real summary was truncated by it. clean_thinking_tags
  cannot be used here - it deletes through end of text for an unclosed
  block - so the tag is honoured only when it is closed, and an unclosed
  one is cut at the first heading.

* _model_tokens counts the summary the way the request carries it.

The two regression tests that pinned the summary inside model_history
now assert the new delivery: the history starts at the oldest retained
turn and the summary still reaches the model.
2026-10-13 23:46:59 +08:00
yepyhun
3175b812e2 fix(mastery): make source delivery demand-driven and preserve partial teaching 2026-10-13 12:33:44 +02:00
yepyhun
ccac56eec1 fix(mastery): bind semantic assessment to verified question evidence 2026-10-13 12:21:04 +02:00
yepyhun
f986774b87 fix(chat): durably replace uncertain submissions and isolate recovery owners 2026-10-13 12:07:47 +02:00
yepyhun
c3301c0055 feat(mastery): support independently graded question groups 2026-10-12 21:03:14 +02:00
Bingxi Zhao (Frank)
90c070d77b feat: integrate Dito navigation with existing learning and partner workflows 2026-10-12 19:58:02 +08:00
Bingxi Zhao (Frank)
3cbecb2479 feat(workspaces): add scoped instructions and refine learning UI 2026-10-12 19:29:47 +08:00
yepyhun
499e6bc75f feat(mastery): bound tutoring memory with exact branch recall 2026-10-12 11:16:34 +02:00
jiangbianshu
07cf021d34 fix(reading): accept video playback time in the reading viewport
Since Watching converged into Reading (#1378), the reader reports
`reading_viewport.time_seconds` with every turn on a video material, but
`ReadingViewport` forbids extra fields and only declared `locator` and
`selection`. The WebSocket rejected each such turn with `invalid_command`,
so every question asked beside a YouTube/Bilibili video stayed "Not sent".

- Declare `time_seconds` (optional, >= 0) on `ReadingViewport`.
- Keep it in `_reading_viewport` (finite, non-negative, capped at 24h) so
  the reading capability's existing "Current media time" grounding
  actually receives it instead of silently dropping it.
- Regenerate the frontend contracts.
- Cover protocol acceptance and normalisation in tests/reading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:43:20 +08:00
YizukiAme
e747f28705 fix(session): budget projected image replay before compaction 2026-10-10 00:33:40 +08:00
dajiaohuang
019ed329c6 fix(session): preserve opaque PocketBase message cursors 2026-10-08 12:45:32 +08:00
dajiaohuang
8ef659c4ce Merge commit '6cf793bd868ba5ecbe64722936d4be8fab5a01df' into fix/turn-admission-lease
# Conflicts:
#	deeptutor/services/session/turns/request_preparer.py
2026-10-08 12:42:35 +08:00
dajiaohuang
489b399cd4 fix(turns): release admission leases after preparation failures 2026-10-08 12:40:44 +08:00
Bingxi Zhao (Frank)
6cf793bd86 release: v1.6.14
Ship original-source visual practice, recoverable indexing, unified video
Reading, scientific research tools, managed plugins, and a learning journal
as summarized in assets/releases/ver1-6-14.md.

Improve provider setup and protocol-aware endpoints. Restore missing
localized setup and Ukrainian UI text, keep plugin loading in the plugin
layer, harden research XML parsing, and repair isolated test fixtures and
type-checking errors found by the release gate.

Sync README prose and all eleven translations, bump the package version,
and update the stable release announcement.

Validation: 10180 Python tests and 8 subtests passed (28 skipped); 1303
Node tests passed on Node 22; 24 provider UI tests passed. All pre-commit
hooks, ruff, translation checks, documentation checks, and docs build passed.
2026-10-08 11:34:42 +08:00
Bingxi Zhao (Frank)
64bc0d8e7c feat(learning): expose a durable workspace journal overview (#1407)
Adapt the journal foundation from PR #1226 and add a read-only mission, handoff and confirmed-record panel. Share its snapshot with turn injection, preserve corrupt files, and serialize worker writes.

Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
2026-10-08 03:11:15 +08:00
Bingxi Zhao (Frank)
8986c31580 feat(reading): complete Watching convergence with safe legacy migration (#1378)
Adapted the migration foundation from PR #1384 while preserving current workspace, caption and turn-admission safeguards.

Co-authored-by: XZH <cto@xzh.ai>
2026-10-08 02:48:50 +08:00
Bingxi Zhao (Frank)
d15e35a378 fix(turns): make lost-ack resends reuse the original conversation (#1793) 2026-10-08 01:20:23 +08:00
Bingxi Zhao (Frank)
e49f518669 Reconcile user setup and provider changes with all reviewed PRs 2026-10-07 20:54:24 +08:00
Bingxi Zhao (Frank)
2046f71888 fix(chat): delete paired messages by branch ancestry 2026-10-07 20:39:30 +08:00
Bingxi Zhao (Frank)
f8be756906 Integrate saved user workspace changes with reviewed dev updates 2026-10-07 20:37:55 +08:00
Wenjun Li
fdebb2761e fix(chat): keep parked ask_user turns alive across deletion and reload (#1789)
* fix(session): delete a message's own turn and refuse active-turn deletion

Resolve the owning turn via `turns.assistant_message_id` for assistant rows
and the user row's `metadata.turn_id`, falling back to the last turn created
at or before the user row for legacy data. The previous `created_at >=` match
selected the *next* turn, because a turn row is always written before its user
row (`begin_turn` -> `add_message`); deleting a completed turn's message could
therefore destroy a later `waiting_input` turn's record while its task still
held the session lease.

Refuse the delete whenever the resolved turn is in `ACTIVE_TURN_STATUSES`
(queued/running/waiting_input) instead of only "running"; the API answers 409
with "running or waiting for input".

* fix(chat): resubscribe a parked turn on load so its ask_user card survives a reload

A `waiting_input` turn keeps the session lease while it waits, and its
ask_user card exists only in the live event stream: no assistant row is
persisted until the turn settles. Loading a session only resubscribed
"running" turns, and through `sendThroughRunner`, whose retry gate drops a
non-streaming session -- so after a reload the card was unreachable while the
turn kept waiting, and the conversation could neither be answered nor used.

Parked turns now subscribe through the client's durable command queue (sent
once the socket opens), once per turn per tab. The replayed stream rebuilds
the card so it can be answered.

* test(chat): align the loader-gate assertion with the parked-turn resubscribe

The source-shape assertion pinned the previous loader line
(`if (loadedStatus === "running" && (activeTurn?.turn_id || activeTurn?.id))`).
The parked-turn resubscribe extracts `activeTurnId` first and adds a
`waiting_input` branch, so update the assertion to the new gate and cover the
parked branch's status check as well.
2026-10-07 20:37:04 +08:00
Bingxi Zhao (Frank)
f07029cfcf release: v1.6.13
Ship the reading, listening, question-bank, parsing, and provider updates
summarized in assets/releases/ver1-6-13.md.

Make speech timeouts configurable, report actionable synthesis failures,
and keep chat attachments discoverable in their selected workspace while
preserving earlier uploads and URLs. Keep reply playback cancellation and
single-audio ownership intact.

Sync README prose and all eleven translations, update the stable install
note, and archive release notes older than one week. Repair stale reading
test fixtures and spawned test imports, and clear the Partner type error.

Validation: 9252 Python tests and 8 subtests passed (28 skipped); 518 web
unit tests, 1253 Node tests, and 62 browser audits passed. Pre-commit, ruff,
typecheck, contracts, architecture, i18n, production build, route budgets,
and the docs build passed.
2026-10-04 21:35:00 +08:00
Bingxi Zhao
36e5ea1189 Merge pull request #1659 from ZyPulse-zy/fix/image-context-budget
fix(session): budget image blocks without tokenizing encoded payloads
2026-10-04 15:01:56 +08:00
Bingxi Zhao (Frank)
dfeb2fb4f3 Merge dev into PR #1657 and preserve integrated behavior 2026-10-04 14:22:45 +08:00
Bingxi Zhao
af8ec78467 Merge pull request #1626 from maximilianfeix/fix/mastery-card-answer-kb-seed
fix(mastery): don't pre-search the KB with a quiz card answer
2026-10-04 14:11:12 +08:00
Bingxi Zhao
b3ee1c7ca9 Merge pull request #1682 from evan188199-tech/codex/fix/tutor-latex-selection
fix(session): ground rendered LaTeX selections (#1676)
2026-10-04 14:10:53 +08:00
Bingxi Zhao
d9aa28ef30 Merge pull request #1615 from MohammadHijjawi97/fix/question-bank-counts-skip-recycled
fix: keep recycled sessions out of question bank counts
2026-10-04 14:02:14 +08:00
XZH
3dad78fcbc fix(session): ground rendered LaTeX selections (#1676) 2026-10-01 03:35:43 -07:00
ZyPulse
05aabcbdf8 fix(session): budget image blocks without tokenizing encoded payloads 2026-09-29 23:08:11 +08:00
XZH
cd474bc824 feat(reading): add server-owned quiz star rewards (#1656) 2026-09-29 06:17:54 -07:00