Skip to content

Push non-primary emails to Lobbyside (other_emails column)#3869

Merged
TropicolX merged 2 commits into
mainfrom
tropicolx/lobbyside-other-emails
Jun 18, 2026
Merged

Push non-primary emails to Lobbyside (other_emails column)#3869
TropicolX merged 2 commits into
mainfrom
tropicolx/lobbyside-other-emails

Conversation

@TropicolX

Copy link
Copy Markdown
Contributor

Summary

  • The LobbysideWidget now derives an other_emails custom field from the current user's emailAddresses, excluding primaryEmailAddress (already shown under the visitor's name in Lobbyside).
  • The value is a deduped, blank-trimmed, comma-separated string. Lobbyside auto-renders any non-reserved setVisitor key as a column, so this surfaces as a new OTHER_EMAILS column in the live-visitors table with no Lobbyside-side change.
  • Wired into the setVisitor payload, the Window.Lobbyside.setVisitor type, and the {{did-update}} dependency list (so it re-syncs when the email relationship hydrates in a later pass — same two-pass-hydration rationale as the existing tracked fields).

Test plan

  • ember test --filter "lobbyside-widget" — 13/13 pass, incl. 4 new other_emails cases (join, exclude-primary, dedupe/blank-drop, empty-when-none).
  • eslint, ember-template-lint, glint all clean.

Made with Cursor

Surfaces a CC user's secondary email addresses (everything except the
primary, which already shows under their name) as a new custom column
in the Lobbyside live-visitors table.

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 589c858. Configure here.

Comment thread app/components/lobbyside-widget/index.ts
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

Test Results

  1 files  ±0    1 suites  ±0   6m 25s ⏱️ - 2m 56s
720 tests +4  657 ✅ +4  63 💤 ±0  0 ❌ ±0 
735 runs  +4  672 ✅ +4  63 💤 ±0  0 ❌ ±0 

Results for commit 39a0096. ± Comparison against base commit a5ab2f5.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/components/lobbyside-widget/index.ts 85.71% 0 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (85.71%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

📢 Thoughts on this report? Let us know!

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 264 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
client-array-push 39.17MB 264 bytes (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 264 bytes 3.44MB 0.01%

Files in assets/chunk.*.js:

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

The other_emails field reads currentUser.emailAddresses, an async:false
relationship that stays empty unless sideloaded. Include it in the auth
sync alongside course-participations so the Lobbyside column populates.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI 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.

Pull request overview

Adds an other_emails custom field to the Lobbyside visitor payload so non-primary user email addresses appear as an OTHER_EMAILS column in Lobbyside’s live-visitors table (without requiring Lobbyside-side changes).

Changes:

  • Derive other_emails from currentUser.emailAddresses, excluding primaryEmailAddress, trimming blanks, deduping, and joining via , .
  • Include email-addresses in authenticator.syncCurrentUser() so the relationship is hydrated for the widget.
  • Wire the new field into the setVisitor type and {{did-update}} deps; add unit test coverage for key edge cases.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/unit/components/lobbyside-widget-test.ts Adds unit tests covering other_emails join/exclude/dedupe/empty behaviors.
app/services/authenticator.ts Ensures email-addresses are included when syncing the current user.
app/components/lobbyside-widget/index.ts Implements otherEmails() derivation and includes other_emails in the Lobbyside payload/type.
app/components/lobbyside-widget/index.hbs Adds other_emails to {{did-update}} dependencies to re-sync on hydration/changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TropicolX
TropicolX merged commit a45c940 into main Jun 18, 2026
9 of 10 checks passed
@TropicolX
TropicolX deleted the tropicolx/lobbyside-other-emails branch June 18, 2026 13:57
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.

3 participants