Skip to content

Improve contacts management#45

Open
Jim8y wants to merge 16 commits into
neoorder:masterfrom
Jim8y:codex/p3-contacts-management-and-history
Open

Improve contacts management#45
Jim8y wants to merge 16 commits into
neoorder:masterfrom
Jim8y:codex/p3-contacts-management-and-history

Conversation

@Jim8y

@Jim8y Jim8y commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Carved from the closed address-book PR into a smaller contacts-management slice.

Scope

  • Reworks ContactsPage into a card-style list with in-page search and monogram avatars.
  • Adds note editing to New/Edit contact pages.
  • Adds duplicate-label validation on New/Edit contact pages.
  • Keeps contact add/edit/delete behavior focused on saved address-book entries.
  • Reuses the Add address book data service #37 address-book data model and AddressBookService.

Out of scope

  • No local transaction record storage.
  • No transfer-history table.
  • No associated transaction list or transaction-detail page.
  • No send/send-NFT integration.

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 10 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
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.
@Jim8y

Jim8y commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Address book search bar visual issue checked and fixed in commit aa0b734.

What changed:

  • Replaced the native SearchBar on ContactsPage with the app-styled Border + Entry field.
  • Removed the iOS-specific SearchBarStyle usage that could render the black outer block seen in the screenshot.

Validation:

  • Android build passed with 0 errors.
  • iOS simulator build passed with 0 errors.
  • Android emulator: opened Address Book and confirmed the search field renders as a light rounded input, with no black square/background. Crash buffer was empty.
  • iOS simulator: opened Address Book and confirmed the same search field state, with no black square/background.

Screenshots:


已验证并修复地址簿搜索栏黑色方块问题,提交为 aa0b734

本次把 ContactsPage 的原生 SearchBar 换成项目样式的 Border + Entry 输入框,避免 iOS 原生搜索栏外层背景异常。Android 和 iOS 模拟器都已打开地址簿页面验证,截图见上方。

@Jim8y Jim8y changed the title Add contacts management and transfer history Improve contacts management Jun 20, 2026
@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 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 AddressBookService for 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 Contact fields 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.

Comment thread OneGateApp/Services/AddressBookService.cs
Comment thread OneGateApp/Services/AddressBookService.cs Outdated
Comment thread OneGateApp/Services/AddressBookService.cs Outdated
Comment thread OneGateApp/Pages/EditContactPage.xaml.cs Outdated
Comment thread OneGateApp/Properties/Strings.Designer.cs
Comment thread OneGateApp/Properties/Strings.resx 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-contacts-management-and-history and resolved the generated Strings.Designer.cs resource conflict by keeping the new base UnderstandAndContinue resource accessor together with the contacts 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 45

iOS screenshot:
iOS PR 45

…anagement-and-history

# 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-contacts-management-and-history; pushed merge commit 8d5ac8c.
  • 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:

…anagement-and-history

# 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-contacts-management-and-history; pushed merge commit a85418d.
  • 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