Repository navigation
Let contacts have multiple email addresses - #8044
Merged
devin-ai-integration[bot] merged 7 commits intoOct 9, 2026
Merged
Conversation
Additional emails live in humans.metadata_json $.additionalEmails and participate in every human-by-email match (calendar sync, session participants, owner self checks, voiceprint remote detection, contact search). Merging keeps both contacts' emails; the desktop contact details view can add/edit/remove additional emails. Co-Authored-By: John <john@fastrepl.com>
…anged Co-Authored-By: John <john@fastrepl.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Contributor
Author
There was a problem hiding this comment.
👀 1 finding needs your review
Devin fixed 6 of 7 findings on e51f2b8. Click a finding below to jump to its comment.
For your review (1)
Fixed by Devin (6)
- Edited email survives immediate removal
- Failed email edits persist on retry
- Owner aliases fail with empty primary email
- Speaker picker misses additional addresses
- Primary email change leaves duplicate address
- Calendar alias lookup lacks SQL coverage
- Track pending additional-email edits so blur + remove writes don't clobber each other, and match rows by value. - Let owner self-alias checks match additional emails even when the owner's primary email is empty. - Match additional emails in speaker-assignment search and lookups. - Re-normalize additional emails when the primary email is updated. - Add db-app coverage for additional-email matching and inserts. Co-Authored-By: John <john@fastrepl.com>
- Rows track their last committed value so a blur-then-remove or a second edit before the live query refresh can't leave the stale entry behind. - A failed write clears the pending list so the next edit does not persist a rejected state. Co-Authored-By: John <john@fastrepl.com>
Comment on lines
+36
to
+37
| // The json_valid / json_type guards keep one malformed synced metadata | ||
| // row from breaking the whole query. |
Contributor
Author
Contributor
Author
There was a problem hiding this comment.
This finding is about an earlier revision. In 8ca9071 I removed the doc comments that only restated the SQL. The two comments that remain say why each guard exists: the json_valid/json_type guard stops one malformed synced metadata row from breaking the whole query, and the non-empty-primary helper stops an empty primary from blocking alias matching. I'm leaving them in.
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
Co-Authored-By: John <john@fastrepl.com>
ComputelessComputer
deleted the
devin/1791516419-contact-multiple-emails
branch
October 9, 2026 13:01
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
Intent: People use more than one email address (work and personal, old domain and new), and today each address ends up as a separate duplicate contact. Merging two contacts throws away the duplicate's email. With this change a contact keeps one primary email plus any number of additional ones, and every place that looks a person up by email checks all of them.
humans.emailstays the primary address and is still what gets displayed and copied. Additional addresses live inhumans.metadata_json.$.additionalEmails. This needs no schema change: E2EE 1.4.23 rejects new tables, and new synced columns need CloudSync alters. Older clients and mobile keep seeing the primary address.list_humans_by_emailsand the insert-if-missing guards), event participant creation (find_human_ids_by_email), owner self-detection in render/STT/capture queries, voiceprint remote-participant exclusion, speaker-assign contact matching, and contact search.merge_humansnow keeps the duplicate's primary and additional emails as additional emails on the kept contact. If the kept contact has no email, it takes the duplicate's primary.Linear: ANLG-464
Demo
Not recorded yet. The UI hasn't been exercised in a running app; only the automated checks below ran, all on a Linux VM.
Verification
cargo test --locked -p db-app -p tauri-plugin-calendar -p tauri-plugin-session -p voiceprint, all passing. New tests cover: an attendee matching an additional email, update normalization, and merge keeping both contacts' emails.cargo clippy --locked --all-targets --no-deps -D warningsis clean for db-app, calendar, and session.voiceprintalready fails clippy on main atmatching.rs:60.pnpm -F @anlg/desktop typecheck, vitest for contacts plus the touched query tests,oxlint,dprint.Link to Devin session: https://app.devin.ai/sessions/8909b7359dcd4db0820e11b7751cb257
Open in Devin Desktop: https://app.devin.ai/desktop/session/8909b7359dcd4db0820e11b7751cb257?variant=devin
Requested by: @ComputelessComputer
Summary by cubic
Lets contacts keep multiple email addresses instead of splitting each address into a duplicate contact and dropping emails during merge.
humans.email; extra addresses live inhumans.metadata_json.$.additionalEmailswith no schema change.Written for commit e51f2b8. Summary will update on new commits.