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>
This commit is contained in:
2026-03-29 12:15:45 +02:00
co-authored by Claude Opus 4.6
parent 2cf7687d51
commit 57a929bc1a
4 changed files with 50 additions and 3 deletions
+8
View File
@@ -30,6 +30,10 @@
<section id="screen-forest" class="screen">
<div class="forest">
<h1 class="forest__title">Dein Zauberwald</h1>
<div id="forest-greeting" class="companion-area" style="display:none">
<img id="forest-greeting-avatar" class="companion-area__avatar" src="" alt="">
<p id="forest-greeting-text" class="companion-area__text"></p>
</div>
<div class="forest__level-map" id="level-map">
<!-- Level cards rendered dynamically -->
</div>
@@ -39,6 +43,10 @@
<section id="screen-lesson" class="screen">
<div class="lesson">
<button class="lesson__back-btn" id="lesson-back-btn">&#x2190; Zurueck</button>
<div id="lesson-companion" class="companion-area" style="display:none">
<img id="lesson-companion-avatar" class="companion-area__avatar" src="" alt="">
<p id="lesson-companion-text" class="companion-area__text"></p>
</div>
<div class="lesson__letter-area" id="letter-area">
<!-- Current letter appears here -->
</div>