Improve contacts management#45
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-contacts-management-and-history
…anagement-and-history
Per review (no local transaction records), remove the ContactTransactionPage, the EditContactPage associated-transactions list and its route, and the delete-keeps-recent branch; sync the address-book data layer that no longer stores transfers.
|
Address book search bar visual issue checked and fixed in commit What changed:
Validation:
Screenshots:
已验证并修复地址簿搜索栏黑色方块问题,提交为 本次把 |
|
Maintenance update after review audit:
Validation:
Screenshots: |
There was a problem hiding this comment.
Pull request overview
This PR refines the app’s contacts/address-book experience by adding an address-book service layer, extending the Contact data model (note + address-book metadata), and updating the Contacts/New/Edit pages to support search, avatars, and duplicate-label validation.
Changes:
- Added
AddressBookServicefor address normalization, address/label resolution, and suggestions. - Updated Contacts/New/Edit contact UI to support in-page search, monogram avatars, note editing, and duplicate-label validation.
- Added lightweight SQLite schema migration-on-startup for new
Contactfields and expanded localized strings.
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| OneGateApp/Services/AddressBookService.cs | New service for address normalization, label resolution/availability, and suggestions. |
| OneGateApp/Properties/Strings.resx | Adds new contact-related strings; updates biometric prompt text. |
| OneGateApp/Properties/Strings.Designer.cs | Regenerates/updates strongly-typed resource accessors for new strings. |
| OneGateApp/Properties/Strings.de.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.es.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.fr.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.id.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.it.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.ja.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.ko.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.nl.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.pt-BR.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.ru.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.tr.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.vi.resx | Adds localized strings for new contact-related labels. |
| OneGateApp/Properties/Strings.zh-Hans.resx | Adds localized strings for new contact-related labels; updates biometric prompt text. |
| OneGateApp/Properties/Strings.zh-Hant.resx | Adds localized strings for new contact-related labels and ensures Transfer key present. |
| OneGateApp/Pages/ContactsPage.xaml | Redesigns contacts list into a card layout with search bar and avatars. |
| OneGateApp/Pages/ContactsPage.xaml.cs | Loads address-book entries via service and filters in-memory based on search input. |
| OneGateApp/Pages/NewContactPage.xaml | Adds note editor and duplicate-label validation rule to New Contact UI. |
| OneGateApp/Pages/NewContactPage.xaml.cs | Normalizes address, validates duplicate label, and persists note + address-book flag. |
| OneGateApp/Pages/EditContactPage.xaml | Adds note editor + duplicate-label validation and wraps content in a scroll view. |
| OneGateApp/Pages/EditContactPage.xaml.cs | Adds duplicate-label validation, note persistence, and query param fallback loading by address. |
| OneGateApp/Data/Contact.cs | Extends contact entity with Note, IsAddressBookEntry, and display helper properties. |
| OneGateApp/Data/ApplicationDbContext.cs | Adds idempotent schema migration helper to add new contact columns if missing. |
| OneGateApp/App.xaml.cs | Runs EnsureMigrations() during app startup after DB creation. |
| OneGateApp/MauiProgram.cs | Registers AddressBookService in DI. |
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.
…anagement-and-history # Conflicts: # OneGateApp/Properties/Strings.Designer.cs
|
Conflict refresh after latest
|
…anagement-and-history # Conflicts: # OneGateApp/Properties/Strings.Designer.cs
|
Base refresh validation update:
Screenshots are stored as GitHub release assets only, not committed to the repo: |
…anagement-and-history # 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 smaller contacts-management slice.
Scope
ContactsPageinto a card-style list with in-page search and monogram avatars.AddressBookService.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.