Let users edit their display name on web and mobile - #171
Conversation
…obile Shared: API.profile.name, setNameRequestSchema (trim, 1-50 chars), 'setName' queued-mutation type, profile.editName i18n in en and pt-BR. Web: updateName Server Action + EditNameSheet (AppOverlay) + pencil affordance on the profile header name. Mobile: EditNameSheet (TrueSheet + offline-queued mutation) + matching affordance. Refs #166 Refs #167 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
One hard-rule violation to fix: the new mobile test file introduces five any annotations (tree: any, node: any) in violation of CLAUDE.md rule 3 (zero any everywhere, including tests). The typed TestRendererApi / TestInstance / TestNode pattern already exists in message-bubble.test.tsx — the inline comment has the full drop-in replacement. Everything else is solid: full cross-platform parity, both i18n locales updated, shared Zod schema driving client + server validation, proper optimistic-update + revert on error (offline queue on mobile, invalidate-on-settle on web matching the respective platform precedents), and comprehensive test coverage on all four behavioral paths for both platforms.
… test Replace the five any annotations with the TestRendererApi / TestInstance / TestNode interfaces already used by message-bubble.test.tsx; finders throw on miss so call sites stay assertion-free. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
The any violation from the prior review is gone — the follow-up commit cleanly replaced all five annotations with the TestRendererApi / TestInstance / TestNode / TestTreeRoot interfaces already used elsewhere in the test suite. The rest of the feature is solid: full cross-platform parity (web AppOverlay + mobile TrueSheet-backed BottomSheetModal), shared Zod schema driving client-side and server-side validation identically, correct optimistic-update + rollback on both platforms (mobile uses the offline queue with patchProfile revert; web uses onMutate/onError/onSettled with invalidate), both i18n locales updated, comprehensive behavioral tests on four paths per platform, and no banned patterns anywhere in the diff.
There was a problem hiding this comment.
The any violation from the prior review is gone — the follow-up commit cleanly replaced all five annotations with the TestRendererApi / TestInstance / TestNode / TestTreeRoot interfaces already used elsewhere in the test suite. The rest of the feature is solid: full cross-platform parity, shared Zod schema driving validation on both clients, correct optimistic-update + rollback on both platforms, both i18n locales updated, comprehensive behavioral tests on four paths per platform, and no banned patterns anywhere in the diff.
|


Summary
Implements #167: the auto-generated name (
thomaslrgregorio,User) is now editable from the profile screen on BOTH platforms. Tap the name (pencil affordance) in the profile header → edit sheet with a Field and pill save CTA, inline validation, optimistic update.API.profile.name,setNameRequestSchema(trimmed, 1–50 chars),'setName'queued-mutation type,profile.editNamei18n group in en AND pt-BR.updateNameServer Action,EditNameSheet(AppOverlay+FieldInput+PillButton), optimisticpatchProfile+ invalidate on settle.EditNameSheet(TrueSheet wrapper +AppTextInput+PillButton), mutation through the offline queue (performQueuedApiMutation, dedupe keyprofile-name) with optimistic patch + revert on error (no invalidate-on-settle, matching the profile-setter precedent so a queued offline mutation is not clobbered by a refetch).Closes #167
Refs #166 (all #166 code lives in the paired API PR)
Paired API PR: thomasluizon/orbit-api#204 — merge it first (API contract), then this one.
Validation
turbo lint2/2,type-check3/3,test3/3 workspaces (shared 899, mobile 457, web suite green)🤖 Generated with Claude Code