Skip to content

Let users edit their display name on web and mobile - #171

Merged
thomasluizon merged 2 commits into
mainfrom
feature/166-167-emails-display-name
Jun 12, 2026
Merged

Let users edit their display name on web and mobile#171
thomasluizon merged 2 commits into
mainfrom
feature/166-167-emails-display-name

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

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.

  • shared: API.profile.name, setNameRequestSchema (trimmed, 1–50 chars), 'setName' queued-mutation type, profile.editName i18n group in en AND pt-BR.
  • web: updateName Server Action, EditNameSheet (AppOverlay + FieldInput + PillButton), optimistic patchProfile + invalidate on settle.
  • mobile: EditNameSheet (TrueSheet wrapper + AppTextInput + PillButton), mutation through the offline queue (performQueuedApiMutation, dedupe key profile-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).
  • Validation parity: empty/whitespace and >50-char names rejected inline client-side (shared Zod schema) and server-side (domain + FluentValidation).

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 lint 2/2, type-check 3/3, test 3/3 workspaces (shared 899, mobile 457, web suite green)
  • parity-checker: PAIRED on all mirrors · i18n-syncer: in sync · contract-aligner: 0 drifts

🤖 Generated with Claude Code

…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>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
orbit-ui-mobile-web Ignored Ignored Jun 12, 2026 8:00pm

Comment thread apps/mobile/__tests__/components/profile/edit-name-sheet.test.tsx Outdated

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@thomasluizon
thomasluizon merged commit 7e0c3c6 into main Jun 12, 2026
7 checks passed
@thomasluizon
thomasluizon deleted the feature/166-167-emails-display-name branch June 12, 2026 20:02
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
69.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let users edit their display name (auto-generated at signup)

1 participant