S5: onboarding → minne + smaksignaler (user_stated)

This commit is contained in:
Sven (AAMOS AI)
2026-08-11 04:43:43 +07:00
parent 1e18146665
commit f86a37dd33
26 changed files with 10812 additions and 2 deletions
+11
View File
@@ -12,6 +12,7 @@ import {
import { t } from "../lib/i18n.js";
import { KNOWN_FLAGS } from "@app/feature-flags";
import { syncOnboardingMemory } from "../lib/onboardingMemory.js";
/**
* Progressive onboarding (FAS 1b): 3-layer flow.
@@ -227,6 +228,16 @@ export async function onboardingRoutes(app: FastifyInstance) {
});
}
// S5: spegla alla uttryckligen angivna preferenser i minne + smaksignaler.
const [completedPrefs] = await app.db
.select()
.from(schema.userPreferences)
.where(eq(schema.userPreferences.userId, req.userId))
.limit(1);
if (completedPrefs) {
await syncOnboardingMemory(app.db, req.userId, completedPrefs);
}
const [user] = await app.db
.update(schema.users)
.set({