fix(read): stop claiming a wrong password burns a read - #22
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new inline comment in p/[id].vue is slightly inaccurate vs server behavior for legacy/NULL unlock_hash cases and should be corrected to avoid misleading future maintainers.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the Reveal warning copy in the read page so it no longer incorrectly claims that entering a wrong password consumes a read, and avoids showing any password-related clause when the paste is not password protected.
Changes:
- Split the warning text into a general “consumes one read” message and a password-specific clause.
- Append the password-specific clause only when
meta.passwordProtectedis true. - Update EN/FR locale strings to match the new wording.
File summaries
| File | Description |
|---|---|
| apps/app/i18n/locales/en.json | Adjusts the burn warning copy and adds a new password-specific warning key. |
| apps/app/i18n/locales/fr.json | Same as EN: updates burn warning copy and adds the new password-specific warning key. |
| apps/app/app/pages/p/[id].vue | Builds the burn warning description dynamically so the password clause only appears for password-protected pastes. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Closes #21
The warning above Reveal no longer claims that a wrong password consumes a read, and the password
sentence now appears only on pastes that actually have one.
Why
reveal.post.tshas folded the unlock hash into theWHEREof the atomicUPDATEsince af3b28e, soa reader with the wrong password matches no row and the counter never moves. The handler's own
comment says it — "a mistyped password costs nothing" — but the string above the button still said
the opposite, which reads as a warning against retrying when retrying is exactly what the design
allows.
The alert was also rendered unconditionally, so a paste with no password still carried the password
clause. That is the common case, and it points the reader at a field that is not on screen.
What's in it
burnWarningDescriptionkeeps the part that is always true. A newburnWarningPasswordcarries therest and is appended only when
meta.passwordProtected:No server change — the behaviour was already right, only the wording was stale.
Known limit
Pastes created before af3b28e have a
NULLunlock_hash, and theisNullbranch in the revealquery makes them match any reveal, so for those the old text remains accurate. They age out with
retention — 7 days anonymous, 30 authenticated by default, though an instance set to unlimited would
keep them.
Distinguishing them in the UI would mean exposing whether a paste carries an unlock hash, which
tells a reader the paste predates that release. That is metadata the
/metaendpoint deliberatelydoes not return, and it buys accuracy for a set that empties itself, so this PR does not do it.
Checks
pnpm lint,pnpm typecheckandpnpm testpass (86 tests)touching it. Worth confirming the claim against
reveal.post.tsrather than taking the string'sword for it — that mismatch is the whole bug.
AI assistance
change; reviewed before merge.
🤖 Generated with Claude Code