Fix typy word-transition lag and automatic-advance spaces #256

Merged
teahubxyz merged 1 commits from typy/smooth-typing-254 into main 2026-10-24 23:30:17 +00:00
Owner

The user reported choppy typing and a 52 WPM result versus a usual speed above 100 WPM.

The previous UI animated each incoming word from 20% opacity through a 170 ms slide. At a 160 WPM input cadence the target was often still only 44–55% opaque when its first letter arrived. It also rebuilt every letter and forced layout on every key, and performed about 60 layouts per second while idle. Separately, last-letter advancement treated a habitual Space as a wrong first character of the next word.

Changes

  • Show each target immediately at full opacity, with no incoming or outgoing word motion.
  • Preserve letter elements and update only changed feedback; fit words only when the word or viewport changes.
  • Update clock labels at a bounded rate, write changed values only, and leave the ready stage idle.
  • Move the optional upcoming-word preview closer to the current target and increase its readability.
  • In last-letter mode, accept one optional separator immediately after automatic advancement. Extra or mid-word spaces still require correction.
  • Add normal-motion browser regressions, controlled 100/160 WPM engine checks, and before/after performance receipts.

Validation

  • All 35 engine/backend tests passed, including exact 100 and 160 WPM streams in both advancement modes and both timed lengths. WPM calculation and replay scoring agree.
  • Six real-browser responsiveness checks passed with normal motion, including fast spaced input, fully opaque stationary word transitions, no idle DOM mutations, and long words at 390/360 px phone widths.
  • Real local save → result reload → replay scrub → ghost-race integration and PNG preview passed.
  • Profiled the same 140-key streams before and after: idle text writes/layouts dropped to zero; per-key word HTML replacements dropped from 140 to zero; layout reads dropped from 280 to 56. No active-word animations remain.
  • Profiling and regression receipts are committed under typy/evidence/.

Independent review

Accepted on desktop 1440×1000 and phone emulation 390×844 with normal motion. The upcoming preview remains distinct and readable, with no overlap or horizontal overflow. Reviewed app SHA-256: 392ce9b1a3b4e0f433ee09ff2b0491aed25bd038d2efc157a1545398756a182a.

Native browser input at nominal 100/160 WPM displayed 98/155 before and 98/157 after; key-handler P95 remained about 0.8 ms. This supports removing delayed visibility and unnecessary rendering work, without claiming the WPM formula caused the user's exact score or promising a particular human speed increase.

Live release — 2026-10-24

  • Merged and deployed at https://typy.yolopreneur.lol/ from canonical source 5a4710f6abaa13741db1bea397b2bc305d529273, Worker revision 7621951607d7e25b.
  • Repository CI run 2365 passed before merge. The clean deployment checkout's typy tree exactly matched the reviewed feature commit.
  • Deployment receipt: mac-4719fee876a84b9fa5634419750d7cbd.
  • Public health returned that source and revision. The live app.js, game.js, and style.css SHA-256 hashes exactly matched the tested local files.
  • All six responsiveness browser checks passed again against production at 23:31 UTC with normal motion: zero idle DOM mutations; immediate full-opacity stationary target; 160 WPM spaced input at 100% accuracy in both advancement modes; no long-word overflow at 390/360 px; no uncaught scripts.
  • Live acceptance used no model requests or daily-board writes.

Refs #254.

The user reported choppy typing and a 52 WPM result versus a usual speed above 100 WPM. The previous UI animated each incoming word from 20% opacity through a 170 ms slide. At a 160 WPM input cadence the target was often still only 44–55% opaque when its first letter arrived. It also rebuilt every letter and forced layout on every key, and performed about 60 layouts per second while idle. Separately, last-letter advancement treated a habitual Space as a wrong first character of the next word. ## Changes - Show each target immediately at full opacity, with no incoming or outgoing word motion. - Preserve letter elements and update only changed feedback; fit words only when the word or viewport changes. - Update clock labels at a bounded rate, write changed values only, and leave the ready stage idle. - Move the optional upcoming-word preview closer to the current target and increase its readability. - In last-letter mode, accept one optional separator immediately after automatic advancement. Extra or mid-word spaces still require correction. - Add normal-motion browser regressions, controlled 100/160 WPM engine checks, and before/after performance receipts. ## Validation - All 35 engine/backend tests passed, including exact 100 and 160 WPM streams in both advancement modes and both timed lengths. WPM calculation and replay scoring agree. - Six real-browser responsiveness checks passed with normal motion, including fast spaced input, fully opaque stationary word transitions, no idle DOM mutations, and long words at 390/360 px phone widths. - Real local save → result reload → replay scrub → ghost-race integration and PNG preview passed. - Profiled the same 140-key streams before and after: idle text writes/layouts dropped to zero; per-key word HTML replacements dropped from 140 to zero; layout reads dropped from 280 to 56. No active-word animations remain. - Profiling and regression receipts are committed under typy/evidence/. ## Independent review Accepted on desktop 1440×1000 and phone emulation 390×844 with normal motion. The upcoming preview remains distinct and readable, with no overlap or horizontal overflow. Reviewed app SHA-256: `392ce9b1a3b4e0f433ee09ff2b0491aed25bd038d2efc157a1545398756a182a`. Native browser input at nominal 100/160 WPM displayed 98/155 before and 98/157 after; key-handler P95 remained about 0.8 ms. This supports removing delayed visibility and unnecessary rendering work, without claiming the WPM formula caused the user's exact score or promising a particular human speed increase. ## Live release — 2026-10-24 - Merged and deployed at https://typy.yolopreneur.lol/ from canonical source `5a4710f6abaa13741db1bea397b2bc305d529273`, Worker revision `7621951607d7e25b`. - Repository CI [run 2365](https://teahub.xyz/teahubxyz/time/actions/runs/2365) passed before merge. The clean deployment checkout's typy tree exactly matched the reviewed feature commit. - Deployment receipt: `mac-4719fee876a84b9fa5634419750d7cbd`. - Public health returned that source and revision. The live app.js, game.js, and style.css SHA-256 hashes exactly matched the tested local files. - All six responsiveness browser checks passed again against production at 23:31 UTC with normal motion: zero idle DOM mutations; immediate full-opacity stationary target; 160 WPM spaced input at 100% accuracy in both advancement modes; no long-word overflow at 390/360 px; no uncaught scripts. - Live acceptance used no model requests or daily-board writes. Refs #254.
teahubxyz added 1 commit 2026-10-24 23:28:37 +00:00
teahubxyz merged commit 5a4710f6ab into main 2026-10-24 23:30:17 +00:00
Sign in to join this conversation.