Skip to content

fix: align pubky and paykit ui#1097

Open
ben-kaufman wants to merge 2 commits into
codex/paykit-watch-only-accountsfrom
codex/970-pubky-paykit-ui-parity
Open

fix: align pubky and paykit ui#1097
ben-kaufman wants to merge 2 commits into
codex/paykit-watch-only-accountsfrom
codex/970-pubky-paykit-ui-parity

Conversation

@ben-kaufman

@ben-kaufman ben-kaufman commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Fixes #970

Depends on #1084.

This PR:

  1. Aligns Pubky profile onboarding, profile display/editing, and contact screens with the v61 Figma designs.
  2. Updates contact import, add, scan, detail, tag, and delete flows with the revised layouts, copy, spacing, accessibility, and navigation.
  3. Simplifies Paykit contact payments to one shared setting and removes the obsolete payment-preference screen.

Description

The Android Pubky and Paykit flows still mixed older layouts and settings with the v61 designs. Profile and contact screens used outdated spacing, labels, dividers, key formatting, and sheet sizing, while contact payments were split across onboarding and a separate per-method preference screen.

This update brings those flows together around the latest design. Profile and contact editing share the revised form treatment, contact import and add flows follow the new hierarchy, Pubky scanning uses its dedicated presentation, and newly added contacts can be reviewed or deleted from the detail screen. Profile and contact tags can be added and removed directly from their detail screens with stable, accessible controls.

General settings now exposes one payments-with-contacts switch backed by the receiver-aware behavior from #1084. Lightning and on-chain receiving remain enabled for the simplified Paykit experience. Paykit lifecycle/concurrency, sign-out and wallet-wipe safety, and unrelated endpoint-cleanup hardening are intentionally outside this PR.

Preview

QA Notes

Manual Tests

  • 1. Profile onboarding → Create Profile: copy, title treatment, avatar, and form spacing match the v61 Figma frames.
  • 2. Profile → Edit Profile: BIO label, public-data notice, links, delete action, and bottom actions match the design.
  • 3a. Profile → add and remove tags: changes persist and the tag controls expose clear accessibility labels.
    • 3b. Contact Detail → add and remove tags: changes persist after reopening the contact.
  • 4. Contacts → contact list: rows use the revised divider and spacing treatment without alphabet headers.
  • 5a. Contacts → Add Contact → Scan QR: Pubky scanner uses the revised status and paste presentation.
    • 5b. valid Pubky → save contact: Contact Detail opens with the delete action and confirmation flow.
  • 6. Profile import → overview → select contacts: trimmed Pubky key, selection rows, counts, and import actions match the design.
  • 7. Profile onboarding → Pay Contacts → Continue: contact payments enable without the removed opt-in toggle.
  • 8. Settings → General → Payments → Enable payments with contacts: the full row toggles once, exposes switch semantics, and cannot be double-triggered rapidly.
  • 9. Settings → General: Payment Preference is no longer shown or navigable.

Automated Checks

  • Unit tests added or expanded: contact-payment enable/disable behavior in ContactPaymentSettingsRepoTest.kt; profile and contact tag persistence in ProfileViewModelTest.kt and ContactDetailViewModelTest.kt; hidden Paykit method migration in SettingsSerializerTest.kt; and Pubky key formatting in PubkyPublicKeyFormatTest.kt.
  • Instrumented Compose tests added: tag accessibility and click handling in TagButtonTest.kt, plus full-row switch semantics and debouncing in SettingsSwitchRowTest.kt.
  • Unit tests modified: saved-contact navigation, Pay Contacts continuation, and General settings delegation in AddContactViewModelTest.kt, PayContactsViewModelTest.kt, and SettingsViewModelTest.kt.
  • Local: compileDevDebugKotlin, testDevDebugUnitTest, compileDevDebugAndroidTestKotlin, and detekt --rerun-tasks pass against the original rc37 artifact used by feat: add Paykit server accounts #1084. The currently published rc37 artifact resolves to a different breaking API; correcting that base dependency is outside this PR.

@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR aligns the Pubky and Paykit contact experience with the latest designs. The main changes are:

  • Refreshed profile, contact, import, scanner, and editing layouts.
  • Added contact review and deletion after saving.
  • Replaced payment preferences with one shared contact-payment switch.
  • Migrated hidden Paykit methods to the simplified defaults.

Confidence Score: 4/5

The private payment enable path and post-save back-stack cleanup need fixes before merging.

  • Private publication can fail while the repository reports success and persists sharing as enabled.
  • A normalized saved key can miss the raw AddContact route, leaving the completed add flow on the back stack.
  • The remaining UI, deletion, scanner, and settings delegation changes are consistent with the updated flow.

ContactPaymentSettingsRepo.kt and ContentView.kt

Important Files Changed

Filename Overview
app/src/main/java/to/bitkit/repositories/ContactPaymentSettingsRepo.kt Adds shared contact-payment enable, disable, cleanup, and rollback behavior; the enable path ignores private publication failure.
app/src/main/java/to/bitkit/ui/ContentView.kt Updates contact and scanner navigation; post-save cleanup can miss an AddContact entry whose raw key differs from the normalized key.
app/src/main/java/to/bitkit/viewmodels/SettingsViewModel.kt Exposes the shared contact-payment state and delegates switch updates to the new repository.
app/src/main/java/to/bitkit/ui/screens/contacts/ContactDetailViewModel.kt Adds contact deletion state, error handling, and a successful-deletion effect.
app/src/main/java/to/bitkit/data/serializers/SettingsSerializer.kt Applies the simplified Paykit payment-method defaults while loading persisted settings.

Reviews (1): Last reviewed commit: "chore: rename changelog fragment" | Re-trigger Greptile

Comment thread app/src/main/java/to/bitkit/repositories/ContactPaymentSettingsRepo.kt Outdated
Comment thread app/src/main/java/to/bitkit/ui/ContentView.kt
@ben-kaufman ben-kaufman mentioned this pull request Jul 20, 2026
28 tasks
@ben-kaufman
ben-kaufman changed the base branch from master to codex/paykit-watch-only-accounts July 20, 2026 15:42
@ben-kaufman
ben-kaufman force-pushed the codex/970-pubky-paykit-ui-parity branch from f65148d to 2b14ed7 Compare July 20, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design Update v61

1 participant