Spaces:
Running
Running
Commit History
4 days ago
-
fix(sonar): wave 7 - cleanup round from live scan (93 findings across 65 files)
Z User- 34 in-scope follow-ups exposed by the 17:59 scan (refactor residuals: S3776 helper splits, S4323 type aliases, S6759 readonly on extracted components, S8786 bounded-regex justifications, S6551 scrub patterns, S9440/S7924 CSS at new positions) - python leftovers: 29x S1481 positional _, S8786 regex canonicalization (fuzz-verified), S3776 task24 step-fn hoisting, S1192 dialog/content-type consts - operator tooling: S9382 documented NOSONARs for deliberate poll/throttle loops + Promise.all for independent probes, S8689 second log site routed through redact(), S5144 second fetch site behind UPSTREAM_HOST_ALLOWLIST Verified: tsc clean, vitest 1394/1394, node --check + py_compile on touched scripts.6780540
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 -
feat(admin): quizStorageSelfTest surfaces mysql2 cause chain (code/errno/sqlMessage)
ahmdelbaz28-uxdrizzle wraps driver errors in 'Failed query: ...' — the diagnostic must report code/errno/sqlState/sqlMessage from err.cause, not just the wrapper.37908e8 -
feat(admin): quizStorageSelfTest — canary INSERT/SELECT/DELETE with raw driver errors
ahmdelbaz28-uxAdmin quiz paths return generic 500s; the audit trail stores no error text and HF logs are not operator-accessible. This admin-gated diagnostic runs the full write path against quizQuestions with a real-lesson canary and returns the underlying driver message per step, so storage drift is diagnosed from the dashboard instead of guessed.50b76a6
24 days ago
-
feat(dashboard)+fix(journey): full platform control from dashboard + money-path & UX fixes
elbaz-launch-botDASHBOARD GAPS CLOSED (admin-learning.ts + Admin.tsx UI): - Categories: full CRUD with usage counts + delete guard (was SQL-only) - Quiz: per-lesson question bank CRUD incl. correct answers (had NO write path; certificates require >=70% yet questions could never be added from UI) - Enrollments: per-course roster — list/filter/search, manual grant by user search, revoke, reactivate (admin could not even see who is enrolled) MONEY-PATH FIXES (re-purchase dead end): - payment.create / createManual: only ACTIVE enrollment blocks purchase — refunded/cancelled students can buy again (was permanent CONFLICT) - paymob webhook + approveManual + free enroll: reactivate non-active enrollment row on re-purchase instead of blind insert (unique index) / noop JOURNEY FIXES: - VerifyEmail: inverted (!token || uid) condition -> eternal spinner - Dashboard totalSpent: count completed payments only (was ALL rows) - course.enrollments: hide refunded/cancelled from My Courses (access-gate mismatc…591bdbe