14 Commits
Author SHA1 Message Date
gurix 5f47feaf32 refactor: remove checkRateLimit and incrementApiCall completely 2026-03-29 23:38:54 +02:00
gurix 8f888439f2 feat(05-02): fix reward flow and call sites for paginated forest
- Import SLOTS_PER_PAGE in reward.ts; replace hardcoded 12 with it
- Import SLOTS_PER_PAGE and getForestElements in app.ts
- Zurueck zum Wald callback navigates to page containing new element
- currentForestPage updated in progress before initForestScreen
2026-03-29 23:02:51 +02:00
gurix 559d57a013 feat(05-01): extend Progress type with currentForestPage, add paginated renderForestScene
- Add currentForestPage: number field to Progress interface in types.ts
- Export SLOTS_PER_PAGE = 12 constant from scene.ts
- Change renderForestScene signature to accept page: number parameter
- Slice elements by page (start/end = page * SLOTS_PER_PAGE)
- Update navigation UI (forest-nav) after rendering
- Add migrateProgress entry for currentForestPage in app.ts
- Fix Progress object literals in db.test.ts and screens.ts to include new field
2026-03-29 22:57:32 +02:00
gurix 10849b3146 fix(260329-u4z): replace ae/oe/ue transliterations with proper German umlauts
- index.html: Wähle, übe, Übung, wächst, Nächstes, Übungstage, Häufigste
- src/ui/screens.ts: Nächstes, schöner, üben, Drücke, herunterfällt, Wörter, große, drückst
- src/companion/fallbacks.ts: Früh, schönsten, Schön, Glühwürmchen, wächst, nächstes, Bäumen, Stück, schön, verändert, Spürst, Hügel, große, drückst, drücken, Ö
- src/app.ts: üben, Zurück (in comments)
2026-03-29 21:45:57 +02:00
gurix d038cc3196 feat(quick-260329-ton): replace textContent with innerHTML + renderInlineMarkdown at all AI-text insertion points
- src/app.ts: greeting text now renders inline markdown
- src/ui/screens.ts: letter intro text now renders inline markdown
- src/forest/reward.ts: forest comment now renders inline markdown
- All 3 sites use innerHTML with XSS-safe renderInlineMarkdown
2026-03-29 21:26:04 +02:00
gurixandClaude Opus 4.6 5f9c35db1e feat: dev shortcut Ctrl+Shift+X to wipe IndexedDB and restart
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:03:57 +02:00
gurixandClaude Opus 4.6 b453efebb4 feat(04-04): wire audio and speech into lesson, reward, forest, and app
- playCorrectSound() on correct keypress in letter and word exercises
- playRewardSound() when reward image appears
- speakText() for companion comment on reward screen
- playForestElementSound() when new forest element renders
- speakText() for companion greeting on forest screen

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:22:40 +02:00
gurix aaf9872f1d feat(03-04): wire complete game flow with reward screen and review triggers
- Lesson completion now shows reward screen instead of going directly to forest
- Pre-generation starts at lesson begin (fire-and-forget)
- Stats accumulated (correct/errors/errorKeys) in progress after each lesson
- Review mode triggers every 3rd session
- Encouragement shown after 2x same level (repetition protection)
- Progress migration for older saved data without new fields
2026-03-29 13:53:23 +02:00
gurix a5326c7a24 feat(03-05): wire parent area into app.ts
- Import showParentCodePrompt and initParentScreen from ui/parent
- Register global Ctrl+Shift+E keyboard listener in initApp
- Initialize parent screen with back-to-forest callback
2026-03-29 13:46:45 +02:00
gurixandClaude Opus 4.6 57a929bc1a feat(02-05): add companion greeting to forest and avatar to lesson screen
- Add forest-greeting companion area in HTML with avatar + text
- Add lesson-companion area in HTML above letter area
- Wire getGreeting() call for returning users in app.ts
- Show companion avatar in lesson screen via getProgress lookup
- Fix pre-existing noUncheckedIndexedAccess errors in fallbacks.ts (Rule 3)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:15:45 +02:00
gurixandClaude Opus 4.6 78d516c55d fix(01): add lesson cancel button and handle level 6 completion
- Back button in lesson screen to return to forest without completing
- "Alle Stufen geschafft!" message when all 6 levels are done
- Cap currentLevel at MAX_LEVEL to prevent out-of-bounds progression

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:30:55 +02:00
gurixandClaude Opus 4.6 5bac8501bf feat(01-05): forest screen with level map and complete app flow
- Add forest overview screen with 6-level map showing locked/current/completed states
- Create src/forest/scene.ts with getLevelStatus, renderLevelMap, initForestScreen
- Wire complete flow: welcome -> forest -> lesson -> forest with progress updates
- Add forest CSS with level card styles and continue button

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:15:18 +02:00
gurixandClaude Opus 4.6 ba4525daf3 feat(01-04): wire lesson screen UI with keyboard and falling letters
- Lesson screen HTML with letter-area and keyboard containers
- initLessonScreen: renders keyboard, shows letters, handles keypress
- Correct key dissolves letter with animation, advances to next
- Wrong key does nothing (per D-03), correct key stays highlighted
- startLesson in app.ts: manages lesson lifecycle and cleanup
- onComplete: updates progress, unlocks next level, saves to IndexedDB
- CSS: floating letter animation, dissolve effect on correct press

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:12:13 +02:00
gurixandClaude Opus 4.6 4b5502f5fa feat(01-02): screen management and companion definitions
- Create companion/characters.ts with 4 companion definitions (fee, einhorn, fuchs, eule)
- Create app.ts with showScreen, getDB, initApp (routes to welcome or forest)
- Update main.ts to call initApp on DOMContentLoaded
- Add stub ui/screens.ts for initWelcomeScreen

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 11:05:59 +02:00