feat(web): collect name during signup#958
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb465cbe-a93c-4c89-96f5-591e8f0908e3
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Greptile SummaryThis PR adds a required Name field to the email/password signup flow in
Confidence Score: 3/5The signup happy path works correctly, but the rollback block can leave orphaned accounts and surface a misleading error to the user. When web/app/components/FirebaseAuth.vue — specifically the Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Vue as FirebaseAuth.vue
participant FB as Firebase Auth
User->>Vue: Submit signup form (name/email/password)
Vue->>Vue: validateLoginForm()
alt validation fails
Vue-->>User: Show field errors
else validation passes
Vue->>FB: createUserWithEmailAndPassword()
FB-->>Vue: result.user
Vue->>FB: updateProfile(result.user, displayName)
alt updateProfile succeeds
FB-->>Vue: ok
Vue->>Vue: onSuccess(user, email)
Vue-->>User: Redirect to target route
else updateProfile fails
FB-->>Vue: error A
Vue->>FB: deleteUser(result.user)
alt deleteUser succeeds
FB-->>Vue: ok
Vue->>Vue: handleError(error A)
Vue-->>User: Show original error
else deleteUser also fails
FB-->>Vue: error B
Vue->>Vue: handleError(error B)
Vue-->>User: Wrong error shown, orphaned account remains
end
end
end
Reviews (1): Last reviewed commit: "feat(web): collect name during signup" | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
This PR updates the web auth flow to collect a user’s name during email/password sign-up and persist it to the Firebase profile, while also improving UX around auth-mode switching and attempting to roll back account creation if profile setup fails.
Changes:
- Add a required Name field for email/password Sign Up and write it to
user.displayNameviaupdateProfile. - Clear stale form errors when toggling between Sign In and Sign Up.
- Remove
redirectPreferenceStoreusage fromMessageThreadHeaderlogout flow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| web/app/components/MessageThreadHeader.vue | Removes redirect preference store usage and its logout reset. |
| web/app/components/FirebaseAuth.vue | Adds name capture/validation on sign-up, updates Firebase profile, adds rollback attempt, and clears errors when switching auth modes. |
Comments suppressed due to low confidence (1)
web/app/components/MessageThreadHeader.vue:74
- Logout should clear the redirect-to-threads preference (localStorage-backed) to avoid carrying that preference into the next login session on the same browser.
authStore.resetState()
phonesStore.resetState()
threadsStore.resetState()
notificationsStore.addNotification({
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb465cbe-a93c-4c89-96f5-591e8f0908e3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb465cbe-a93c-4c89-96f5-591e8f0908e3
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
web/app/components/FirebaseAuth.vue:144
- Rollback after a failed updateProfile is only best-effort: if deleteUser fails, the code logs and then rethrows the original profile error, which can leave an orphaned account (contradicting the stated rollback behavior). Consider surfacing rollback failure explicitly (e.g., throw an error that indicates rollback failed, with the delete error as the cause).
} catch (error) {
try {
await deleteUser(result.user)
} catch (deleteError) {
console.error(deleteError)
web/app/components/FirebaseAuth.vue:452
- Placeholder text should use correct punctuation/grammar for “e.g.” (typically “e.g.,” in running text) to avoid a visible typo in the UI.
placeholder="Enter your email address e.g john@gmail.com"
| density="comfortable" | ||
| class="mb-2" | ||
| persistent-placeholder | ||
| placeholder="Enter your full name e.g. John Doe" |
Summary
Validation
pnpm testpnpm generate