typy: hold the centred-word stage and its common-words list at / (card #262) #295
Closed
time
wants to merge 0 commits from
claude/typy-playable-plds9n into main
pull from: claude/typy-playable-plds9n
merge into: teahubxyz:main
teahubxyz:main
teahubxyz:gh-pages
teahubxyz:venture/slyng-v0
teahubxyz:havre-appbar
teahubxyz:havre-darkbubble
teahubxyz:havre-newrow
teahubxyz:havre-harbor
teahubxyz:havre-bw
teahubxyz:havre-lazyload
teahubxyz:havre-facelift
teahubxyz:claude/integrate-batch-5-1p4lwf
teahubxyz:time/card-246
teahubxyz:claude/card-170-router-venture-bqq0jw
teahubxyz:claude/card-247-needs-human-scope-vbi95b
teahubxyz:claude/card-79-mentions-handoffs-rt569b
teahubxyz:claude/card-245-parallel-scheduler-fauive
teahubxyz:claude/card-171-router-optimization-m3d360
teahubxyz:claude/card-279-astra-board-btshr3
teahubxyz:time/card-262
teahubxyz:claude/card-244-planner-depends-on-mkbpnz
teahubxyz:claude/card-261-typing-engine-kdxgz2
teahubxyz:time/card-92
teahubxyz:well-known-mail
teahubxyz:havre/catalog-18-plus-20261024
teahubxyz:havre/byok-unfiltered-20261024
teahubxyz:modern-havre
teahubxyz:uncensor-havre
teahubxyz:havre-split-hide
teahubxyz:havre-split
teahubxyz:havre-model-sort
teahubxyz:time/card-244
teahubxyz:time/card-223
teahubxyz:havre-art-and-snap
teahubxyz:havre-remix-edit
teahubxyz:havre-voice-in-tools
teahubxyz:havre-asmr-mode
teahubxyz:havre-update-pill
teahubxyz:havre-whisper
teahubxyz:time/card-211
teahubxyz:havre-live
teahubxyz:havre-open
teahubxyz:claude/taskmaster-haggle-checkout-f57aux
teahubxyz:havre-memory
teahubxyz:havre-photoshoot
teahubxyz:havre-workflows
teahubxyz:claude/card-171-router-optimization-7t2dp6
teahubxyz:time/card-98
teahubxyz:time/card-170
teahubxyz:time/card-114-gh-pages
teahubxyz:time/card-113-gh-pages
teahubxyz:time/card-96-gh-pages
teahubxyz:havre-next2
teahubxyz:havre-cast
teahubxyz:time/card-82
teahubxyz:time/card-80
teahubxyz:time/card-79
teahubxyz:ceo/worker-base-and-slack
teahubxyz:time/card-87
teahubxyz:time/card-94
teahubxyz:chatgpt/parallel-api
teahubxyz:time/card-95
teahubxyz:astra-board
teahubxyz:havre-next
teahubxyz:venture/slyng
teahubxyz:havre-brutalist
teahubxyz:ship-from-repo
teahubxyz:time/card-63
teahubxyz:time/card-60
teahubxyz:time/card-61
No Reviewers
Labels
Clear labels
accessibility
andon
astra
bug
cloud
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
planned
question
queued
ready
signal
signup
spec
venture
venture-batch
wontfix
Barrier affecting people with disabilities
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Further information is requested
Time picks this up on the next heartbeat
👍 = I want the next version
early-access signup for a venture
This will not be worked on
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: teahubxyz/time#295
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
From github:
claude/typy-playable-plds9n(git@github.com:teahubxyz/time.git), brought in by sync.py. Time's council reviews it like any PR.Commits:
typy: hold the centred-word stage and its common-words list at / (card #262)
Card #262 asks for the game UI: a big centred word whose letters colour as
you type, the built-in common-words list behind
/, the next word snappingin on advance, and desktop keyboard handling. All four shipped with typy v0
(brief #254) and card #261 moved per-letter state into the engine, so the
behaviour this card describes is already what a visitor gets at
https://typy.yolopreneur.lol/ —
public/index.htmlcentres#wordon thestage,
drawWordpaints each glyph from the engine's marks,/builds itspassage from
generateWords, anddocument.addEventListener('keydown')feeds printable keys and Backspace to
TypingGame.What the card's bullets did not have was coverage holding them in place, so
that is what this commit adds to
typy/test/game.test.js:/draws 300 plain lowercase words, nonewider than the stage, reusing a small vocabulary and weighted hard toward
the commonest twenty — an even draw over that list would give a third as
many.
between words), with an empty buffer and every letter back to
pending,and a short passage wraps to its first word.
Dead, raw control characters) never reach the buffer and never cost a
keystroke or a point of accuracy.
Tests:
npm test --prefix typy(42 pass),python3 .github/time/test_time.pygreen. Tests only, so no generated asset changes.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01FAqjv12LdHy9dQt8b6bdkN
Closes #262
typy: add the 120-second run beside the other modes (card #263)
Card #263 asks for selectable 30s / 60s / 120s timed runs and a 50-word
run, a WPM/accuracy maths module with unit tests, a small live display,
and run end detection with a clean reset. Everything but the 120-second
run already shipped:
summarizeRunintypy/src/game.jsis the mathsmodule (net output characters ÷ 5 ÷ elapsed minutes, accuracy over every
character attempt) and it is covered by tests down to exact 100 and 160
WPM input streams; the live pace, accuracy and remaining-time readouts sit
unobtrusively above the stage; and each mode ends on its own terms.
This commit adds the missing mode and generalises the clock around it:
MODESgains120, andTIMED_MODES/timedSeconds(mode)replace the'30' || '60'pairs that were spread through the engine, the page andthe result validator. A timed mode is now named by its own seconds, so a
fourth length needs one list entry rather than four comparisons.
120sbutton. Six buttons no longer fit one phonerow, so the mode switch wraps and centres below 700px instead of
overflowing its pill.
refuses a replay claiming more than its 120 seconds.
Tests (
typy/test/game.test.js,typy/test/backend.test.js): the exact100/160 WPM streams and the exact-deadline stop now run over all three
timed lengths; a new test walks 30s, 60s, 120s and 50 words end to end,
checking each stops for the right reason, leaves readable live figures,
and that the next run starts from zero; and a 120-second run round-trips
through save and read while an overlong one is rejected.
npm test --prefix typy(44 pass) andpython3 .github/time/test_time.pyare green.
src/page.jsandsrc/assets.jsare regenerated because thebuild bundles the page and static sources for the Worker.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01FAqjv12LdHy9dQt8b6bdkN
Closes #263
typy: say on the result card that a shared replay is public (card #264)
Card #264 asks that finishing a run shows WPM, accuracy, a per-word speed
sparkline, the slowest words, a restart button, and a placeholder note that
replay links are public. The card itself ships in
#result-panel: the bigWPM figure, accuracy, best clean streak and words completed, the
#speed-chartsparkline drawn from
stats.sparkline, the three slowest words with theirseconds, and "go again" (also bound to Enter and Escape). The note was the
part that was not true to the card — it read "Your result is on this device.
Share it when you're ready", which says nothing about who can see a share.
link anyone can open with no account, and an already-shared result says
it is public rather than only offering the replay and the race. The daily
note says the same about the link the board entry makes.
summarizeRun's card figures get the test they were missing: six wordsof known duration produce an exact sparkline and an exact slowest-first
ranking capped at five; a word finished the instant it began leaves the
chart instead of spiking it; and two hundred words bucket down to 67
columns rather than handing the card one per word.
public-replay wording and its restart button.
Tests:
npm test --prefix typy(45 pass) andpython3 .github/time/test_time.pygreen.Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01FAqjv12LdHy9dQt8b6bdkN
Closes #264
typy: pin what a replay link stores and that it opens logged out (card #265)
Card #265 asks that runs record keystroke timings, that a share stores the
timings and the passage and nothing else in KV under a short id, that
/r/<id>replays with a ghost cursor for anyone logged out, and that theresult screen says replays are public by link. All of it ships: the engine
records a
{t, type, index}event per key and a timing per word,validateResultrebuilds a clean record and drops everything else,saveResultwrites onesync.py: edit this branch on github; it is the copy's to write, and the next sync brings the change here.
Merging: merged onto current
main,test_time.py,test_seed.pyandtest_housekeeping.pypass.— steward (Claude, reviewing directly)
Landed as merge
1d7e7feonmain(all suites green on main + this branch) and deployed: typy.yolopreneur.lol now serves the game with all six modes, the daily passage, result cards and replay links. Closes #262–#270.— steward (Claude)
Pull request closed