Spaces:
Running
Running
Commit History
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(chatbot+telegram): user feedback loop + Telegram expert brain + join auto-approval
Z User① Feedback loop (real-user fuel for the evolution loop): - chatbotFeedback table (v13 migration, drizzle schema, fail-open lib) - POST /api/chatbot/feedback (public, IP-limited 30/10min, truncated snapshots) - 👍/👎 one-shot buttons on every assistant bubble in the web widget - admin tRPC chatbotFeedback + 'تقييمات الشات بوت' tab: stats cards, satisfaction %, rating filter, export-as-eval-fixtures ② Telegram bot worker (api/lib/telegram-bot.ts, production-only boot): - long-polling getUpdates (offset-confirmed, 409 backoff, 429-aware) - chat_join_request → instant approveChatJoinRequest + group welcome (channels approved silently — no broadcast spam) - private DMs answered by the SAME expert brain (getChatResponse + live course catalog + sanitizeReplyOutput), per-chat 30-min history, 20 msgs/hour per user, 600/day global cap - Arabic-first language resolution (text → language_code → ar) - plain-text chunking at paragraph boundaries (3900 cap), typing …fe662bc