Repository navigation
Allow users to update their phone number in settings - #103
Merged
Merged
Conversation
Wires PhoneSettingsInput into Settings.jsx, saving via the new dataProvider.updateProfile (separate from updateSettings, which only persists to additionalData). Points client/shared and server/shared at the phone-number-settings-update branches pending their PRs.
…er PRs are merged
There was a problem hiding this comment.
Pull request overview
Adds support for editing a logged-in user’s phoneNumber from the client settings page, persisting it via a dedicated profile update path rather than the existing settings blob mechanism.
Changes:
- Adds
PhoneSettingsInputto the settings form and initializesphoneNumberfromidentity.phoneNumber. - Splits settings persistence so
phoneNumberis saved viadataProvider.updateProfile, while other settings continue viadataProvider.updateSettings. - Updates the roadmap to mark phone-number updates in settings as completed.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| client/src/settings/Settings.jsx | Adds phone number field to settings and saves it via updateProfile separately from updateSettings. |
| client/src/roadmapFeatures.js | Adds a completed roadmap entry for updating phone number from settings. |
Files not reviewed (1)
- client/src/roadmapFeatures.js: Generated file
Comment on lines
+46
to
50
| const handleSave = async ({ phoneNumber, ...values }) => { | ||
| try { | ||
| await dataProvider.updateSettings({ data: values }); | ||
| await dataProvider.updateProfile({ data: { phoneNumber } }); | ||
| await authProvider.getIdentity(true); |
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.
Summary
PhoneSettingsInputto the settings page (client/src/settings/Settings.jsx), letting a logged-in user edit theirphoneNumber.phoneNumbernow goes throughdataProvider.updateProfile(writes the top-levelUser.phoneNumbercolumn via the newPATCH /profileendpoint), while the rest of the form still goes throughdataProvider.updateSettings(writes toadditionalData). These had to stay separate becausephoneNumberis a real column used elsewhere (e.g. the Yemot IVR call router matches incoming calls against it), not just a preference blob.client/sharedandserver/sharedto latestmain, which include the newPhoneSettingsInput/dataProvider.updateProfile(Add phone number settings input nra-client#21) andAuthService.updateProfile/PATCH /profile(Add PATCH /profile endpoint for updating phone number nra-server#22), both already merged.Test plan
yarn testinclient— 21 suites / 149 tests passyarn testinserver— 877 tests pass (3 pre-existing unrelated failures from a missing@aws-sdk/client-s3dependency)Generated by Claude Code