Profile

A step of the Cloud application tree on Gradus, in the Frontend area: Second app, UI, browser tests.

Let users change their display name and claim a unique username, with reserved words and letter case handled once.

Usually comes after: Settings page.

Prompt for your AI assistant

Read the users and identities model and the settings page. Add a profile section with a display name and a username. Store a normalised lower-case form of the username under a unique constraint, so Ann and ann are one name, and allow a short set of characters. Reject reserved words such as admin and support and anything that clashes with the product's own routes. Say whether a name is taken as the user types and rate limit that check, but rely on the constraint rather than the check when saving. Ask me whether a changed username stays held back for a while and write the answer in docs/. Validate on the server and add tests.

This is https://gradus.kazet.blog/tree/cloud-application/step/profile-page as plain HTML. In a browser the page also lets you mark the step forged and copy a message for your AI assistant.