For: A passkey ceremony that fails reads the same wherever it is said, because it is said from one place. Today each sentence below is typed out separately in src/web/pages/passkeys.ts, src/web/pages/signup-passkey.ts, src/web/passkey-ceremony.ts, so the next edit to one copy makes them drift.
Done:
[ ] src/web/passkey-words.ts exports these sentences (new, or the existing module of that concept if one already owns similar words; say which in the pull):
- "That request expired. Try again."
- "That passkey was not accepted."
- "That passkey is already registered."
[ ] Every file named imports them, and grep -rn for each sentence under src/ finds only the module.
[ ] Answers and pages are byte-for-byte unchanged: every existing test passes as it is.
[ ] A new test/passkey-words.test.ts asserts each exported sentence is non-empty and that each file named no longer contains the literal (read the source as text). It fails if a copy is typed back.
[ ] Before pushing, run test/passkey-words.test.ts, the tests of the files you touched, bun x tsc --noEmit and, if src/web changed, bun scripts/design-lint.ts. A red test elsewhere that main also has is named in the pull, not a reason to stop.
Files: src/web/passkey-words.ts, src/web/pages/passkeys.ts, src/web/pages/signup-passkey.ts, src/web/passkey-ceremony.ts, test/passkey-words.test.ts.
Risk: a pure move; change no wording. Touch only the lines the sentences are on.
For: A passkey ceremony that fails reads the same wherever it is said, because it is said from one place. Today each sentence below is typed out separately in src/web/pages/passkeys.ts, src/web/pages/signup-passkey.ts, src/web/passkey-ceremony.ts, so the next edit to one copy makes them drift.
Done:
- "That request expired. Try again." - "That passkey was not accepted." - "That passkey is already registered."
grep -rnfor each sentence under src/ finds only the module.bun x tsc --noEmitand, if src/web changed,bun scripts/design-lint.ts. A red test elsewhere that main also has is named in the pull, not a reason to stop.Files: src/web/passkey-words.ts, src/web/pages/passkeys.ts, src/web/pages/signup-passkey.ts, src/web/passkey-ceremony.ts, test/passkey-words.test.ts. Risk: a pure move; change no wording. Touch only the lines the sentences are on.