DeepTutor icon indicating copy to clipboard operation
DeepTutor copied to clipboard

feat(learning): a read-only journal overview panel for mission and handoff (Part of #740)

Open ZQR1101 opened this issue 2 months ago • 2 comments

Do you need to file a feature request?

  • [x] I have searched the existing feature requests and pull requests.
  • [x] I believe this is a legitimate feature request, not a question or bug.

Feature Request Description

#740 introduces a stateful learning journal (mission / last-session handoff / confirmed records), currently carried by PR #1226 (storage + tools + prompt injection, backend only). Once it lands, the journal is functional but invisible: the learner cannot see what the tutor believes their current mission is, when the last session ended, or which records were confirmed — the only surfacing today is a token-count line in the context-budget popover.

This proposes a read-only journal overview panel so the learner can inspect — and trust — the state their tutor is carrying across sessions:

Proposed scope

  • A journal overview panel in the Learning Space (alongside notebooks / question bank), rendering the three existing entities as-is: current mission (goal + constraints), the last-session handoff (summary + next focus), and confirmed records (newest first).
  • Read-only by design: editing stays in conversation via the existing learning_update tool — the panel reflects what the tutor will actually be injected with, so it must not become a second editing path that drifts from the stored state.
  • Show the same snapshot the turn executor injects (mission + handoff; records behind the panel), so what the learner sees is exactly what the model sees.
  • Empty state: a short "the tutor has no mission for you yet — ask it to set one" hint instead of a blank panel.
  • i18n (en/zh) and per-user scope via the existing per-workspace learning_journal/journal.json store.

Out of scope

  • No editing, no scoring, no gates — the journal deliberately stays soft state (preferences belong to Memory, graded curricula to Mastery Path).
  • No new storage format or API surface beyond a read endpoint if needed.

Relation to #740 / #1226

Part of #740. #1226 ships the backend; this is the visibility half. The two compose: once #1226 merges, this gives the journal a user-facing surface; if reviewed together, the panel can be accepted against the same data contract.

ZQR1101 avatar Sep 11 '26 08:09 ZQR1101

Claim: learning-journal-overview-panel

Planned scope (matching the issue):

  • Read-only panel under Learning Space rendering mission / last-session handoff / confirmed records from the per-workspace learning_journal/journal.json.
  • Same injected snapshot the turn executor reads, so the panel shows exactly what the model sees; empty state included.
  • i18n (en/zh); storage format untouched. Will link a PR shortly.

ZQR1101 avatar Sep 11 '26 08:09 ZQR1101

Completed on local dev in commit 64bc0d8e7. This change will be included in the next release.

Learning Space now links to a read-only learning journal overview with the current mission (topic, purpose and level), last-session handoff (summary, next focus and timestamp), and confirmed records newest first. The empty state directs the learner to set a mission in conversation; failures show a refresh/retry path. English, Chinese, German and Polish copy is included. There is no editing or scoring path in the panel.

The missing backend foundation from PR #1226 has been adapted to current dev: conversational learning_status / learning_update, workspace-scoped atomic storage, and a mission/handoff snapshot injected at turn start. The read endpoint and executor use the same snapshot renderer, with records left out of automatic injection. Selected-text tutoring does not inherit an unrelated mission. Journal data remains runtime background information rather than system instructions.

Reads create no journal files. Invalid or unreadable files are preserved instead of being rewritten as empty journals; updates are serialized across workers. Switching workspaces cannot display a late response from the previous workspace.

Validation: 275 related backend tests, 3 panel workflow tests, 1302 Node tests, TypeScript, dependency-boundary and i18n checks passed. Ruff and focused ESLint passed with zero errors. Regression cases cover two simultaneous writers, corruption preservation, pure reads, per-workspace isolation, exact injection/view agreement, newest-first records, retry, and stale responses.

Closing as completed; the release has not been published yet.

pancacake avatar Oct 07 '26 19:10 pancacake