-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: Cannot save some user profile fields as empty #37430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 5adc4bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAllows saving empty strings for user profile bio and nickname by changing validation guards; adds test helper fields and an end-to-end test; includes a changeset declaring a patch release for Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client as Client (UI)
participant Server as saveUserProfile()
participant DB as Database
Client->>Server: updateOwnBasicInfo(settings:{ bio:"", nickname:"" })
note right of Server: Guards changed to accept empty strings\n(e.g., settings.bio === '' treated as present)
alt settings.bio present (including "")
Server->>Server: validate type and length
Server->>DB: update or remove bio field
end
alt settings.nickname present (including "")
Server->>Server: validate type and length
Server->>DB: update or remove nickname field
end
Server-->>Client: { success: true }
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37430 +/- ##
===========================================
- Coverage 68.99% 68.97% -0.02%
===========================================
Files 3358 3358
Lines 114215 114215
Branches 20534 20534
===========================================
- Hits 78798 78778 -20
- Misses 33329 33344 +15
- Partials 2088 2093 +5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
ricardogarim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: not directly related to the changed code, but on saveUserProfile, line 114 we’re trimming the nickname twice - once on the function input and again inside the function.
Co-authored-by: Kevin Aleman <kaleman960@gmail.com>
281b381
Proposed changes (including videos or screenshots)
It fixes an issue where its not being possible to save nickname and bio as empty in user profile
Issue(s)
Steps to test or reproduce
Further comments
SUP-914
CORE-1431
Summary by CodeRabbit
Bug Fixes
Tests