Commit Graph
107 Commits
Author SHA1 Message Date
gurix ed7bc11664 docs(quick-260329-ton): Markdown in Companion-Texten zu HTML rendern 2026-03-29 21:27:18 +02:00
gurix aa84df7d87 docs(quick-260329-ton): complete markdown-in-companion-texts plan
- Add 260329-ton-SUMMARY.md
- Update STATE.md with quick task completion
2026-03-29 21:27:02 +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
gurix e10bdf88dc feat(quick-260329-ton): implement renderInlineMarkdown utility
- Escapes HTML special chars first (XSS safe)
- Converts **bold** to <strong>, *italic* to <em>
- Standalone asterisks with spaces are left unchanged
- Pure function, no DOM dependency
2026-03-29 21:25:03 +02:00
gurix 860d671985 test(quick-260329-ton): add failing tests for renderInlineMarkdown
- Tests cover plain text, empty string, italic, bold, mixed
- Tests cover XSS escaping and standalone asterisks
2026-03-29 21:24:47 +02:00
gurix 36e71a692b docs(quick-260329-tk2): Üben-Phase kindgerechte Erklärung 2026-03-29 21:20:37 +02:00
gurix 3352f6bbb6 docs(quick-260329-tk2): complete Ueben/Woerter phase instructions plan
- Add 260329-tk2-SUMMARY.md with task results
- Update STATE.md with quick task entry and session info
2026-03-29 21:20:16 +02:00
gurix 4cb5fa6883 feat(quick-260329-tk2): add companion instructions for practice and words phases
- Practice phase shows 'Jetzt kannst du ueben! Druecke die Taste zu dem Buchstaben, der herunterfaellt.' for 2.5s before exercise starts
- Words phase shows 'Jetzt kommen ganze Woerter! Tippe die Buchstaben nacheinander ein.' for 2.5s before exercise starts
- Both functions converted to async/await pattern matching existing discover phase
- Companion text cleared after delay before exercises begin
2026-03-29 21:19:38 +02:00
gurix 7b6309ecfb docs(quick-260329-ten): Leertaste-Symbol in Entdecken-Phase erklären 2026-03-29 21:14:54 +02:00
gurix a7afe065fa docs(quick-260329-ten): complete leertaste symbol in entdecken-phase plan 2026-03-29 21:14:22 +02:00
gurix 869b1e36a9 feat(quick-260329-ten): add space bar discover step in runDiscoverPhase
- Replace 'if (key === " ") continue' with a dedicated space bar step
- Shows ␣ symbol large with 'Leertaste' label underneath
- Companion text explains the symbol in child-friendly German
- Highlights and pulses the space key on the keyboard
- Child must press space bar once to confirm understanding and continue
2026-03-29 21:13:54 +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 7131a3522d fix: align continue button height with mute button (bottom: 70px)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:00:01 +02:00
gurixandClaude Opus 4.6 486869b99b fix: sticky continue button at bottom of forest screen
- Continue button uses position: sticky bottom: 1rem so it stays visible
- Mute button moved higher (bottom: 70px) to avoid overlap
- Forest content remains scrollable

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:58:38 +02:00
gurix 8af1b61f4a Revert "fix: prevent scrolling — all screens fit within viewport"
This reverts commit 59c3ae681c.
2026-03-29 20:58:03 +02:00
gurixandClaude Opus 4.6 59c3ae681c fix: prevent scrolling — all screens fit within viewport
- html/body: height 100dvh, overflow hidden
- .screen--active: height 100dvh instead of min-height 100vh
- Forest/lesson/reward/welcome: flex: 1 to fill available space
- Forest scene: flex: 1 with min-height: 0 to shrink properly
- Reduced padding and font sizes for better fit
- Continue button and title: flex-shrink: 0 to stay visible

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:55:52 +02:00
gurixandClaude Opus 4.6 fabf9211c4 feat: add lightbox for viewing forest and reward images fullscreen
- Click any forest element or reward image to see it large
- Smooth zoom-in animation, click anywhere to close
- Hover effect on clickable images
- Works on both forest grid and reward screen

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:50:20 +02:00
gurixandClaude Opus 4.6 f9ae7c45eb fix: replace remaining ASCII umlauts in characters.ts and tests
- vertraeumt → verträumt, Froehlich → Fröhlich, grossmuetterlich → grossmütterlich
- Updated matching test assertions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:48:05 +02:00
gurixandClaude Opus 4.6 50a4e987c7 fix: replace ASCII umlauts with proper German umlauts throughout UI and prompts
- index.html: Wähle, Zurück, Übersicht, zurücksetzen, üben
- screens.ts: Üben, Wörter phase labels
- companion.ts: All Gemini prompts use proper umlauts
- fallbacks.ts: All fallback texts use proper umlauts
- parent.ts: löschen, überschreiben confirmations
- reward.ts: für, grüner, Eichhörnchen
- Tests updated to match

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:46:04 +02:00
gurix fa1d87def3 docs(phase-04): evolve PROJECT.md after final phase completion 2026-03-29 18:27:45 +02:00
gurix 5695552060 docs(phase-04): complete phase execution 2026-03-29 18:27:27 +02:00
gurixandClaude Opus 4.6 9306544df6 docs(04-04): complete audio wiring plan
- SUMMARY.md with all task commits and decisions
- STATE.md updated to 100% progress, phase 04 complete
- ROADMAP.md updated with plan progress

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:23:45 +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 a55238f1f9 docs(04-01): complete audio system plan
- Add 04-01-SUMMARY.md with execution results
- Update STATE.md with position, decisions, metrics
- Update ROADMAP.md with plan progress
- Mark AUDI-01 through AUDI-05 complete in REQUIREMENTS.md
2026-03-29 18:20:20 +02:00
gurix 52596c57b0 feat(04-01): add mute button with CSS, wire audio toggle in main.ts
- Add mute-btn element to index.html outside all screen sections
- Add .mute-btn CSS styles (fixed position, bottom-right, circular)
- Wire mute button click handler to toggle audioEnabled in Settings
- Initialize AudioContext on first user interaction (autoplay policy)
- Fix lint issues: import ordering, non-null assertion
2026-03-29 18:18:31 +02:00
gurixandClaude Opus 4.6 370b76725b docs(04-03): complete Export/Import/Reset plan
- SUMMARY.md with plan results and decisions
- STATE.md updated with progress and metrics
- ROADMAP.md and REQUIREMENTS.md updated

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:17:50 +02:00
gurix 145c824eaa docs(04-02): complete visual polish plan
- Add 04-02-SUMMARY.md with animation and error handler results
- Update STATE.md with progress, decisions, metrics
- Update ROADMAP.md with plan progress
- Mark PLSH-01 through PLSH-05 complete in REQUIREMENTS.md
2026-03-29 18:17:34 +02:00
gurix c19b7fedc1 feat(04-01): add audio/speech modules and speechEnabled to Settings
- Create src/audio/sounds.ts with playCorrectSound, playRewardSound, playForestElementSound
- Create src/audio/speech.ts with speakText via Web Speech API
- Add speechEnabled field to Settings interface in types.ts
- Add speechEnabled defaults in all Settings initializers (gemini.ts, parent.ts, db.test.ts)
- All sound functions check audioEnabled, speakText checks speechEnabled
- AudioContext lazy initialization for autoplay policy compliance
2026-03-29 18:16:53 +02:00
gurixandClaude Opus 4.6 7931f7ec39 feat(04-03): implement Export/Import/Reset data logic in parent area
- exportData: downloads progress+settings as zauberwald-backup.json
- importData: validates JSON structure, confirms overwrite, saves and reloads
- resetAllData: double confirmation, clears all 5 IndexedDB stores, reloads
- Buttons wired in loadParentData after code entry

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:16:51 +02:00
gurix f3cb948878 feat(04-02): global error handler + child-friendly error overlay
- Add error overlay HTML element in index.html before script tag
- Add window error + unhandledrejection listeners in main.ts
- Add error overlay CSS styles (fixed, z-index 9999, tree icon, reload button)
- Error message: "Oh, der Wald braucht kurz eine Pause..."
2026-03-29 18:16:34 +02:00
gurixandClaude Opus 4.6 5396dc0e62 feat(04-03): add Daten section with Export/Import/Reset buttons in parent area
- HTML section with export-btn, import-btn, reset-btn, hidden file input
- CSS styles for action buttons including danger variant for reset

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 18:15:44 +02:00
gurix 3a79379e5a feat(04-02): enhanced CSS animations + responsive layout
- Replace letter-float with leaf-fall sinusoidal sway animation
- Add stardust particles on falling-letter--dissolve via pseudo-elements
- Add companion-float animation on companion-area__avatar
- Add prefers-reduced-motion media query to disable animations
- Add responsive styles at max-width 700px (smaller keys, scaled fonts, adjusted grids)
2026-03-29 18:15:33 +02:00
gurix f9601cb271 docs(04-polish-audio): create phase plan 2026-03-29 18:12:06 +02:00
gurix 4a25e5e8a4 docs(state): record phase 4 context session 2026-03-29 18:06:03 +02:00
gurix 66352b247f docs(04): capture phase context (assumptions mode) 2026-03-29 18:06:03 +02:00
gurixandClaude Opus 4.6 e41d71d403 fix(03): soft radial mask for forest elements and green background prompt
- CSS radial-gradient mask for organic blending into forest scene
- Generate with light green background instead of transparency (avoids checkerboard)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 17:59:47 +02:00
gurix a02948d612 docs(phase-03): evolve PROJECT.md after phase completion 2026-03-29 13:58:25 +02:00
gurix f5163b00ea docs(phase-03): complete phase execution 2026-03-29 13:58:01 +02:00
gurix c0f32e09a4 docs(03-04): complete reward screen and game loop plan
- SUMMARY.md for reward module and game flow wiring
- STATE.md updated with position, decisions, metrics
- ROADMAP.md updated with plan progress
- Requirements RWRD-01 through RWRD-04 marked complete
2026-03-29 13:54:34 +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 e599050303 feat(03-04): add reward module with pre-generation and reward screen
- Create src/forest/reward.ts with startPreGeneration() and initRewardScreen()
- Image pre-generation starts at lesson begin, placeholder shows while loading
- Fallback to static SVGs when rate-limited or API unavailable
- Reward screen HTML with image area, companion comment, action buttons
- CSS for reward screen with animated leaves placeholder and image appear animation
2026-03-29 13:52:05 +02:00
gurixandClaude Opus 4.6 4f1a2b55d6 docs(03-02): complete lesson flow plan
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:50:01 +02:00
gurixandClaude Opus 4.6 770f566972 feat(03-02): lesson screen 3-phase state machine with review and repetition
- Discover phase: companion introduces new key, key pulses, child presses once
- Practice phase: existing letter exercise with cumulative stats
- Words phase: word display with active letter highlighting
- Review mode skips discover, mixes letters/words from recent levels
- Encouragement messages for repetition protection
- Phase indicator UI (Entdecken / Ueben / Woerter)
- CSS for word display, phase indicator, discover pulse animation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:48:56 +02:00
gurixandClaude Opus 4.6 ab5bab9733 docs(03-05): complete parent area plan
- Add 03-05-SUMMARY.md with plan execution results
- Update STATE.md, ROADMAP.md, REQUIREMENTS.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:47:47 +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
gurix 44c28fe226 feat(03-05): parent area HTML, CSS, and access gate
- Add parent screen HTML with code gate, stats overview, and settings form
- Add parent area CSS styles for stats grid, calendar dots, error badges, settings
- Create src/ui/parent.ts with showParentCodePrompt, initParentScreen, loadParentData
2026-03-29 13:46:10 +02:00
gurixandClaude Opus 4.6 2c0c2f2701 feat(03-02): implement word mode for typing engine
- Add createWordExerciseState() that splits words into letters with boundaries
- Add getCurrentWordIndex() helper for UI word tracking
- Extend TypingExerciseState with mode, words, wordBoundaries fields
- Backwards compatible: createExerciseState sets mode='letters'
- All 85 tests pass

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:45:54 +02:00
gurixandClaude Opus 4.6 958f4460a7 test(03-02): add failing tests for word mode typing engine
- Tests for createWordExerciseState, getCurrentWordIndex
- Backwards compatibility test for createExerciseState mode field
- handleKeyPress test with word-mode state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:45:18 +02:00
gurixandClaude Opus 4.6 0bda51df7a docs(03-01): complete data layer foundation plan
- SUMMARY.md with execution results
- STATE.md updated with position and decisions
- ROADMAP.md updated with plan progress

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 13:43:44 +02:00
gurixandClaude Opus 4.6 3640fd5463 docs(03-03): complete forest scene plan
- SUMMARY.md with forest scene implementation details
- STATE.md updated with progress and decisions
- ROADMAP.md updated with plan progress
- Requirements FRST-01, FRST-02, FRST-03 marked complete

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