Spaces:
Running
Running
Commit History
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
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
-
feat(ui): implement review suggestions #2-#5 — motion discipline, signature completion, proof system, certificate share asset
Z UserSuggestion #2 — one motion per screen (Brand Kit §6): hero is now visually silent except the primary CTA: static Zap badge, static ambient glow, static image frame, static floating cards, static scroll indicator; the ONLY continuous motion is the new .brand-cta-glow pulse (opacity-only pseudo-element, reduced-motion safe). Background icon layer cut 25→5 icons sharing ONE slow 40s transform drift. Suggestion #3 — signature completion: .brand-signature-line now under every Home section title (removed the clashing section-header-glow divider), .brand-signature-hover floors on the AI-section + CTA-banner primary buttons (new optional wrapperClassName on ArcFlashButton — backward compatible). Headline keyword gradient-text switched to the official orange→cyan signature. Suggestion #4 — unified proof system (truthful by construction): green check chip "شهادة موثقة" on course cards, "طالب موثق" badge on every published review (reviews are enrollment-gated server-side…d42fc97 -
feat(brand+seo): signature gradient system + Brand Kit law + noscript SEO fallback
Z UserUI review implementation (safe scope — outside the security agent's files): Suggestion #3 — electric signature (orange→cyan, 3px) now repeats at: - scroll-progress bar pinned page-top (new SignatureProgressBar, rAF, transform-only, reduced-motion safe, RTL origin) mounted in App - boot splash loading bar (was cyan→blue, now the official signature) - course-card top edge reveal on hover (.brand-signature-card in CourseCard) - opt-in utilities .brand-signature-line (section titles) and .brand-signature-hover (primary CTAs) ready for the Home round that follows the security agent's UI rework Suggestion #1 — Brand Kit law: docs/BRAND-KIT.md pins the 60/30/10 color rule, exact token values from index.css, radius/shadow scale, the icon-beside-label button standard, motion rules and the proof system. SEO (review gap #4, minimal fix): <noscript> block in index.html with an Arabic summary + 5 internal links so JS-less crawlers get real text. Verified: tsc clean, biome cl…d4d279d
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
24 days ago
-
feat(youtube-sync): course mirrors the channel playlist — verbatim titles, first-video cover, in-site playback
Z UserThe owner's four asks, one pipeline: 1. COVER = first real playlist video's YouTube thumbnail (autoCover policy, maxresdefault with client-side hq→mq fallback chain). 2. AUTO-SYNC: the YouTube watcher tick (15 min) feeds BOTH notifications AND the course — new uploads appear as published lessons within minutes, under their EXACT YouTube titles (never invented); reorders are mirrored; a video leaving the playlist is removable via full-sync. 3. FAKE CONTENT PURGE: boot-time v14 migration deletes the old 4-course seed (power-systems-basics / protection-relay-coordination / renewable-energy-design, payment-guarded) + orphan categories; the first sync also purges non-playlist lessons once (prunedOnce), then only via explicit admin action. 4. DASHBOARD: YouTube sync panel (sync now / full sync + cleanup / auto-import / free-policy / auto-cover toggles + live status cards) and lessons dialog with YouTube badges + real thumbnails per lesson. Playback: video-protecti…d128011
-
feat: premium UI redesign with WCAG AA contrast and theme tokens
- Redesigned all pages with premium dark theme, glass morphism, and high contrast - Replaced hardcoded hex colors with CSS variables and Tailwind theme tokens - Updated global CSS with new color palette, animations, and typography - Redesigned Navbar with scroll-hide/reveal behavior and glass morphism - Redesigned Footer with ambient glow and premium layout - Updated Home page with cinematic hero, bento grid, and scroll-driven sections - Redesigned auth pages (Login, Register, ForgotPassword, ResetPassword, VerifyEmail) - Updated Dashboard, Profile, Courses, CourseDetail with premium cards and contrast - Updated Documents, References, Support, Wishlist, LearningJourney with theme tokens - Updated legal pages (PrivacyPolicy, RefundPolicy, TermsOfService, Faq) - Fixed Home.tsx SOFTWARE STRIP JSX structure and logo markup - Fixed broken image references: /hero-bg.jpg -> /hero-main.svg - Removed unused closeButtonRef in Navbar causing TS6133 - TypeScript check passes cleanlya6746df
-
fix: replace all broken image fallbacks — course cards, logos, software strip
ahmdelbaz28-ux🚨 CourseCard.tsx — removed broken /hero-bg.jpg fallback, added useState + gradient placeholders 🚨 CourseDetail.tsx — added CourseThumbnailWithFallback component with gradient fallback 🚨 CertificateCard.tsx — logo onError now hides img + shows gradient instead of broken /hero-bg.jpg 🚨 Logo3D.tsx — added onError to hide container when logo.webp/logo.png missing 🚨 BackgroundLogoWatermark.tsx — added onError to hide broken logo img silently 🔧 Home.tsx — software-logos now hide the entire card on error (no broken images) 🔧 Removed Documents route from App.tsx (file wasn't committed to git)98b04ca
-
fix(sonarcloud): batch 13 — clear 374 OPEN code smells
Z UserWave 1 (mechanical): - S6819: typeof x == 'y' → typeof x === 'y' (loose equality fix) - S6582: arr.indexOf(x) !== -1 → arr.includes(x) - S7773: isNaN → Number.isNaN, isFinite → Number.isFinite - S7769: Math.sqrt(a*a + b*b) → Math.hypot(a, b) - S7762: parent.removeChild(child) → child.remove() - S7764: window.X → globalThis.X (safe props only) - S7758: charCodeAt → codePointAt, fromCharCode → fromCodePoint - S6606: x = x ?? y → x ??= y - S7748: 1.0 → 1, 0.0 → 0 - S7723: new Array() / Array() → [] - S3863: merge duplicate imports from same module - S6353: [^a-zA-Z0-9_] → \W, [0-9] → \d - S7718: rename unused catch param to error_ Wave 2 (S3358 — 73 nested ternaries): - Refactored all nested ternaries into flat form using helper variables, if/else chains, or extracted consts. 22 files touched. Wave 3 (React rules): - S6759 (32): added readonly to all Props type properties - S6481 (5): wrapped Context provider values in useMemo - S6479 (5): replaced array index keys with stable identif…d3a69df
-
fix(sonarcloud): comprehensive security & quality fixes — 200+ issues resolved
ahmdelbaz28-uxBLOCKERS (2): - secrets:S8215 — api/local-auth-router.ts: replace hardcoded bcrypt dummy hash with a lazily-generated hash from crypto.randomBytes (no real hash disclosed in source). - json:S6418 — infra/.../access-policies.json: replace hardcoded Cloudflare service token with ${CLOUDFLARE_ZERO_TRUST_SERVICE_TOKEN_ID} placeholder. CRITICAL BUGS (16): - css:S4670 (x5) — src/index.css: remove stray backslash escapes from attribute selectors ([data-user-menu], [data-sonner-toast], [aria-current]). - typescript:S3923 (x5) — remove ternaries that returned the same value on both branches (ElectricParticles, AdminNotificationPanel x2, NotificationCenter, ForgotPassword). - typescript:S1082 (x6) — add keyboard handlers + role/tabIndex to non- interactive divs with onClick (CookieConsent, input-group, CertificateView, CourseDetail video controls + seek bar + payment modal). VULNERABILITIES (121): - docker:S6470 — Dockerfile: document that COPY . . is safe because of .dockeri…c7df2b5
-
fix(security+db+perf): pre-launch hardening — 7 critical + 4 DB + perf wins
ahmdelbaz28-uxCRITICAL SECURITY (7 fixes): - email.ts: remove recoveryLink from JSON response (account-takeover via password reset when email delivery fails) - twofa-router.ts: remove dead verifyForLogin procedure (IDOR + no rate limit) - twofa-router.ts: replace hardcoded 'elbaz-2fa-backup' HMAC key with APP_SECRET-derived key (forged backup codes possible with repo access) - review-router.ts: adminList authQuery→adminQuery, adminTogglePublish authMutation→adminMutation (any logged-in user could hide/show any review) - rate-limiter.ts: per-action auth rate limits (login=10/15min, forgotPassword=5/15min, register=10/15min, etc.) — was 1200/min shared - middleware.ts: apply globalRateLimit to authMutation + adminMutation (previously bypassed rate limiting entirely) - infra/resend-integration/env-variables.txt: replace leaked Resend + OpenRouter API keys with placeholders (keys are now rotated) CRITICAL DATABASE (4 fixes): - init-schema.sql: add 3 missing tables (userSessions, userNotes, …f46a61a
-
feat(images): replace hero banner + generate professional course thumbnails
ahmdelbaz28-uxHERO BANNER: - Replaced hero-main.webp with professional ETAP software screenshot COURSE THUMBNAILS (all AI-generated, 1344x768, professional quality): - course-cable.jpg: high-voltage power transmission lines at golden hour - course-etap.jpg: ETAP software interface with one-line diagram - course-skm.jpg: short circuit analysis with relay coordination curves - course-powerfactory.jpg: power flow analysis with voltage profile graphs - course-pvsyst.jpg: large-scale photovoltaic solar farm, 3D isometric - course-panel.jpg: electrical control panel with breakers and wiring All images are LFS-tracked with properly cached objects.2aed803
-
feat: improve animations, fix Google OAuth, update Clarity ID, and add shimmer effects
ahmdelbaz28-ux- Fixed Google Identity Services lazy loading in Login.tsx (load GIS script on demand) - Updated Microsoft Clarity Project ID from wlrwynnnwk to 3311349506496452 - Added shimmer shine sweep effect to CourseCard - Added comprehensive CSS animation utilities (shimmer, ripple, glass-card, carousel, accordion, skeleton pulse) - Updated clarity.js to use correct project ID - All credentials configured in .env (excluded from git)27faa4d
-
feat: implement 'Master Class' elite animations including 3D tilt cards, magnetic buttons, and neon electric pulses
ahmdelbaz28-ux4655eeb -
feat: Elite Engineering UI Modernization, Production Auth Fixes, and HF Deployment Stability
ahmdelbaz28-ux50a005c