Repository navigation
Conversation
Text over 64 code points gets the "1 to 11 letters and digits" message today, even when it holds only a few letters and digits after normalize. Check that the message names the limit before changing it (T-1). Signed-off-by: Lui Lui <40736418+lui01212@users.noreply.github.com>
Text over 64 code points was turned into empty text before the check, so the caller read "1 to 11 letters and digits", which points at the wrong fault. Refuse it with its own message first, like the PHP client does. Signed-off-by: Lui Lui <40736418+lui01212@users.noreply.github.com>
Contributor
Author
|
Hi @MobileMage, a gentle nudge on this one when you have time. It pairs with gatepost-dev/spec#15, which names the same 64 code point limit in client.md. Happy to change anything. |
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.
Give text over the input limit its own
invalid_inputmessage inautocompleteRequest.Until now such text was turned into empty text, so the caller read "The text must hold 1 to 11
letters and digits after normalize", even when it held only a few letters and digits. The new
message names the 64 code point limit, like the PHP client does. The error code and the public
interface stay the same.
The new test fails on the old code with exactly that message, and passes after the fix.
pnpm check, Node 22 tests and the Firefox and WebKit journeys pass after the fix.
CI: https://github.com/lui01212/js/actions/runs/37894387274
Before the fix: https://github.com/lui01212/js/actions/runs/37893246517
Closes #5
Claude Code helped write the test, the fix and the changeset, and review the diff.
Signed-off-by: Lui Lui 40736418+lui01212@users.noreply.github.com