Skip to content

Redesign select-contact popup with avatars and search#46

Open
Jim8y wants to merge 14 commits into
neoorder:masterfrom
Jim8y:codex/p3-select-contact-popup
Open

Redesign select-contact popup with avatars and search#46
Jim8y wants to merge 14 commits into
neoorder:masterfrom
Jim8y:codex/p3-select-contact-popup

Conversation

@Jim8y

@Jim8y Jim8y commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Carved from the closed address-book PR into a small select-contact popup slice.

Scope

  • Replaces the plain SelectContactPopup list with an avatar + name/badge/detail card template.
  • Backs popup search with AddressBookService.GetSuggestionsAsync.
  • Uses SearchAddressBook, DisplayName, BadgeText, DetailText, and AvatarText from the Add address book data service #37 address-book data model.

Out of scope

  • No contacts management page changes.
  • No send/send-NFT recipient resolution changes.
  • No local transaction history.

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.

Jim8y and others added 8 commits June 20, 2026 15:33
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
@Jim8y Jim8y marked this pull request as draft June 20, 2026 22:49
@Jim8y

Jim8y commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Maintenance update after review audit:

  • Merged current master into this existing draft PR branch and resolved the remaining resource designer conflict.
  • Preserved Erik’s direction: no local transaction-record/statistics storage was reintroduced.
  • Fixed resource parity across all current .resx files, including the address-book keys and the existing Transfer key used by IntentsView.
  • Verified no conflict markers and no diff whitespace issues.

Validation:

  • Android complete Debug APK build passed with AndroidSdkDirectory=/opt/homebrew/share/android-commandlinetools and EmbedAssembliesIntoApk=true.
  • Android simulator install/launch passed on emulator-5554. Foreground activity confirmed as org.neoorder.onegate/crc64e93af8ff8666345c.MainActivity; crash log empty.
  • iOS simulator build passed for net10.0-ios / iossimulator-arm64 using Xcode 26.5 and ad-hoc simulator signing override.
  • iOS simulator install/launch passed on OneGate-PR51-iPhone17 (64569B2C-8629-45DA-B52F-EC2B5DFA1C21).
  • Resource parity check passed: 15 resource files match 288 keys.

Screenshots:

@Jim8y Jim8y marked this pull request as ready for review June 22, 2026 00:28
Copilot AI review requested due to automatic review settings June 22, 2026 00:28

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

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 AddressBookService to normalize/resolve addresses and provide address-book entry lists + ranked suggestions for search.
  • Updated SelectContactPopup UI to a card template with avatar text, badge, detail line, and improved search placeholder.
  • Extended Contact with 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.

Comment thread OneGateApp/Services/AddressBookService.cs
Comment thread OneGateApp/Services/AddressBookService.cs Outdated
Comment thread OneGateApp/Services/AddressBookService.cs Outdated
Comment thread OneGateApp/Controls/Popups/SelectContactPopup.xaml.cs
Comment thread OneGateApp/Data/Contact.cs Outdated
@Jim8y

Jim8y commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Conflict refresh after latest master update.

  • Merged origin/master into codex/p3-select-contact-popup and resolved the generated Strings.Designer.cs resource conflict by keeping the new base UnderstandAndContinue resource accessor together with the select-contact popup resources.
  • GitHub mergeability is back to MERGEABLE; unresolved review threads remain 0.
  • Android validation passed: dotnet build -f net10.0-android -c Debug -p:EmbedAssembliesIntoApk=true, then installed on emulator-5554, launched org.neoorder.onegate/crc64e93af8ff8666345c.MainActivity, confirmed process stayed running, and captured screenshot.
  • iOS validation passed: dotnet build -f net10.0-ios -c Debug -p:RuntimeIdentifier=iossimulator-arm64 with ad-hoc simulator signing, then installed/launched on iPhone 17 Pro iOS 26.5 simulator and captured screenshot.
  • Existing warning only: SQLitePCLRaw NU1903 package advisory.

Android screenshot:
Android PR 46

iOS screenshot:
iOS PR 46

…tact-popup

# Conflicts:
#	OneGateApp/Properties/Strings.Designer.cs
@Jim8y

Jim8y commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Base refresh validation update:

  • Merged latest origin/master (c3514d4) into codex/p3-select-contact-popup; pushed merge commit f706db0.
  • Conflict resolution was limited to generated OneGateApp/Properties/Strings.Designer.cs: kept the base Developer Tools / DApp debug panel resources and removed the stale generated DeveloperModeEnabled accessor. No feature logic changed.
  • GitHub reports this PR as mergeable; unresolved review threads: 0.
  • Android emulator validation (emulator-5554): dotnet build OneGateApp/OneGateApp.csproj -f net10.0-android -c Debug -p:EmbedAssembliesIntoApk=true, installed the signed APK, launched org.neoorder.onegate/crc64e93af8ff8666345c.MainActivity, and captured a screenshot.
  • iOS simulator validation (iPhone 17 Pro, iOS 26.5): dotnet build OneGateApp/OneGateApp.csproj -f net10.0-ios -c Debug -p:RuntimeIdentifier=iossimulator-arm64, installed and launched the app, and captured a screenshot.
  • Existing warning observed: SQLitePCLRaw.lib.e_sqlite3 NU1903, unchanged/pre-existing.

Screenshots are stored as GitHub release assets only, not committed to the repo:

…tact-popup

# Conflicts:
#	OneGateApp/Properties/Strings.Designer.cs
@Jim8y

Jim8y commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Base refresh validation update:

  • Merged latest origin/master (3b20d5f) into codex/p3-select-contact-popup; pushed merge commit fcb6458.
  • Conflict resolution was limited to generated OneGateApp/Properties/Strings.Designer.cs: kept the base DApp submission localization accessors and preserved this PR branch. No feature logic changed.
  • GitHub reports this PR as mergeable; unresolved review threads: 0.
  • Android emulator validation (emulator-5554): dotnet build OneGateApp/OneGateApp.csproj -f net10.0-android -c Debug -p:EmbedAssembliesIntoApk=true, installed the signed APK, launched org.neoorder.onegate/crc64e93af8ff8666345c.MainActivity, confirmed a running pid, and captured a screenshot.
  • iOS simulator validation (iPhone 17 Pro, iOS 26.5): dotnet build OneGateApp/OneGateApp.csproj -f net10.0-ios -c Debug -p:RuntimeIdentifier=iossimulator-arm64, installed and launched the app, and captured a screenshot.
  • Existing warning observed: SQLitePCLRaw.lib.e_sqlite3 NU1903, unchanged/pre-existing.

Screenshots are stored as GitHub release assets only, not committed to the repo:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants