Project: Lenci R1 V0.1.8
2026-02-26 13:04:52
Issue description In the onboarding flow, the UI shows “10 credits granted / 10 credits have been added” on the onboarding steps, while the sidebar credit balance shows 20 for the same user/session. This mismatch appears across two consecutive onboarding steps/pages, creating confusion about the actual trial credit balance and whether credits were granted twice or the UI is out of sync. Expected behavior The onboarding “credits granted” message and the sidebar balance should always match the user’s actual credit ledger/balance. If the trial grants 20 credits, every onboarding step that references granted credits must say 20 (or use a dynamic value). If the sidebar shows the current balance (e.g., includes existing credits), onboarding copy should clearly distinguish “Granted now” vs “Current balance”—but the numbers must still be accurate based on the same source of truth. Acceptance criteria AC1 — Single source of truth: The value shown in onboarding (“credits granted/added”) is pulled from the same authoritative source as the sidebar balance (or from a clearly-defined “trial grant amount” field) and is consistent. AC2 — Correct value displayed: For a new account that receives 20 trial credits, onboarding screens display 20 (not 10) anywhere credits are referenced. AC3 — Consistency across steps: Navigating through the onboarding steps (including refresh/back/forward) never shows conflicting credit values between onboarding messaging and the sidebar. AC4 — No hardcoded copy: There is no hardcoded “10 credits” string in onboarding UI; credit numbers render dynamically based on the actual configured grant/balance. AC5 — Edge cases: If the user already had credits before onboarding (e.g., admin grant), the onboarding message either: shows the actual trial grant amount, and labels it clearly (“Trial credits granted: X”), or is hidden/skipped when not applicable—without showing incorrect numbers.
api-CTSVC-i9.js:1 [PerformanceService] Initialized
api-CTSVC-i9.js:1 [PerformanceService] Auto-initialized, session: session_1772110761352_ajgco74ii
creditHistoryService-Qs2rnbBE.js:1 🚀 [AuthContext] Initializing authentication...
creditHistoryService-Qs2rnbBE.js:1 ✅ [AuthContext] Session found for user: ash9-test-lenci@25hraf.com
creditHistoryService-Qs2rnbBE.js:1 🔍 [AuthContext] Fetching profile for user: ash9-test-lenci@25hraf.com b449d8e3-ff56-408d-a129-e68678fb9936
creditHistoryService-Qs2rnbBE.js:1 ✅ [AuthContext] User profile loaded from API: {id: 'b449d8e3-ff56-408d-a129-e68678fb9936', email: 'ash9-test-lenci@25hraf.com', email_verified: true, display_name: 'ash n', avatar_url: null, …}
creditHistoryService-Qs2rnbBE.js:1 📊 [AuthContext] Final user profile: {id: 'b449d8e3-ff56-408d-a129-e68678fb9936', email: 'ash9-test-lenci@25hraf.com', plan: 'starter', generationsUsed: 0, creditsBalance: 10}
creditHistoryService-Qs2rnbBE.js:1 ✅ [AuthContext] User profile set in state
creditHistoryService-Qs2rnbBE.js:1 [WS] Connected