Push non-primary emails to Lobbyside (other_emails column) — take 2#3872
Merged
Conversation
Re-introduces the other_emails custom field (reverted in #3870) without the fatal change: instead of adding email-addresses to the /users/current include (which that endpoint rejects, breaking the auth bootstrap), load them via the dedicated GET /email-addresses endpoint the institution flow already uses. The load is fire-and-forget + caught in syncCurrentUser so a failure can never reject the current-user bootstrap again. Adds a regression test asserting auth still completes when /email-addresses 500s, plus a test that currentUser.emailAddresses populates for the widget. Co-authored-by: Cursor <cursoragent@cursor.com>
Bundle ReportChanges will decrease total bundle size by 1.33kB (-0.0%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: client-array-pushAssets Changed:
Files in
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
TropicolX
marked this pull request as draft
June 22, 2026 16:00
The Lobbyside other_emails feature loads /api/v1/email-addresses during syncCurrentUser, a boot-time background request. It is peer to /users/current and analytics-events, which the verifier already filters, so add it there rather than threading it through every per-action request sequence. Co-authored-by: Cursor <cursoragent@cursor.com>
Exercises the entry?.value ?? '' fallback for malformed/missing email entries so they are skipped, closing the last uncovered patch branch. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fd841fe. Configure here.
TropicolX
marked this pull request as ready for review
June 22, 2026 18:40
rohitpaulk
approved these changes
Jun 22, 2026
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
Re-introduces the
other_emailsLobbyside custom column (reverted in #3870), without the change that caused the incident.Root cause of the revert: #3869 added
email-addressesto theincludeonGET /users/current. That endpoint has no such serializer relationship (EmailAddressis anActiveModelwrapper, not an AR model), so the request errored and the awaited current-user/auth bootstrap failed site-wide.This PR instead:
GET /api/v1/email-addressesendpoint — the same call the institution flow already uses in prod..catch()insyncCurrentUser, off the awaited path, so a failure there can never break auth again. Worst case is an empty column.other_emailsderivation (excludes primary, dedupes, comma-joins) +setVisitorwiring +{{did-update}}dep.Verification (the part skipped last time)
/email-addressesto 500 and asserts the current user still loads.currentUser.emailAddressespopulates from the dedicated endpoint.Test plan
Made with Cursor