Commit Graph

28 Commits

Author SHA1 Message Date
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)
399297e7f0 feat: preserve TypeScript engine migration and workspace updates 2026-10-18 23:09:10 +08:00
Bingxi Zhao (Frank)
6ab4f9a766 feat(web): add classic/modern layout switch with Notion-style modern chrome
- Settings → General gains a classic/modern layout choice; classic is a frozen
  snapshot of dev's sidebar and learning dashboard, modern keeps iterating.
  Variants differ only through slots, tokens and per-variant CSS on
  <html data-ui-layout>; the preference lives in localStorage.
- Modern chrome: warm neutral tokens, WorkspaceMenu header, ⌘K command palette
  and keyboard shortcuts, PageBar location strip, swipeable PartnerRoster.
- Remove dead HomeShortcuts, WorkspaceSwitcher and the inline sidebar search
  query chain.
2026-10-15 23:00:23 +08:00
Bingxi Zhao (Frank)
fd8f108178 fix: restore lighter page styling with subtle navigation refinements 2026-10-13 03:21:51 +08:00
Bingxi Zhao (Frank)
1c735c75ea feat: unify page chrome and refine DeepTutor navigation 2026-10-13 00:14:50 +08: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
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)
f8be756906 Integrate saved user workspace changes with reviewed dev updates 2026-10-07 20:37:55 +08:00
Bingxi Zhao (Frank)
95e3c7749a fix(practice): return library practice to its scoped collection 2026-10-04 14:32:11 +08:00
Chanson4
8a95c4feaf feat: start practice from question bank 2026-09-28 17:43:45 +08:00
Bingxi Zhao (Frank)
108ca70072 fix(web): migrate learning and reading button title hints (#1526) 2026-09-27 10:29:14 +08:00
Bingxi Zhao (Frank)
53436f8190 feat(reading): collections as colored folders; rework reader interactions
Collections vs workspaces: a workspace holds many collections, and a
collection's files and reading conversations live in the workspace it
was created in. The library now shows collections as folders grouped
under their workspace, and creating one asks which workspace it goes
into.

- Folder page at /learning/reading/folders/[folderId]: breadcrumb,
  files, the collection's conversations, and "Start reading" that opens
  the whole folder in the reader. The reader's back link returns to it.
- Collections carry a user-picked color (new `color` column, migrated);
  tones are --folder-* tokens with dark variants.
- One shared "New collection" / "Edit collection" dialog with consistent
  type sizes.
- Selection popover gains AI actions; results land as cards at the foot
  of the companion. Read-aloud is a single header toggle.
- The three ⋯ menus (collection, document, conversation) merge into one.
- Outline toggle moves to the left and starts closed; navigator has
  Outline / Annotations tabs.
- Reading conversations live in the main sidebar (with a page-shaped idle
  mark) instead of a history dropdown in the companion.
- Fix sidebar rows never showing a selected state
  (bg-[var(--background)]/60 compiled to nothing).
- Composer floats over the conversation (no divider, bottom fade); the
  toolbar wraps by content instead of splitting under 420px.
2026-09-23 18:59:17 +08:00
Bingxi Zhao (Frank)
eabc17d79f release: v1.6.10
Native LightRAG role models: extraction, keyword, query and vision each
resolve their own model, vision indexing pins a vision-capable model
instead of silently degrading, and a knowledge base records which models
and which embedding built it. A published index refuses queries after its
embedding identity changes rather than searching a foreign vector space,
and a rebuild is confirmed against the configuration it will actually
use — a stale confirmation is rejected instead of quietly rebuilding
something else. A failed publication is withdrawn, not left half-written.

PDF attachments follow the parsing engine configured for the workspace,
report the stage they are in, and a truncated answer says it was
truncated with the counters that prove it. Providers are no longer
filtered out of the embedding picker on an unverifiable capability guess:
configure the model and test it. Visualize's temperature and token budget
are settings rather than literals. Notebook evidence no longer depends on
the chat session that produced it.

See assets/releases/ver1-6-10.md for the full notes, and the README
translations for the propagated prose.
2026-09-22 21:36:27 +08:00
Bingxi Zhao (Frank)
da856ad670 release: v1.6.9
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.

Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
2026-09-21 02:30:40 +08:00
Bingxi Zhao (Frank)
04cc156fa8 daily update 2026-06-13 19:51:44 +08:00
Bingxi Zhao (Frank)
452de66729 release: v1.4.3 — TutorBot→Partners, single-loop Chat, real multi-user isolation
The biggest cut since v1.4.0:

- Partners: TutorBot renamed and rebuilt on the product chat agent loop —
  production IM pipeline (retry/dedup/coalescing, per-channel delivery),
  live streaming on Telegram/Discord/Feishu, new WeCom AI Bot channel
  (15 connectors), web-chat attachments, soul template library + editor.
  Automatic non-destructive migration from data/tutorbot/; HTTP API moved
  to /api/v1/partners.
- Chat: single exploring agent loop with native tool calling; Activity
  header with collapsible thinking/tool trace.
- Multi-user: per-user grants v2 (tools/MCP/exec), data/users + data/system
  layout with automatic migration, runner mounts only the user workspace.
- Visualize: inline themed SVG, structured prompts, local validate+repair
  replacing the LLM review round.
- Co-writer Mermaid diagrams + selection RAG/web; file viewer docx/xlsx
  previews; MinerU cloud parsing backend; office skills on by default;
  CLI chat renderer rewrite.
- Docs rebuilt at deeptutor.info: per-channel setup guides (en+zh),
  refreshed screenshots.
- Pre-commit clean sweep: defusedxml for SVG validation, usedforsecurity
  flags on content hashes, mypy fixes, types-croniter stub.

Release notes: assets/releases/ver1-4-3.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 17:17:43 +08:00
Bingxi Zhao (Frank)
46093e5e2b update msg 2026-06-11 20:03:34 +08:00
Bingxi Zhao (Frank)
e3a351a488 refactor(guided-learning): post-merge hardening of #500
Security/correctness:
- Stop leaking diagnostic answers: persist a _sanitize_diagnostic() snapshot
  (drops top-level answers + inline answer keys) into progress.diagnostic,
  which is returned verbatim by the /progress endpoints. Grading is unaffected
  (authoritative answers live in LearningStore).
- _safe_json_parse + generate_from_notebook now use the shared fence-stripping
  parse_json_response instead of bare json.loads, so the common fenced/lightly
  -malformed LLM output is recovered instead of silently dropped / 500'd.

Decoupling:
- unified_ws change_module: move module lookup + PRETEST reset into
  LearningService.switch_module(); router keeps only the WS ordering
  (module_changed before cancel) and no longer imports learning.models.
- unified_ws check_active_turn: use new public TurnRuntimeManager
  .has_live_execution() instead of reaching into _lock/_executions.
- redo endpoint: LearningStore.clear_questions() instead of poking _questions_path.
- remove unused StreamEventType.USER_INPUT enum; document the WS message types.

Stability:
- LearningStore: question read-modify-write (save_question_answers/_meta),
  delete(), and clear_questions() now hold _cas_lock — consistent concurrency
  model; _atomic_write_text cleans up its temp file on failure.

Cleanliness/clarity:
- router: shared _validate_book_id() (9 endpoints) + _parse_modules()
  (init/replace); _classify_error drops unused expected_answer param.
- guided_learning: hoist logging/RAGService imports + module logger; move tuning
  constants to class top; ContextVar declared after imports.
- storage: hoist json import (7 inline copies removed).
- pocketbase_store: move _VALID_ID/_validate_id below the import block.
- rename misleading mastered_pct -> avg_mastery_pct (service + web consumers).

Frontend:
- learning [bookId] page uses lib fetchProgress (apiFetch -> auth redirect)
  instead of a raw credentials fetch; track/clear the retry + auto-advance
  timers on unmount; drop dead currentStage state + ModuleTree prop.
- learning-api: remove orphaned submitAnswer + AnswerRequest.
- CreateModuleDialog: use the static bookApi import; reset manualBookId to ''
  to match initial state; learning list page: stop shadowing the t() translator.

Conflict-resolution carryover: dropped the PR's incidental 300s factory timeout
(kept dev's stream runner).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 14:28:32 +08:00
unknown
e219b0b898 fix: rename passRate to masteryPercent, relax module name validation
- Rename passRate variable to masteryPercent in ModuleTree to match average mastery semantics
- Remove module name requirement from CreateModuleDialog (only KP count matters)
- Sync i18n strings for updated validation message
2026-05-21 00:56:15 +08:00
unknown
6934db4a91 perf: unified LLM/RAG timeout, per-stage degradation, and code cleanup
- Add stage_failure_counts/stage_failure_notes to LearningProgress for persistent failure tracking
- Wrap RAG retrieval with 10s independent timeout in _call_llm_impl
- Add _call_llm_with_timeout (default 60s) and _call_llm_with_degradation (bounded retry + skip)
- Apply degradation to all 12 stage handlers with stage-specific fallback paths
- Extract _run_interactive_quiz_loop shared helper for practice/practice_quiz
- Extract StructuredStageContent component from page.tsx
- Add TypeError to JSON parse except clauses across 7 files
- Simplify _record_attempt_and_update_mastery to single save exit
- Move import logging to module top in service.py
2026-05-21 00:07:31 +08:00
whf
a321b0a21f Fix 3 UI polish issues from frontend audit
Issue #2: Add knowledgePointsLabel locale key for standalone label usage
instead of reusing number-suffix key ('个知识点' → '知识点').

Issue #3: Delete 9 empty auto-generated test modules cluttering /learning
page (retain 'default' with 3 modules and 'init3').

Issue #4: Default manual book ID to empty string instead of 'manual'
to avoid leaking implementation detail to users.
2026-05-18 20:50:49 +08:00
whf
d086a06b90 Fix 3 P2 bugs from Codex global review: manual module id collision, stale chapters on book switch, stage not reset on module switch 2026-05-17 12:56:24 +08:00
whf
7b273d8db8 Block 8 refinement: remove KB placeholder tab, use bookApi.list, LLM parsing type safety, toast on import failure 2026-05-17 02:22:36 +08:00
unknown
64989bd3e7 Block 7+8: Book integration + Create Module dialog (4 tabs)
Block 7: "Start learning" button on BookLibrary cards, import-from-book
endpoint, handleLearn with duplicate progress check, i18n keys.

Block 8: CreateModuleDialog with manual/book/KB/notebook tabs,
generate-from-notebook backend endpoint with LLM extraction,
listBooks/generateModulesFromNotebook API functions, 30+ i18n keys.
2026-05-17 00:05:16 +08:00
whf
1e37128eca Block 4: ModuleTree interactive — click to switch learning module 2026-05-16 22:46:13 +08:00
unknown
91dbafbe75 Block 7.5: i18n completion, WS reconnect with backoff, error retry button
- Add 16 i18n keys for guided learning (en/zh): input placeholder, submit button, no modules text, 13 stage labels
- Replace hardcoded STAGE_LABELS with t() calls using dynamic i18n keys
- Replace hardcoded "No modules loaded" in ModuleTree with i18n
- Add WebSocket auto-reconnect with exponential backoff (1s/2s/4s/8s, max 5 attempts)
- Add "Reconnect" button on error state for manual retry
- Add intentional disconnect on unmount to prevent ghost reconnects
2026-05-16 11:36:50 +08:00
whf
2620bf01b4 Block 9: ModuleTree nav component with mastery indicators, fetch progress from API 2026-05-14 04:20:33 +08:00