Skip to content

feat: add immersive reading workspace - #719

Open
zha-chicken wants to merge 1 commit into
HKUDS:devfrom
zha-chicken:codex/immersive-reading
Open

feat: add immersive reading workspace#719
zha-chicken wants to merge 1 commit into
HKUDS:devfrom
zha-chicken:codex/immersive-reading

Conversation

@zha-chicken

Copy link
Copy Markdown

Summary

  • add an Immersive Reading workspace for TXT, PDF, EPUB, MOBI, FB2, XPS, and Markdown/text books
  • track chapter progress, citations, selection actions, and source-faithful chat references
  • gate chapter transitions with Focus-Checks while skipping front matter and preserving passed checkpoints
  • add exact, fuzzy, fast-description, and fine-description search modes

Description search

  • builds persistent per-chapter retrieval cards in the background with bounded concurrency
  • routes fast queries without extended reasoning, then deep-searches candidate chapters in parallel
  • automatically falls back to the existing fine full-book search when confidence is low
  • runs long description searches as background jobs polled by the UI to avoid proxy timeouts
  • enables description matching only when the configured default model exposes at least a 50k context window

Focus-Check behavior

  • evaluates only the current checkpoint chapter, or the current 20k-character chunk for unchaptered books
  • skips front matter and very short prefaces
  • preserves passed checkpoints until the reader chooses "Read Immersively Again"
  • uses the default model without extended reasoning and allows up to 255k output tokens
  • surfaces model/runtime failures as transient notifications instead of converting them into zero scores

Chat integration

  • lets readers attach selected chapters from imported books to regular chat
  • adds the selected reading sections to the source inventory and runtime context

Validation

  • pytest tests/immersive_reading/test_service.py tests/services/session/test_source_inventory.py tests/services/session/test_regenerate.py tests/api/test_unified_ws_turn_runtime.py -q --disable-warnings
  • ruff check on all changed Python files
  • ruff format --check on all changed Python files
  • npx tsc --noEmit
  • npm run lint -- --quiet
  • npm run i18n:check
  • npm run build
  • git diff --check

@zha-chicken
zha-chicken marked this pull request as ready for review July 28, 2026 07:14
@zha-chicken

Copy link
Copy Markdown
Author

Immersive Reading UI screenshots: fast description search, Focus-Check, and text-selection actions.

deeptutor-fast-search deeptutor-focus-check deeptutor-text-selection

evan188199-tech pushed a commit to evan188199-tech/DeepTutor that referenced this pull request Aug 11, 2026
- Port immersive_reading backend module (service, models, API router)
  supporting EPUB/TXT/PDF/MOBI/FB2 import with chapter extraction,
  reading progress, search, citations, and Focus-Check
- Register /api/v1/immersive-reading router in main.py
- Add immersive-reading frontend page with library, reader, and search
- Add sidebar navigation entry
- Port immersive-reading-api.ts and reading-references.ts
- Add reading_references to unified-ws.ts message type
- Add 83 i18n keys (en/zh) for immersive reading UI
evan188199-tech pushed a commit to evan188199-tech/DeepTutor that referenced this pull request Aug 11, 2026
Port the immersive_reading workspace feature directory and document root
methods from PR HKUDS#719 so the service can create and locate document storage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant