fix(FR-2522): trim whitespace from login email/username field#6598
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
Fixes a regression in the React login flow by ensuring the SESSION-based login path trims leading/trailing whitespace from the user_id (email/username) field before creating the client and attempting authentication.
Changes:
- Trim
user_idinconnectUsingSessionvia(form.getFieldValue('user_id') || '').trim()to match the already-trimmed usage elsewhere in the login flow.
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.95% | 1750/19543 |
| 🔴 | Branches | 8.07% | 1100/13636 |
| 🔴 | Functions | 5.41% | 288/5325 |
| 🔴 | Lines | 8.64% | 1641/18986 |
Test suite run success
854 tests passing in 39 suites.
Report generated by 🧪jest coverage report action from b63ed9a
Merge activity
|
Resolves #6597 (FR-2522) ## Summary - Add `.trim()` to the `user_id` field value in `connectUsingSession` to strip leading/trailing whitespace before login - This matches the existing `.trim()` behavior in `connectUsingAPI` - Regression was introduced during the Lit component removal migration (originally fixed in FR-556) ## Verification ``` === ALL PASS === ``` ## Test plan - [ ] Type email with leading/trailing spaces in login form → login succeeds - [ ] Paste email with extra whitespace → login succeeds - [ ] Normal login without spaces → still works as before 🤖 Generated with [Claude Code](https://claude.com/claude-code)
c9b8ad1 to
b63ed9a
Compare

Resolves #6597 (FR-2522)
Summary
.trim()to theuser_idfield value inconnectUsingSessionto strip leading/trailing whitespace before login.trim()behavior inconnectUsingAPIVerification
Test plan
🤖 Generated with Claude Code