Skip to content

Redesign select-contact popup with avatars and search#46

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

Redesign select-contact popup with avatars and search#46
Jim8y wants to merge 20 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:

@Jim8y

Jim8y commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Propagated the address-book cleanup from #37 into this dependent contact-picker PR.

IsAddressBookEntry and the recent-recipient pseudo-contact resources have been removed so the picker works with saved address-book entries only. This keeps the PR aligned with the reviewer direction and avoids reintroducing local recent-recipient or transaction-history behavior.

Validation:

  • rg -n "IsAddressBookEntry|AddressBookHistory|RecentRecipient|UseEnteredAddress" OneGateApp has no matches.
  • git diff --check passed.
  • .resx files passed xmllint --noout.
  • iOS simulator build/install/launch passed on OneGate-PR51-iPhone17.
  • Android emulator dotnet build -t:Run passed on emulator-5554 and OneGate stayed in foreground.
  • Only existing SQLitePCLRaw NU1903 warnings were present.

Screenshots:

iOS

Android

@erikzhang

Copy link
Copy Markdown
Contributor

Conflicts

…tact-popup

# Conflicts:
#	OneGateApp/Data/Contact.cs
#	OneGateApp/Properties/Strings.Designer.cs
#	OneGateApp/Properties/Strings.de.resx
#	OneGateApp/Properties/Strings.es.resx
#	OneGateApp/Properties/Strings.fr.resx
#	OneGateApp/Properties/Strings.id.resx
#	OneGateApp/Properties/Strings.it.resx
#	OneGateApp/Properties/Strings.ja.resx
#	OneGateApp/Properties/Strings.ko.resx
#	OneGateApp/Properties/Strings.nl.resx
#	OneGateApp/Properties/Strings.pt-BR.resx
#	OneGateApp/Properties/Strings.ru.resx
#	OneGateApp/Properties/Strings.tr.resx
#	OneGateApp/Properties/Strings.vi.resx
#	OneGateApp/Properties/Strings.zh-Hant.resx
#	OneGateApp/Services/AddressBookService.cs
@Jim8y

Jim8y commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Resolved the conflict reported by Erik.

What changed in this follow-up:

  • Merged latest origin/master into this branch.
  • Resolved conflicts in Contact, AddressBookService, Strings.Designer.cs, and localized .resx files.
  • Kept this PR's select-contact popup display behavior, including contact avatar/detail fields.
  • Preserved master's newer dApp/camera/transfer strings and runtime changes.
  • Confirmed there is no remaining IsAddressBookEntry marker in OneGateApp.

Validation on branch head ac3ccb1:

  • No conflict markers remain.
  • Localized .resx key parity passed: 308 keys across 15 files.
  • git diff --check passed.
  • Android build passed: dotnet build OneGateApp/OneGateApp.csproj -f net10.0-android -r android-arm64 ....
  • iOS simulator build passed: dotnet restore ... -p:TargetFramework=net10.0-ios -r iossimulator-arm64 + dotnet build ... -f net10.0-ios -r iossimulator-arm64 --no-restore ....

Notes: builds still report existing SQLitePCLRaw NU1903 warnings and existing iOS duplicate asset warnings, with no errors.

Comment thread OneGateApp/Properties/Strings.zh-Hans.resx Outdated
Jim8y added 3 commits July 5, 2026 16:12
# Conflicts:
#	OneGateApp/Properties/Strings.Designer.cs
#	OneGateApp/Properties/Strings.de.resx
#	OneGateApp/Properties/Strings.es.resx
#	OneGateApp/Properties/Strings.fr.resx
#	OneGateApp/Properties/Strings.id.resx
#	OneGateApp/Properties/Strings.it.resx
#	OneGateApp/Properties/Strings.ja.resx
#	OneGateApp/Properties/Strings.ko.resx
#	OneGateApp/Properties/Strings.nl.resx
#	OneGateApp/Properties/Strings.pt-BR.resx
#	OneGateApp/Properties/Strings.resx
#	OneGateApp/Properties/Strings.ru.resx
#	OneGateApp/Properties/Strings.tr.resx
#	OneGateApp/Properties/Strings.vi.resx
#	OneGateApp/Properties/Strings.zh-Hans.resx
#	OneGateApp/Properties/Strings.zh-Hant.resx
@Jim8y

Jim8y commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed Erik's resource review feedback.

Changes pushed:

  • Reverted the unrelated CreateBiometricCredentialText localization changes.
  • Kept only the select-contact popup strings and code that belong to this PR.
  • Re-merged latest master and fixed the resource designer merge result.

Validation:

  • iOS simulator build passed: dotnet build -f net10.0-ios -r iossimulator-arm64 -p:EnableCodeSigning=false
  • Android build passed: dotnet build -f net10.0-android -r android-arm64 -p:EmbedAssembliesIntoApk=true

Notes:

  • Build warnings are existing SQLitePCLRaw NU1903 advisories.
  • The local keychain has no valid Apple signing identities, so iOS validation used simulator build with code signing disabled.

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.

3 participants