Skip to content

fix(sdk): send only profile fields when updating the current user - #2060

Open
rohilsurana wants to merge 2 commits into
fix/keep-metadata-on-updatefrom
fix/profile-update-send-form-fields
Open

rohilsurana wants to merge 2 commits into
fix/keep-metadata-on-updatefrom
fix/profile-update-send-form-fields

Conversation

@rohilsurana

@rohilsurana rohilsurana commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Stacked on #2058. Merge #2058 first.

Problem

The profile page fills its form with the whole user object.
On save, it sent that whole object to UpdateCurrentUser, including metadata.
Saving a new avatar or name goes through the same save.
So every save wrote back the metadata the page had loaded.
If something else changed the metadata while the page was open, that change was lost.

What changed

  • The profile page now sends only the fields it edits: title, email and avatar. It also sends the current name, as before.
  • It no longer sends metadata, so the server keeps the stored value.
  • The request body is built in a small helper, profileUpdateBody, with a unit test.

Release order

This change is only safe on a Frontier server that has #2058.
Without #2058, a server wipes stored metadata when UpdateCurrentUser leaves it out.
Do not release this SDK change until the servers it talks to run #2058.

Checks

  • Unit test: a save that changes only the avatar, or only the title, sends no metadata.
  • ESLint passes on the changed files.
  • TypeScript reports no errors in the changed files.
  • Prettier already flags profile-view.tsx on main. This PR does not reformat it, to keep the diff small.

@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
frontier Ready Ready Preview Nov 23, 2026 7:42am UTC

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coveralls

coveralls commented Nov 23, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 45133425500

Coverage remained the same at 56.473%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 42507
Covered Lines: 24005
Line Coverage: 56.47%
Coverage Strength: 22.1 hits per line

💛 - Coveralls

@rohilsurana
rohilsurana force-pushed the fix/profile-update-send-form-fields branch from 4ed8e3a to fa3bfb7 Compare November 23, 2026 07:42
@rohilsurana
rohilsurana changed the base branch from main to fix/keep-metadata-on-update November 23, 2026 07:42
@rohilsurana
rohilsurana marked this pull request as ready for review November 23, 2026 08:46

This branch was successfully deployed

1 active deployment
Preview — fa3bfb72 Deployed Nov 23, 2026 by vercel[bot]
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.

2 participants