feat: Tutorial-Fortschritt serverseitig persistieren (Resume/Restart)

- Neuer Router /api/tutorial mit GET/PUT/DELETE für Fortschritt pro User
- DB-Migration: tutorial_step + tutorial_completed in users-Tabelle
- Resume-Dialog bei abgebrochenem Tutorial (Fortsetzen/Neu starten)
- Chat-Hinweis passt sich dem Tutorial-Status dynamisch an
- API-Methoden: getTutorialState, saveTutorialState, resetTutorialState

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
Claude Dev
2026-03-17 22:51:06 +01:00
Ursprung 4b9ed6439a
Commit 5e194d43e0
6 geänderte Dateien mit 202 neuen und 19 gelöschten Zeilen

Datei anzeigen

@@ -464,6 +464,13 @@ async def init_db():
await db.execute("ALTER TABLE users ADD COLUMN is_active INTEGER DEFAULT 1")
await db.commit()
# Migration: Tutorial-Fortschritt pro User
if "tutorial_step" not in user_columns:
await db.execute("ALTER TABLE users ADD COLUMN tutorial_step INTEGER DEFAULT NULL")
await db.execute("ALTER TABLE users ADD COLUMN tutorial_completed INTEGER DEFAULT 0")
await db.commit()
logger.info("Migration: tutorial_step + tutorial_completed zu users hinzugefuegt")
if "last_login_at" not in user_columns:
await db.execute("ALTER TABLE users ADD COLUMN last_login_at TIMESTAMP")
await db.commit()