Add telemetry dashboard with Play/Stats toggle - #6
Open
Copilot wants to merge 1 commit into
Open
Conversation
Adds a stats dashboard showing games played, win rate, guess distribution, and letter accuracy, built against mock telemetry data. Includes 3 design mockup concepts and the final chosen design (dark stat cards) as artifacts in docs/telemetry-mockups. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a telemetry/stats dashboard to the game, viewable via a new Play/Stats toggle in the header. Since there's no analytics backend yet, the dashboard runs against mock data (
src/telemetry-data.js) shaped like a real telemetry API response, so it's a drop-in swap later.Design process
Explored 3 mockup concepts (rendered as screenshots) before building:
Chosen direction: Concept A's card layout, rendered in Concept B's dark color palette.
All mockups plus screenshots of the shipped dashboard are in
docs/telemetry-mockups/. Full write-up indocs/telemetry-dashboard-plan.md.What's included
src/telemetry-data.js: mock summary stats, guess distribution, letter accuracysrc/components/TelemetryDashboard/: dashboard component (stat cards, guess distribution chart, letter accuracy grid)src/components/Header/Header.js: Play/Stats nav togglesrc/components/App/App.js: switches between Game and Dashboard viewssrc/styles.css: dark dashboard theme, scoped to.telemetry-*classes (no impact on existing game styles)Out of scope
A player leaderboard was proposed as a fast-follow but needs per-player identity/accounts that don't exist yet, so it's left for a future PR.
Verification
npx eslinton changed files: cleannpx parcel build public/index.html: succeedsdocs/telemetry-mockups/real-*.png)