Spaces:
Running
Running
Commit History
Today
-
security(cfskill-run3): deep audit fixes + SonarCloud quality pass
Z UserAudit (cloudflare/security-audit-skill, 7 coverage units, 5 hunter waves): - cache: Redis delPattern prefix->glob — settings/approval-gate invalidation was a silent no-op under Redis (stale contact info + delayed gate close) - jwt/approval: remove hardcoded dev APP_SECRET fallback (public repo secret) - boot: production fatal log when EDGE_HOST_ENFORCE unset (fail-loud) - yt-sync: GET /state now bound to x-sync-ts window (eternal replay lane gone) - paymob webhook: signed currency actually passed to verifyPaymobAmount; promo quota released on terminal FAILED events (+ idempotent re-consume when a later event completes the same order) - push: endpoint rows can no longer be re-bound/cross-deleted between users - sessions: bounded device-metadata strings (column widths) - notification links: protocol-relative URLs rejected; noopener unified; Paymob redirect pinned to accept.paymob.com - deploy.sh: secret gate covers re_/gsk_/nvapi-/modal-/mysql:// families SonarCloud (194 open ->…700d33c
Yesterday
-
fix(pwa+numerals): stuck-device SW cure — build-signed SW URL; device-locale-proof digits
ahmdelbaz28-uxOWNER REPORTS (2026-12-03): 1) SAME deploy: footer Facebook tap fixed on one phone, still dead on the original phone. 2) Home counters rendered Arabic-Indic digits while the UI was English. ROOT CAUSES: 1) PRE-2026-11-26 shells served /sw.js with NO Cache-Control (serve-static default), so old phones kept a heuristic-fresh ancient sw.js in HTTP cache; SW update checks consulted it, the ancient precached-shell worker (navigateFallback era, no in-shell self-heal) was never replaced — the device ran the pre-fix bundle forever. Fresh devices fetched everything new — hence the two-phone divergence. 2) Bare .toLocaleString() followed the DEVICE locale, not the site language: ar-EG devices got Arabic-Indic digits inside the English UI. FIXES: - main.tsx v4: SW registered at /sw.js?v=<buildId> (token from the shell's cache-nuke tag) + updateViaCache:'none' — every deploy presents a NEW script URL no cached sw.js can answer; new worker installs (skipWaiting+clientsC…c7ed040
2 days ago
-
feat(admin): in-dashboard back navigation + approval-gate owner switch + AI panel icon fixes
ahmdelbaz28-uxOwner report 2026-12-01, three asks, all root-cured: 1) BACK NAVIGATION (phone back exited the whole site): Root cause: admin tabs were pure React state — the URL never changed, so tab switches pushed NO history entries and the browser back button left /admin entirely (or closed the tab when it was the landing page). Fix: tabs are now URL-synced (/admin + /admin/:tabId route). Every tab switch is a real history entry; phone back walks back through visited tabs and out to the previous page; tabs are deep-linkable (/admin/users...). New one-tap back arrow in the mobile top bar uses history when the SPA has entries and lands on the dashboard otherwise. 2) APPROVAL-GATE OWNER SWITCH (new capability, default ON): The owner can now enable/disable the whole gate from the Users tab. ON (default — the 2026-11-24 contract): registrations land pending and wait for approval. OFF: registrations approve themselves (decidedAt stamped), already-pending accounts en…0d070f3
4 days ago
-
fix(sonar): wave 3 - resolve 100 findings (medium files: health-router, seo-meta, chatbot-stream, CourseDetail, docgen spec/md/font, AiProvidersPanel, SubscribeGate, spa-handler, Articles, AdminNotificationPanel, Documents, NotificationCenter, playlist-sync, approval, chatbot-feedback, chatbot-byok, boot)
Z User- S3776 extractions across components and lib (NotificationCenter push flow 55->11, Articles 41->6, AdminNotificationPanel 22->1, playlist-sync 34->7) - S3358 nested ternaries -> module helpers/sub-components - S9382: Promise.all for independent writes; NOSONAR only for the notify-cap throttle in playlist-sync - S8786: trailing-slash regexes -> shared stripTrailingSlashes loop - S6551: JSON diagnostics; S4782/S6564/S6660/S7737/S7773/S7503/S7737 - approval contract test adapted to Promise.all admin fan-out (same pins) Verified: tsc clean, eslint 0 errors, vitest full suite green.caa8f36
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
-
fix(admin): AI provider dialog prefills name+baseUrl from the default catalog entry — Radix Select does not fire onValueChange when re-picking the selected option, which silently blocked saves
Z User13a0ef1 -
feat(ai): dynamic multi-provider router — admin-managed API keys, automatic free-model discovery (chat/vision classification), and model↔provider failover
Z User- db v9: aiProviders + aiModels tables (idempotent) + env-key seeding on first boot - api/lib/ai-router.ts: GET {baseUrl}/models discovery, vision/free/tier heuristics, in-memory circuit breakers (401→provider cooldown, 429→exponential model cooldown, 404→dead-id skip), priority→tier candidate ordering, mode-scoped last-working shortcut, non-stream + SSE routing with global budgets; lazy DB handle keeps the legacy cascade fully functional when the DB is unreachable - chatbot.ts/chatbot-stream.ts: dynamic router is tried FIRST on every chat/vision/ stream request; legacy NVIDIA→OpenRouter→Groq cascade remains as the safety net — availability can only increase, never regress - tRPC admin: aiProviders/aiProviderSave/aiProviderDelete/aiProviderToggle/ aiProviderDiscover(+All)/aiProviderTest/aiModelUpdate/aiRouterHealth (keys masked, write-only) - admin UI: new AI Models tab — provider cards with status/priority/key-mask, auto-discovery & connectivity test buttons, per-mod…a314b16