freezmo/components
Martin Dvorak 796e2e9fe9 Study cards: from-your-notes, read aloud, timed runs
From your notes: the generator now stores a verbatim source quote with every
activity (schema + prompt + a server-side clamp so a chatty model cannot drop a
card), and the feedback panel shows the sentence that carries it with the quote
highlighted green. Decks made before the change, and quotes the model trimmed,
fall back to a local IDF-weighted match over the saved notes text
(lib/notes-source.ts): nothing is shown unless at least two distinct terms
land. The passage hides in exam mode with the other reveals.

Read aloud: a Web Speech API speaker control on the text a learner reads
(flashcard faces, questions, statements, sentences, instructions) via
lib/speech.ts and components/SpeakButton.tsx — one utterance app-wide, a voice
matched to the deck's language, and no button at all where the browser has no
speech synthesis. It used to sit inside the flashcard's flip button (nested
buttons, tapping it flipped the card); it now lives next to the hint row.

Timed runs: the feed chrome carries a timer chip (off by default) that gives
each card 30 seconds; a card that runs out is recorded as a miss through the
same path as a wrong answer (history + SRS agree), shows a toast, and the feed
moves straight on with a fresh budget. handleAnswered ignores a second result
per card, so a timeout plus a manual answer cannot record twice.

The generator's type spec now names what each type suits (language decks lean
on flashcards/matching/fill blank, ordering needs a real sequence, short answer
reasoning), so the deck-aware guidance covers all seven types.

New activities-test suite (24 checks: quote path, local path, the green mark,
the speech stub, the timed run on Playwright's fake clock), registered in
run-all; phase2 pins that the notes passage stays hidden in exam mode; en+cs
keys for every new string; no new dependencies. Version 0.6.1, SW v83.
2026-10-15 05:53:47 +00:00
..
activities Study cards: from-your-notes, read aloud, timed runs 2026-10-15 05:53:47 +00:00
chat Chat chrome: one gutter, one radius scale, one even glass recipe 2026-10-14 21:32:50 +00:00
exam Report question: skip a broken card and tell the server 2026-10-12 07:12:55 +00:00
homework Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
AiDisclaimer.tsx Chat chrome: one gutter, one radius scale, one even glass recipe 2026-10-14 21:32:50 +00:00
ApiKeyGate.tsx Aero button glass + homework report control; reduced-motion sheet glitch 2026-10-14 09:19:54 +00:00
AppHeader.tsx One-pill study chrome, toggling chat pickers, readable homework steps 2026-10-12 14:21:11 +00:00
CookieConsent.tsx Aero goes underwater with rising bubbles; floating cookie notice; Czech title 2026-10-13 05:46:53 +00:00
DataSection.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
DeckCard.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
FolderBar.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
HomeworkCard.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
IceBackdrop.tsx Chat chrome: one gutter, one radius scale, one even glass recipe 2026-10-14 21:32:50 +00:00
icons.tsx Study cards: from-your-notes, read aloud, timed runs 2026-10-15 05:53:47 +00:00
InstallSheet.tsx Aero button glass + homework report control; reduced-motion sheet glitch 2026-10-14 09:19:54 +00:00
LearningSection.tsx Accessibility pass, report control for homework exercises, clearer rail actions 2026-10-12 21:15:56 +00:00
LegalPage.tsx Privacy policy, terms of service, cookie policy + a cookie notice 2026-10-12 21:26:55 +00:00
LibraryScreen.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
LinkLoadingScreen.tsx Link loading overlay escapes the glass card (portal to body) 2026-10-12 19:04:38 +00:00
LoadingState.tsx Aero button glass + homework report control; reduced-motion sheet glitch 2026-10-14 09:19:54 +00:00
ModelErrorActions.tsx Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
MotionPreference.tsx Design pass (all themes + chat UI), model picker, reduce-motion toggle 2026-10-14 05:06:02 +00:00
NotFoundScreen.tsx Custom Frutiger Aero 404 2026-10-14 15:27:47 +00:00
OfflineBanner.tsx Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
ProvidersSection.tsx Bring-your-own keys for cloud providers (OpenAI-compatible) 2026-10-14 06:29:39 +00:00
ReportQuestionButton.tsx Accessibility pass, report control for homework exercises, clearer rail actions 2026-10-12 21:15:56 +00:00
ResultsScreen.tsx Chat mode, phase 1: grounded streaming chat over your notes 2026-10-11 18:32:11 +00:00
ReviewClient.tsx Accessibility pass, report control for homework exercises, clearer rail actions 2026-10-12 21:15:56 +00:00
RouteLoading.tsx One loading screen everywhere (the deck wizard's) 2026-10-12 18:43:53 +00:00
RouteTransition.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
SegmentedPill.tsx Aero button glass + homework report control; reduced-motion sheet glitch 2026-10-14 09:19:54 +00:00
ServiceWorkerRegistrar.tsx Infra: split dev and production (releases, services, deploy script) 2026-10-11 19:25:29 +00:00
SessionFeed.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
SettingsDialog.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
ShareChooser.tsx Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
Sidebar.tsx Chat chrome: one gutter, one radius scale, one even glass recipe 2026-10-14 21:32:50 +00:00
SpeakButton.tsx Study cards: from-your-notes, read aloud, timed runs 2026-10-15 05:53:47 +00:00
StatsScreen.tsx Phase 2: learning engine — history, SRS review, mistakes, stats, exam, reminders 2026-10-10 14:15:21 +00:00
StudyFeed.tsx Study cards: from-your-notes, read aloud, timed runs 2026-10-15 05:53:47 +00:00
SyncSection.tsx Phase 1: backup, encrypted sync and monthly-usage handling 2026-10-10 13:43:42 +00:00
TabBar.tsx Aero button glass + homework report control; reduced-motion sheet glitch 2026-10-14 09:19:54 +00:00
ThemeSection.tsx New Aero background (Gemini-made), old credit removed 2026-10-13 08:10:05 +00:00
ThemeToggle.tsx Chat chrome: one gutter, one radius scale, one even glass recipe 2026-10-14 21:32:50 +00:00
Toaster.tsx Native-feel pass: PWA integration, system back, offline, haptics, undo 2026-10-10 12:16:03 +00:00
ui.tsx Design pass (all themes + chat UI), model picker, reduce-motion toggle 2026-10-14 05:06:02 +00:00
UploadScreen.tsx Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
WizardActionBar.tsx Aero button glass + homework report control; reduced-motion sheet glitch 2026-10-14 09:19:54 +00:00
WizardModeSwitch.tsx Lock the wizard mode switch while a run is generating 2026-10-10 17:47:05 +00:00