Spaces:
Running
Running
Commit History
-
fix(sonarcloud): batch 10 — S3358 nested ternaries + S2933 readonly members
ahmdelbaz28-uxS3358 (nested ternaries, 24+ fixes): - New src/lib/i18n.ts: bilingual(ar, en, isRTL) + bilingualByLang(ar, en, lang) helpers that eliminate the need for nested ternaries in i18n code. - 18 automated swaps via script: * Admin.tsx (6), AdminNotificationPanel.tsx (3), Register.tsx (3), ResetPassword.tsx (2), Login.tsx (2), VerifyEmail.tsx (1) - Manual fixes for non-i18n nested ternaries: * api/health-router.ts: 3-level R2 detail ternary → if/else chain * src/components/ui/ScrollReveal.tsx: 4-branch direction ternary → Record<string, string> lookup * src/components/ui/BentoCard.tsx: span ternary → Record lookup * src/components/ChatBot.tsx: delay ternary → if/else chain * src/pages/Admin.tsx: ticket/payment status badge 3-branch ternaries → Record<string, string> lookup maps with ?? fallback S2933 (unused private members → readonly, 46 members): - New scripts/fix_readonly_members.py: class-aware script that finds private members only assigned in the constructor…7226608 -
fix(sonarcloud): batch 6 — S2486 empty catch blocks
ahmdelbaz28-uxS2486 (exceptions ignored, 9 fills across 6 files): - Add justification comment to empty `catch {}` / `catch (e) {}` blocks so SonarCloud no longer flags them as silently-swallowed exceptions. - Files: api/chatbot-router.ts (3), api/boot.ts (1), src/pages/Home.tsx (1), cache/monitoring/cache-monitor.ts (1), infra/security-audit/worker-v7-hardened.js (1), infra/test-automation/tests/load/k6-load-test.js (2). Tests: 83/83 pass.f80c429 -
fix(sonarcloud): batch 3 — S6660, S2681, S7748, S4138, S6582, S7735, S1128
ahmdelbaz28-uxS6660 (if-in-else → else-if): - src/pages/Login.tsx, Register.tsx: merge `} else { if (X) {...} else {...} }` into `} else if (X) {...} else {...}` for the GIS script loader. S2681 (missing curly braces): - cache/monitoring/cache-monitor.ts: expand one-liner resetAllMetrics/destroy methods into multi-line with explicit braces around the if body. - cache/strategies/session-cache.ts: same treatment for destroy(). - src/lib/qr-code.ts: add braces to two single-line for-loops so the misleading indentation of the following lines is not ambiguous. S7748 (trailing-zero fractions): - src/components/Logo3D.tsx: 0.10 → 0.1, 0.30 → 0.3, 0.20 → 0.2 (5 sites). - api/lib/sentry.ts: 1.0 → 1. - infra/sre-observability/distributed-tracing/tracing-instrumentation.ts: 1.0 → 1. S4138 (for-of): - api/lib/chatbot.ts: convert 3 simple-index for-loops (over AI_MODELS, GROQ_MODELS) to for-of. - src/components/ChatBot.tsx: SSE line parser + typewriter loop → for-of. - src/components/StarfieldBackgr…434ab05
-
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: Elite Engineering UI Modernization, Production Auth Fixes, and HF Deployment Stability
ahmdelbaz28-ux50a005c