Skip to content

Show the expected letter when you hit a wrong key - #6

Merged
Byntham merged 1 commit into
mainfrom
t3/correct-error-character
Nov 5, 2026
Merged

Byntham merged 1 commit into
mainfrom
t3/correct-error-character

Conversation

@Byntham

@Byntham Byntham commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Problem

A wrong key showed the character you typed, in red. That hides what the prompt wanted, so you have to look back at the source to fix it.

Fix

A wrong key now shows the character the prompt expects, still in red. A wrong key where a space belongs shows a red "·". Keys typed past the end of the prompt still show what you typed, since there is no expected character.

Proof

Typed "toqenminimizexthe" against "tokenminimize the".

Before After
before after
  • Added checkWrongKeysShowExpectedText to tests/play.mjs. It failed before the fix (showed "q" and "x") and passes after (shows "k" and "·").
  • npm run lint, npm run typecheck, and npm test (28 unit tests plus the full Playwright run) pass.

Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

A wrong key now shows the character the prompt expects, still in red.
A wrong key in place of a space shows a dot. Extra keys past the end of
the prompt still show what was typed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Byntham
Byntham merged commit d97cf5e into main Nov 5, 2026
1 check 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