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
7 days ago
-
perf(frontend): react-best-practices pass — 16 files, zero behavior change
Security Audit Run 3Applied the vercel-labs react-best-practices catalog (ECC/vercel skills) across src/. Every fix is behavior-preserving; verified with tsc -b clean, biome 0 errors, eslint 0 errors (1 pre-existing warning, was 2), vitest 1391/1391, vite build OK (precache 1510.06 -> 1500.62 KiB). Code-reviewed per the requesting-code-review skill (read-only reviewer over 12a144f..HEAD); the single Important finding (cv-auto wrapper div would break grid equal-height stretch) is fixed via the repo's own cvClass-prop pattern, and the Register referral snapshot edge is handled with an intentional-deps useMemo. Waterfalls (async-*): - NotificationCenter: VAPID public-key fetch no longer serialized behind an up-to-8s serviceWorker.ready wait on first visits (independent lane, own try/catch — error semantics unchanged) - CertificateView share-image: logo (network) + QR (data-URI) loads start concurrently and are awaited inside their original guarded blocks Re-render (rerender-*): - ui/motion TiltCard +…02797da
8 days ago
-
chore(biome): eliminate the organizeImports class repo-wide + close every remaining biome error
Z UserThe three organizeImports errors documented on the avatar feature (review- router, CourseReviews, ChatBot) were one instance of a repo-wide class: 17 assist/source/organizeImports diagnostics across 15 files, all on untouched import blocks. biome check --write applied the safe mechanical reorder (no side-effect-only imports moved — verified against the full diff; the 1391-test suite + tsc + build all pass unchanged). Also closed so `npx biome check .` now exits clean: - email-templates.ts useTemplate: concat → template literal - chatbot-cables-kb.ts noApproximativeNumericConstant ×2: biome-ignore with justification — ac 1.442 Ω/km is measured IEC cable data, NOT the log2(e) constant the rule suspects; auto-fix would have corrupted the table - admin-learning.ts usePlaywrightValidDescribeCallback ×3: biome-ignore — `describe` there is the local error formatter (line 238) for the DB canary diagnostics, not a test-runner describe18afd52
11 days ago
-
fix(byok): owner-review UX fixes — delete confirm guard + toggle state-mirror sync
ahmdelbaz28-uxUser-journey review findings (2026-11-23): 1. DELETE had no confirmation — one misclick permanently erased the encrypted key (irreversible: the plaintext never leaves the server, so there is no way to re-derive it). Now asks for explicit confirm with a bilingual message explaining the consequence, same convention as every other destructive action in the app. 2. TOGGLE left the checkbox stale — the checkbox renders config.enabled while handleToggle only flipped the separate state mirror, so after a toggle the checkbox still showed the OLD value; a user re-clicking it silently re-enabled (or re-disabled) the model. Both mirrors now flip optimistically, roll back together on failure, and the server's authoritative config row is adopted on success. Feedback toast states which cascade is now in charge (user model first / platform models).1035617 -
fix(lint): zero biome errors — BYOK a11y labels (htmlFor+id), cookie-banner stable handler deps, stable byok translate fn, star-rating role=img, template-literal style, S2245-adjacent void-type cleanup
ahmdelbaz28-ux43a1d74
12 days ago
-
feat(chatbot): BYOK — bring-your-own-key lane (user's own model first, platform cascade always the baseline)
Z UserOwner contract: the platform ALWAYS runs on owner-managed models. A logged-in user may register ONE custom OpenAI-compatible provider (baseUrl + key + model) via a new key menu inside the chatbot; when enabled, the server tries their endpoint FIRST with the identical system prompt (Saadat identity, citations, ±0.5% discipline) and falls back to the platform cascade on ANY failure — availability can only increase. Vision keeps the platform two-pass pipeline. Backend: - db v16: userAiProviders (1:1 per user, FK cascade, idempotent boot block) - byok-crypto.ts: AES-256-GCM at-rest encryption derived from APP_SECRET (write-only key; only a first3…last4 mask ever leaves the server) - chatbot-byok.ts: provider catalog (OpenRouter/Groq/OpenAI/NVIDIA/Cerebras/ Gemini/custom), config loader (fail-closed SSRF re-check per use), tryByokChat + tryByokStream (same data:{"text"} protocol), testByokProvider - cascade integration: BYOK lane at the TOP of runTextCascade and getStreamResponse; …d241ddf