freezmo/app
Martin Dvorak 6036238bf0 Teach it back: the AI becomes the curious student
A new mode where the user explains a topic in their own words and the AI
plays a curious classmate: short reactions, exactly one follow-up question
at a time, never "correct"/"wrong", never lecturing, and everything it knows
comes from the user's own decks and notes.

- Entry points: a sidebar row next to Exam mode and a "Teach it back" action
  in every deck's menu (which prefills the topic and scope).
- Start screen: deck or typed topic, friendly/skeptical student, the same
  context and model chips as Chat (/teach?deck=<id> pre-selects the deck).
- Session: the student prompt is a mode of the existing /api/chat route, so
  model resolution, allowlists, rate limits and the streaming client are the
  same code; the personality lives in lib/prompts.ts (TEACH_*). The deck's
  cards travel as a numbered checklist and the student is told to ask about
  the ideas that were skipped; it must say so rather than guess when the
  notes cover nothing. One constant (TEACH_MAX_EXCHANGES = 10) ends the
  session, or the Finish button does.
- Recap: a teach_summary call (JSON, one repair retry) yields well / gaps
  with card references / next steps; each gap links to the card it means.
  "Add missed cards to review" schedules those activities due now; "Turn
  gaps into cards" generates one flashcard per gap from the deck's notes and
  shows an editable review list before saving.
- Sessions are chat conversations with a mode:"teach" marker + session
  record: same IndexedDB history, backup and sync, filtered out of the Chat
  screens; the recent list reopens a recap or continues a session.
- Reused pieces: MessageRow, Composer (now optional attach/scope chips and a
  mic), Markdown/KaTeX, AiDisclaimer, ContextPicker/ModelPicker, plus a
  shared useChatModels hook and useKeyboardInset extracted from Chat.
- Dictation: Web Speech API recognition (lib/speech-input.ts); the mic only
  renders where the browser supports it, and dictated phrases land in the
  draft.
- All strings in en + cs. teach-test: 44 checks (API prompts and guards,
  both entry points, the session, recap actions, history, exchange limit,
  360/390px layouts, mic on/off). Version 0.8.1, SW v103.
2026-10-16 23:05:24 +00:00
..
api Teach it back: the AI becomes the curious student 2026-10-16 23:05:24 +00:00
chat Chat mode, phase 1: grounded streaming chat over your notes 2026-10-11 18:32:11 +00:00
cookies Privacy policy, terms of service, cookie policy + a cookie notice 2026-10-12 21:26:55 +00:00
create App versioning + the create page's missing top padding 2026-10-12 20:04:26 +00:00
deck/[id] Accessibility pass, report control for homework exercises, clearer rail actions 2026-10-12 21:15:56 +00:00
exam Smart Review: instant loading feedback, no more dead-feeling tap 2026-10-11 14:35:16 +00:00
homework Navigation restructure: five-tab bottom bar, no phone drawer 2026-10-10 16:53:55 +00:00
offline Add an English/Czech interface language switch 2026-10-08 13:56:32 +00:00
podcast Podcast mode: notes read aloud with a lyric-style word highlight 2026-10-16 11:42:15 +00:00
privacy Privacy policy, terms of service, cookie policy + a cookie notice 2026-10-12 21:26:55 +00:00
review Smart Review: instant loading feedback, no more dead-feeling tap 2026-10-11 14:35:16 +00:00
share Navigation restructure: five-tab bottom bar, no phone drawer 2026-10-10 16:53:55 +00:00
share-target Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
stats Smart Review: instant loading feedback, no more dead-feeling tap 2026-10-11 14:35:16 +00:00
teach Teach it back: the AI becomes the curious student 2026-10-16 23:05:24 +00:00
terms Privacy policy, terms of service, cookie policy + a cookie notice 2026-10-12 21:26:55 +00:00
favicon.ico Use the new app icon everywhere 2026-10-08 00:38:54 +00:00
globals.css Aero music: the button works on the podcast player 2026-10-16 21:04:39 +00:00
layout.tsx Frutiger Aero: the theme now plays its soundtrack 2026-10-15 22:47:44 +00:00
manifest.ts Accessibility pass, report control for homework exercises, clearer rail actions 2026-10-12 21:15:56 +00:00
not-found.tsx Custom Frutiger Aero 404 2026-10-14 15:27:47 +00:00
page.tsx Podcast mode: notes read aloud with a lyric-style word highlight 2026-10-16 11:42:15 +00:00