Redesign select-contact popup with avatars and search#46
Conversation
RecordTransferAsync loaded the contact via a NoTracking query (global QueryTrackingBehavior.NoTracking), so mutating LastUsedAt/TransferCount/ LastTransactionHash on the detached entity was silently dropped by SaveChangesAsync. Attach the entity as Modified so the update persists.
…core # Conflicts: # OneGateApp/Properties/Strings.resx # OneGateApp/Properties/Strings.zh-Hans.resx # OneGateApp/Properties/Strings.zh-Hant.resx
…ex/p3-select-contact-popup
|
Maintenance update after review audit:
Validation:
Screenshots: |
There was a problem hiding this comment.
Pull request overview
This PR introduces a redesigned “select contact” popup UI (avatar + card layout) and backs its search with the new address-book suggestion logic, leveraging the extended Contact model fields/helpers introduced in the address-book foundation work.
Changes:
- Added
AddressBookServiceto normalize/resolve addresses and provide address-book entry lists + ranked suggestions for search. - Updated
SelectContactPopupUI to a card template with avatar text, badge, detail line, and improved search placeholder. - Extended
Contactwith note/address-book metadata and display helper properties; added a lightweight schema migration hook on app startup; updated localization resources for new strings.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| OneGateApp/Services/AddressBookService.cs | Adds address normalization, label resolution, and contact suggestion APIs used by the popup search. |
| OneGateApp/Controls/Popups/SelectContactPopup.xaml | Redesigns the popup list item template to show avatar/name/badge/detail/address cards and updates search placeholder. |
| OneGateApp/Controls/Popups/SelectContactPopup.xaml.cs | Switches popup data-loading and search to use AddressBookService instead of directly querying EF. |
| OneGateApp/Data/Contact.cs | Adds Note, IsAddressBookEntry, and display helper properties (DisplayName/AvatarText/ShortAddress/BadgeText/DetailText). |
| OneGateApp/Data/ApplicationDbContext.cs | Adds a manual/idempotent migration step to add Note and IsAddressBookEntry columns. |
| OneGateApp/App.xaml.cs | Runs the new migration hook at startup after ensuring the DB is created. |
| OneGateApp/MauiProgram.cs | Registers AddressBookService in DI. |
| OneGateApp/Properties/Strings.resx | Adds new address-book/search related strings and adjusts some existing English copy. |
| OneGateApp/Properties/Strings.Designer.cs | Updates the generated strongly-typed resource accessors for new strings. |
| OneGateApp/Properties/Strings.de.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.es.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.fr.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.id.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.it.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.ja.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.ko.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.nl.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.pt-BR.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.ru.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.tr.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.vi.resx | Adds localized strings for address-book/search additions. |
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds localized strings for address-book/search additions and adjusts Simplified Chinese copy. |
| OneGateApp/Properties/Strings.zh-Hant.resx | Adds localized strings for address-book/search additions and adjusts Traditional Chinese entries. |
Files not reviewed (1)
- OneGateApp/Properties/Strings.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tact-popup # Conflicts: # OneGateApp/Properties/Strings.Designer.cs
|
Conflict refresh after latest
|
…tact-popup # Conflicts: # OneGateApp/Properties/Strings.Designer.cs
|
Base refresh validation update:
Screenshots are stored as GitHub release assets only, not committed to the repo: |
…tact-popup # Conflicts: # OneGateApp/Properties/Strings.Designer.cs
|
Base refresh validation update:
Screenshots are stored as GitHub release assets only, not committed to the repo: |


Carved from the closed address-book PR into a small select-contact popup slice.
Scope
SelectContactPopuplist with an avatar + name/badge/detail card template.AddressBookService.GetSuggestionsAsync.SearchAddressBook,DisplayName,BadgeText,DetailText, andAvatarTextfrom the Add address book data service #37 address-book data model.Out of scope
Dependency / review order
This PR depends on #37. It is marked draft until #37 is merged and this branch is rebased, so reviewers do not need to re-review the duplicated address-book core diff here.