freezmo/app
Martin Dvorak 982391ca45 Codebase audit: fix bugs, performance issues, dead code, and edge cases
1. Bugs fixed:
- Backup schema now accepts theme: "aero" so backups exported under
  Frutiger Aero pass parseBackup on import, and applyImport in "replace"
  mode replaces SRS schedules, answer history, and chats instead of
  merging into existing SRS or skipping empty arrays.
- Typed FillBlank cards bind the input value to chosen ?? value instead
  of chosen ?? "", and normalise() preserves Unicode letters (\p{L}\p{N})
  when grading non-ASCII answers.
- OpenAI-compatible vision calls (contentFor in lib/openai-compat.ts)
  prefix data:image/jpeg;base64, when routes pass stripped base64.
- Streaming calls (ollamaChatStream, providerChatStream) keep their
  AbortController active across the entire body stream and API routes
  forward request.signal so stopping a chat or cancelling a run aborts
  the upstream request immediately.
- HomeworkCard uses homeworkModeLabelKey so "check" records display the
  Checked label instead of Step-by-step guide.
- Desktop dropzones on /create and /homework accept dropped documents as
  well as images.
- LibraryScreen filters reported questions out of its due and mistake
  counts to match ReviewClient.
- Clearing a provider key resets generation if it pointed at that
  provider; chat conversations persist and restore provider; ModelPicker
  keys items by provider:name.
- RouteTransition no longer mutates module-level lastPath during render.
- Service worker asset handler falls back to Response.error() when an
  uncached asset fetch fails offline.
- Confetti and .ice-orb / .ice-bubble respect the in-app reduce-motion
  toggle.

2. Performance & cleanup:
- Deduplicate window storage listeners across all six localStorage
  stores (one listener while subscribed instead of N^2 notifications).
- Use todayAnswerCount in LibraryScreen and pass sorted folders to
  DeckCard.
- Memoize MessageRow with stable callbacks in ChatScreen and compute
  last message IDs in a single pass.
- Close ImageBitmap after drawing in lib/image.ts and destroy pdf.js
  documents in finally in lib/documents.ts.
- Avoid re-parsing serialized sync payloads in POST /api/sync.
- Deduplicate copyText (lib/share.ts -> lib/clipboard.ts), chatMessageId,
  describeExtraction, ALL_FOLDERS, useIsPhone, and remove unused helpers
  and boilerplate public/*.svg files.

Version 0.5.8, SW -> freezmo-v80.
2026-10-14 19:00:17 +00:00
..
api Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +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
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
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 Codebase audit: fix bugs, performance issues, dead code, and edge cases 2026-10-14 19:00:17 +00:00
layout.tsx Design pass (all themes + chat UI), model picker, reduce-motion toggle 2026-10-14 05:06:02 +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 Navigation restructure: five-tab bottom bar, no phone drawer 2026-10-10 16:53:55 +00:00