Spaces:
Running
Running
Commit History
4 days ago
-
fix(sonar): wave 5 - final in-scope sweep, 92 findings across 67 files (complete: 994/994 in-scope)
Z User- 23 two-count files + 44 one-count files: S6582/S7503/S7755/S7773/ S7780/S8786/S9382/S3776/S6759/S6819/S5906/S5976/S3863/S7763/S7785/ S8782/S4138/S7744/S6606/S4624/S7778/S7754 - google-auth-router 47->11, shield 39->6, security middleware 24->8, ForgotPassword 34->4, VerifyEmail 22->5, Courses 28->13 (DOM identical) - S9382 NOSONAR only for: Redis connection retry backoff, migration ledger order - both documented sequential necessities - contract tests re-pinned: issueSessionResponse centralization (both session paths categorize), isHostGateExempt approval-action exemption Verified: tsc clean, eslint 0 errors, vitest 1394/1394.6165987
21 days ago
-
feat(chatbot): live screen-context awareness — answers grounded in the user's CURRENT screen
Z UserOwner requirement (2026-11): when a user asks the bot anything about the site, it must answer from the open screen precisely — never guessing. REVIEW (was broken): the client sent {messages, language, chatId, mode} only and the system prompt had no notion of the user's location — every 'this page / this course' question was answered by guesswork. NOW: - src/lib/screen-context.ts — route→exact-navbar-name map (all routes, ar/en), entity registration store (useScreenDetails: cleared on unmount — no stale titles), 6-entry navigation trail, device/auth UI state, sanitized send-time snapshot. Importable in bare Node (guarded browser APIs). - CourseDetail registers the displayed course + open lesson/quiz meta; ArticleDetail registers the article title. - ChatBot tracks navigation (useLocation) and composes a FRESH pageContext per send attempt — a retry after navigation reports the NEW screen. - api/lib/chatbot-screen.ts — untrusted-payload hardening: field whitelist, length cap…062f222