Skip to content

Make each prompt lock in only when it's typed exactly right - #10

Merged
Byntham merged 1 commit into
mainfrom
t3/practice-completion-lock
Nov 5, 2026
Merged

Byntham merged 1 commit into
mainfrom
t3/practice-completion-lock

Conversation

@Byntham

@Byntham Byntham commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Problem

You could send a prompt with typos in it, and the prompt never felt finished. Each practice prompt should stand on its own. You should only finish it by typing it exactly right, and then it should lock and show that it's done.

Fix

  • Wrong keys stay red until you backspace them. You can't type past the end of the prompt.
  • When every character matches, the prompt turns green and locks. Keys and backspace do nothing, and the composer shows "Done. Press Enter to send."
  • Enter sends only a complete prompt. The send button lights up only then.
  • WPM stops at the last key, not at Enter. Time spent in other threads still doesn't count.

Since every sent prompt is now clean, the agents never see a typo. This PR removes all the "agents take typos literally" code. That includes the typo diff, the literal replies, typosLiteral, the typo underline in sent messages, the end screen typo list, DRAFT_SLACK, and the draftWordsMs trailing-space clock. typos.ts is now a 25-line reply.ts that only lists changed files.

Wrong keys Complete and locked
wrong done

Proof

  • tests/timing.test.ts has new tests. A draft with a wrong key won't send, and it sends after you fix it. A complete prompt ignores keys, backspace, and word-backspace. The timer stops at the last key even if Enter comes 5s later.
  • tests/play.mjs plays a full session in Chromium. Every third prompt is typed with swapped letters, and Enter is pressed. It checks that Enter did not send (10 times), then fixes the prompt and sends it. All 34 prompts were sent and the session ended normally. The screenshots above come from this run.
  • A unit test checks that every prompt in threads.json is printable ASCII, so every prompt can be finished on a keyboard.
  • npm run typecheck, npm run lint, npm run test:unit (26 passed), and node tests/play.mjs (all checks 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 prompt now locks once every character matches. The text turns green and the
composer shows "Done. Press Enter to send." Keys and backspace do nothing while
it is locked, and Enter does nothing until the prompt is complete. The timer
stops at the last key.

Every sent prompt is now clean, so the agents never see a typo. This removes the
typo diff, the literal replies, typosLiteral, the typo underline in sent
messages, the end screen typo list, and the slack that let you type past the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Byntham
Byntham merged commit b3b6206 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