Skip to content

Keep code and plain-text speeds apart - #29

Merged
nannndev merged 1 commit into
mainfrom
claude/exciting-bell-qakqv7
Sep 30, 2026
Merged

nannndev merged 1 commit into
mainfrom
claude/exciting-bell-qakqv7

Conversation

@nannndev

Copy link
Copy Markdown
Owner

Summary

Words and passages type much faster than code, so mixing them inflated several speed stats. Personal bests per language were already separate.

  • Profile: speed stats (best run, recent speed, accuracy, trend, records, languages) show either Code or Words & passages. A toggle appears when you have both. Activity, streak and time typed still count everything.
  • Division: always ranked on code runs, on the profile and the shared profile card.
  • Shared profile card: leads with the best code run, and falls back to text only for someone with no code runs.
  • Velocity badges: now "Hit N WPM on code". They count code runs only, and so do the Pixel shades they unlock. Badges already earned stay earned.
  • Friends board: shows each player's best code speed this week.
  • Helpers: runKind and bestByKind in src/utils/ranking.ts, shared with the API.

Test plan

  • vitest: 210 tests pass, including new split tests and a speed-badge test.
  • tsc -b, the API typecheck and the build pass.
  • Browser check of the profile with mixed runs (API mocked):
    • Code shows 91 WPM (Go), Words & passages shows 128 WPM (English);
    • the division is unchanged between the two tabs.

🤖 Generated with Claude Code

https://claude.ai/code/session_018xNjY7412Rp5bFuw5h69yu


Generated by Claude Code

Words and passages type far faster than code, so mixing them inflated the
profile best, the division and the Velocity badges. The profile now shows
speed stats for Code or Words & passages (a toggle when you have both),
the division is always ranked on code, the shared profile card leads with
the best code run, Velocity badges (and the Pixel shades they unlock)
count code runs only, and the friends board shows best code speed.
Personal bests were already kept per language.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018xNjY7412Rp5bFuw5h69yu
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
codetype Ready Ready Preview Sep 30, 2026 4:38am UTC

@nannndev
nannndev merged commit 2080d5f into main Sep 30, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — 1cebd06b Deployed Sep 30, 2026 by vercel[bot]
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.

2 participants