Skip to content

Push non-primary emails to Lobbyside (other_emails column) — take 2#3872

Merged
TropicolX merged 3 commits into
mainfrom
tropicolx/lobbyside-other-emails-v2
Jun 23, 2026
Merged

Push non-primary emails to Lobbyside (other_emails column) — take 2#3872
TropicolX merged 3 commits into
mainfrom
tropicolx/lobbyside-other-emails-v2

Conversation

@TropicolX

@TropicolX TropicolX commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-introduces the other_emails Lobbyside custom column (reverted in #3870), without the change that caused the incident.

Root cause of the revert: #3869 added email-addresses to the include on GET /users/current. That endpoint has no such serializer relationship (EmailAddress is an ActiveModel wrapper, not an AR model), so the request errored and the awaited current-user/auth bootstrap failed site-wide.

This PR instead:

  • Loads email addresses via the dedicated GET /api/v1/email-addresses endpoint — the same call the institution flow already uses in prod.
  • Runs it fire-and-forget + .catch() in syncCurrentUser, off the awaited path, so a failure there can never break auth again. Worst case is an empty column.
  • Re-adds the pure other_emails derivation (excludes primary, dedupes, comma-joins) + setVisitor wiring + {{did-update}} dep.

Verification (the part skipped last time)

  • Regression test: forces /email-addresses to 500 and asserts the current user still loads.
  • Test that currentUser.emailAddresses populates from the dedicated endpoint.
  • 4 unit tests for the derivation.
  • Live-checked the deployed endpoint on prod with a real session — returns the account's full email list for a normal user, no institution gating.
  • Lint + template-lint + Glint + all 15 tests green.

Test plan

  • filtered ember tests green
  • Confirm OTHER_EMAILS column populates on the Vercel preview before merge

Made with Cursor

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>
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 1.33kB (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
client-array-push 39.16MB -1.33kB (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/chunk.*.js -82 bytes 41.53kB -0.2%
assets/chunk.*.js -1.24kB 3.43MB -0.04%

Files in assets/chunk.*.js:

  • ./services/authenticator.ts → Total Size: 7.08kB

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Test Results

  1 files  ±0    1 suites  ±0   6m 15s ⏱️ - 3m 42s
722 tests +6  659 ✅ +6  63 💤 ±0  0 ❌ ±0 
737 runs  +6  674 ✅ +6  63 💤 ±0  0 ❌ ±0 

Results for commit fd841fe. ± Comparison against base commit 0f74fce.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@TropicolX
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>
@TropicolX

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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
TropicolX marked this pull request as ready for review June 22, 2026 18:40
@TropicolX
TropicolX requested a review from rohitpaulk June 22, 2026 18:40
@TropicolX
TropicolX merged commit 484bdd6 into main Jun 23, 2026
9 checks passed
@TropicolX
TropicolX deleted the tropicolx/lobbyside-other-emails-v2 branch June 23, 2026 03:59
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