Claim a username when you sign up - #12
Merged
Merged
Conversation
An account's handle is the author segment of every game it publishes, so signup asks for one and the session carries it. `termcade signup` prompts for it first, before the email — it is the decision being made, not a field below the password — and the TUI's create-account form grows the same field, shown only when signing up. The greeting reports it, because "publish as nicodes/<game>" is the half an author actually needs. An account without a handle is a real state rather than an error: if the name is taken between the check and the claim, the session is still good and the server says what is missing. Nothing here treats that as a failed signup, which would send someone to retry with an email that is now their own. Pairs with the registry change in termcade-be, which is where handles, orgs and membership live. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Client half of the identity model. Pairs with aviorstudio/termcade-be#8, which is where handles, orgs and membership live.
An account's handle is the author segment of every game it publishes, so signup asks for one and the session carries it.
The handle is asked first, before the email — it is the decision being made, not a field below the password. The TUI's create-account form grows the same field, shown only when signing up, and tab order puts it first for the same reason.
An account without a handle is a real state
If the name is taken between the check and the claim, the session is still good and the server says what is missing:
Nothing treats that as a failed signup, which would send someone to retry with an email that is now their own.
PATCH /v1/me/usernameclaims one later, and the same call renames.Verified
go vetclean, full suite passes. The TUI signup test now types a handle, tabs through all three fields, and asserts the handle actually reaches the hook rather than merely rendering.End to end against a real stack (see the backend PR): this binary resolved, downloaded and installed
aviorstudio/tetrispublished by a plain org member.🤖 Generated with Claude Code