Spaces:
Running
Running
Commit History
-
Leaderboard: hide owner's own demo account Running
Add a configurable hide-list (config.leaderboard_hidden, env LEADERBOARD_HIDDEN) matched by display name or email, and filter those rows out of leaderboard(). Non-destructive: Firestore data stays, so redoing sessions won't resurface the row. Defaults to hiding "Kenneth Gunawan". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>74c42cf -
Learning Path curriculum + Indonesian UI polish
- Add progressive curriculum engine (curriculum.py) with mastery gates, /learn page, and module threading through the drill flow - Localize Drill Fokus + skill breakdown: Indonesian drill titles/summaries, rapport -> "relationship" - Practice page copy: FA-framed subtitle, fix persona hint typo, drop decorative marks beside the brand line Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1523a75
-
Manual mic, real drills/progress, ElevenLabs voice, BCA Life logo
Mic: remove silence auto-send; voice input is now manual push-to-talk (tap to start, tap to stop+send) to avoid mis-fires. Drills: clicking a drill now shows a real briefing (Situation + Your mission + focus skill) instead of dropping into a blank chat. Backend drills gain an `objective` field; drill deep-links no longer get hijacked by a stale saved session. Progress/gamification: keep streak, remove XP and Level everywhere (progress hero, coaching report, leaderboard, manager dashboard). Leaderboard now ranks by average score with sessions as the supporting stat. Removed the daily-goal and badges cards from the progress page. Voice: add ElevenLabs TTS proxy (/api/training/tts) with a natural voice that matches each persona's gender; personas gain a `gender` field. Frontend useServerTTS plays the MP3 and supersedes the browser voice when ELEVENLABS_API_KEY is set, falling back otherwise. Branding: add the official BCA Life logo as a co-brand on the sign-in screen, sidebar footer, …fec964e
-
Unify app shell with sidebar nav, harden UX, add STT + profile recommender
Frontend: - Replace PageHeader/AppNav with collapsible AppShell + AppSidebar across all pages - Add FetchError + retry, ConfirmModal, skeleton loaders, 3-state ThemeToggle - Session persistence, request cancellation, persona caching on training page - Server-side STT fallback (useServerSTT) for iOS/Safari - Recommender: customer-profile analysis as a sub-page tab beside product compare - Dark mode polish and i18n gap fills Backend: - GET /api/training/attempt/{id} for session transcript history - Server-side STT endpoints (Groq Whisper) + config + httpx dep Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>0727ec3
-
Cut token cost + add streaming roleplay and progress analytics
Token savings (backend): - Gate the live coach to meaningful turns (questions, price/closing talk, objection responses) so filler turns skip the second LLM call (~60-70% fewer coach calls). - Mark the stable system+product-facts prefix as a prompt-cache breakpoint (cached_system) across roleplay, eval, and chat so repeat turns bill at the cheap cache-read rate. - Upgrade default model to anthropic/claude-haiku-4.5 (smarter, same price tier) and add optional per-task OPENROUTER_COACH_MODEL / OPENROUTER_EVAL_MODEL overrides (blank = reuse chat model). - Sharpen the evaluation rubric with per-dimension score anchors (no extra output tokens). UX / zero-token: - Stream the roleplay customer reply via SSE (/api/training/chat/stream) with automatic fallback to POST /chat; token cost identical. - Score-progression chart across sessions on the progress page. - Signature "strongest skill" badge per FA on the leaderboard. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>ceff007
-
Fix evaluation scoring, recommender NoneType error, and add sales scripts
- Evaluation: retry LLM up to 3x on JSON parse failure, validate scores in range 1-10 (default to 5 instead of 0), show error banner in UI when eval fails instead of misleading 0/10 scores - Recommender: fix 'NoneType' object is not iterable by guarding _catalog_block and parsed recommendations against None - Progress: save attempts even on eval failure so sessions are tracked; guard all Firestore .stream() calls against None returns - Sales scripts: add scripts for 4 new personas (Mbak Dina, Mas Riko, Pak Teguh, Mbak Ratna) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c9d771b
-
Add team leaderboard and manager dashboard (Phase 2)
With scores centralized in Firestore, surface two team views backed by a denormalized users/{uid} summary that save_attempt now refreshes after each session (name/photo from the Google profile, totals, per-dimension averages). Both views read the single users collection — no per-attempt scanning. Backend - progress.leaderboard(): FAs ranked by total XP, with the caller's own row flagged and always included even outside the top N. - progress.team_overview(): team averages per dimension, totals, weakest team dimension, and a per-member list. - GET /api/training/leaderboard (any signed-in user) and GET /api/admin/overview (admin only). The profile flows end -> end_session -> save_attempt. Frontend - /leaderboard: ranked list with medals, avatars, level/sessions, XP; highlights the current user. Linked from the home header and progress page. - /manager: admin-gated KPI cards, per-dimension team averages, and a member table. Linked from the admin console. Co-Authored-By: Claude…340c40c -
Add Firebase Auth (Google) and move all data to Firestore
Implements the Phase 1 spec: trainees and admins sign in with Google, scores follow their account instead of a per-device id, and SQLite is replaced by Firestore. The backend is the only Firestore client (backend-mediated), so scoring logic stays server-side and the database is never exposed to the client. Backend - firebase.py: lazy Admin SDK init, shared Firestore client, token verification. - auth.py: get_current_user (bearer token -> uid, with email-domain restriction) and claim/allow-list require_admin; retires the shared admin password. - db.py: Firestore `sources` store (extracted PDF text travels with the doc, so the cache rehydrates at startup with no local files). - progress.py: attempts read/write `users/{uid}/attempts`; streaks/XP/badges still derived on read. - rag/recommender/seed/main/routes: swap SQLite + X-FA-Id for Firestore + the authenticated uid; admin routes use the new require_admin. - config: Firebase + allow-list settings; drop sqlite_path/admin_passwo…02dc9bf
-
Add voice-primary UI, coaching drills, progress dashboard, and brand assets
Convert chat interface to voice-first experience with tap-to-talk mic button, subtitle captions, and automatic text fallback for unsupported browsers (iOS). Add real-time coaching chips, focus drills, gamification progress tracking, and refreshed BIMA brand assets. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>2330921