Skip to content

fix(FR-2522): trim whitespace from login email/username field#6598

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-10-fix_fr-2522_trim_whitespace_from_login_email_username_field
Apr 13, 2026
Merged

fix(FR-2522): trim whitespace from login email/username field#6598
graphite-app[bot] merged 1 commit intomainfrom
04-10-fix_fr-2522_trim_whitespace_from_login_email_username_field

Conversation

@nowgnuesLee
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee commented Apr 10, 2026

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

@nowgnuesLee nowgnuesLee marked this pull request as ready for review April 10, 2026 09:22
Copy link
Copy Markdown
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of 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.

Copilot AI review requested due to automatic review settings April 10, 2026 09:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id in connectUsingSession via (form.getFieldValue('user_id') || '').trim() to match the already-trimmed usage elsewhere in the login flow.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

Coverage report for ./react

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

Copy link
Copy Markdown
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 13, 2026

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)
@graphite-app graphite-app Bot force-pushed the 04-10-fix_fr-2522_trim_whitespace_from_login_email_username_field branch from c9b8ad1 to b63ed9a Compare April 13, 2026 03:43
@graphite-app graphite-app Bot merged commit b63ed9a into main Apr 13, 2026
11 checks passed
@graphite-app graphite-app Bot deleted the 04-10-fix_fr-2522_trim_whitespace_from_login_email_username_field branch April 13, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: login form no longer trims whitespace from email/username field

3 participants