Skip to content

Enhance stats and telemetry features with formatting updates - #52

Merged
kbtale merged 6 commits into
masterfrom
feat/stats-dashboard
Sep 7, 2026
Merged

kbtale merged 6 commits into
masterfrom
feat/stats-dashboard

Conversation

@kbtale

@kbtale kbtale commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

Implements a privacy-first local analytics and statistics dashboard across all 24 interactive tools in Useless Polymath. Tracks practice telemetry (attempts, correct answers, accuracy rate, streaks, high scores, activity timestamps), computes multi-domain subject mastery (Novice, Apprentice, Proficient, Master), displays a 30-day practice activity heatmap, unlocks 8 milestone achievements with real-time celebratory in-app toast notifications, and provides full JSON backup export and import data portability.

Key Additions and Changes:
Storage and Telemetry Engine (src/services/storage.ts): Granular per-module telemetry tracking stored locally under polymath_stats_* keys with automatic backward-compatibility migration from legacy streak and high score keys. Full JSON backup export and validated import with error resilience.
Achievements and Mastery Logic (src/modules/stats/logic.ts): Pure domain logic computing subject mastery across 5 categories (Chronometry, Cryptography, Logic, Networks, Science & Electronics), 30-day activity heatmap intensity levels, and 8 milestone achievement evaluations.
Practice Coordinator and Toast Alerts (src/hooks/usePracticeStreak.ts, src/components/core/AchievementToast.tsx): Seamless telemetry auto-logging on practice submissions that dispatches real-time celebratory in-app toast banners when milestone achievements are unlocked.
Full-Screen Stats Dashboard (src/components/stats/StatsDashboard.tsx): Dedicated analytics dashboard with overview KPI cards, 30-day heatmap grid, domain mastery progress meters, milestone achievements showcase, sortable/filterable per-module telemetry table, and backup data management controls.
Navigation and Deep-Linking (src/components/layout/AppShell.tsx, src/hooks/useModuleNavigation.ts): Direct access via top header "Stats" button, sidebar navigation, and #stats URL hash deep-linking.
100% Locale Parity: Complete translations across English (en), Spanish (es), and Italian (it) verified by automated parity tests.

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Performance improvement
  • Accessibility improvement
  • Documentation update

Checklist

  • npm run check passes (Biome lint & format)
  • npm run test passes (all unit tests)
  • npm run build passes (TypeScript strict mode)
  • New i18n keys added to all 3 locales (en, es, it)
  • No inline styles added (use SCSS modules)

@kbtale
kbtale merged commit ee5938c into master Sep 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant