feat: add profile and contacts fetching from pubky#476
feat: add profile and contacts fetching from pubky#476ben-kaufman wants to merge 20 commits intomasterfrom
Conversation
ovitrif
left a comment
There was a problem hiding this comment.
LGTM with some nit comments.
all tests worked great, tested:
- open profile from topbar + drawer
- 2x auth successes
- button to download ring
- share pk button(s)
- signout button
This comment has been minimized.
This comment has been minimized.
ef5107e to
82bbf45
Compare
|
Some observations (on version before force-push, as the current is not building):
Screen.Recording.2026-03-16.at.12.37.15.mov
|
|
Same thing with staging as for Android: synonymdev/bitkit-android#824 (comment) ... and then same as synonymdev/bitkit-android#824 (comment) ✅ :) |
@pwltr This is indeed what we agreed on afterward-ish the sprint planning: unless someone sees an issue with it. We ship this without the announcements, as it's just adding some niceyiness to users who like to explore, without really enabling any small part of the bigger picture yet. So it's just aesthetics from user's pov FWIW, but app is nicer and more friendly than without it ( (ie: I can see my profile picture at the top of the app if I auth with my pubky). |
|
Everything should be fixed, e2e tests issue not related, it fails the same way on other PRs too cc @piotr-iohk |
Yes, there is some divergency, because v60 redesign is merged on iOS and not merged on Android yet. |
Currently the UX is very poor for users that are not on pubky.app yet (probably >90% of users). Since you can't create a profile from Bitkit and you can't signup to the Synonym homeserver from within Pubky Ring without an invite code (it says to ask the Synonym team?) you just get stuck in somewhere along the flow without any hand holding. That is after going to the app store and downloading an additional app which can be argued is also not explained clearly enough as to why it is necessary. Not sure what the solution will be but imo this is not a good experience and doesn't add anything for most users. Simulator.Screen.Recording.-.iPhone.17.-.2026-03-17.at.10.27.05.mov |
|
For additional guidance on scroll behavior, see this prototype demo recording: |
Thanks for the insights @pwltr, it looks to me that any of the possible solutions require extra work. Remaining options:
Out of the 3 above, the option of feature flags seems more straightforward and with the most predictable outcome. Wdyt? |
It's being discussed with Aldert in the Figma v60 design file, it seems to me we'll go with the iOS variant, showing only the relevant button. |
|
As far as UX, I think I mentioned this briefly on android PR (but concerns both ofc), but even for users who already have Ring installed and a profile set up, the flow drops you into Ring for authorization with no automatic return to Bitkit. After approving, you're left staring at a checkmark in Ring and have to manually switch back. Would be great if Ring redirected back to Bitkit after successful (or denied) authorization. According to Claude:
|
This is ongoing discussion, I totally agree with you and I have been rooting for Ring to use that widely used pattern that involves a callback url. I discussed this with the Pubky team but the feedback I got is that it's not a high priority; so I have let it be that way at that time. I think we have to reconsider this, so I will check with them for middle-ground options. |
FWIW I would say it is a high priority from product UX perspective |
I agree, but I think the current task on the Pubky roadmap includes the PWA updates, so we could start by splitting out what we need for Bitkit integration. |
|
Regarding callback support in Ring please see the draft PR here. I'll resume work on it shortly after I wrap up my current set of tasks. |
I think merge to avoid having to do conflict resolution over an extended period but revert to "Coming Soon" state before, ie. menu links navigate to "Coming soon" screens and remove the profile name from the header. Full on feature flag system seems overkill to me, but let me know your thoughts. |
One benefit of a feature flag over hard-coded hiding is that we can develop and run E2E tests for it (with the flag enabled in E2E builds). Otherwise we'd have to write those tests later when the feature goes live, with no automated coverage in the meantime. |
|
I was thinking of a barebones feature flag support approach: build flags that read from env vars. |

Summary
Integrates Pubky decentralized identity into Bitkit, allowing users to connect their Pubky profile via Pubky Ring authentication. Once connected, the user's profile name and avatar appear on the home screen header, a full profile page shows their bio, links, and shareable QR code, and a contacts section lists people they follow on the Pubky network.
What's included
pubkyauth://) with relay-based session exchange, session persistence in Keychain, and automatic restoration on app launchPubkyService— service layer wrappingpaykit-ffi(profile/contacts/payments) andbitkit-core(auth relay, PKDNS file fetching)PubkyProfileManager— manages auth state, session lifecycle, and profile data with all FFI/Keychain/disk operations offloaded to background threadsContactsManager— fetches contacts in parallel viawithTaskGroup, groups them alphabetically, and resets on sign-outPubkyImagecomponent for loadingpubky://URIs with two-tier (memory + disk) cachingNew dependencies
paykit-rs(SPM, pinned revision) — Pubky SDK for profile, contacts, and payment operationsCoreBluetoothframework (linker flag, required by paykit-rs)New files
Services/PubkyService.swiftManagers/PubkyProfileManager.swiftManagers/ContactsManager.swiftModels/PubkyProfile.swiftComponents/PubkyImage.swiftpubky://image loader with disk+memory cacheViews/Profile/ProfileView.swiftViews/Profile/PubkyRingAuthView.swiftViews/Contacts/ContactsIntroView.swiftViews/Contacts/ContactsListView.swiftViews/Contacts/ContactDetailView.swiftModified files
AppScene.swiftPubkyProfileManagerandContactsManager, initialize Paykit early, eager-load contacts on authMainNavView.swiftHeader.swiftSuggestions.swiftQR.swift.task(id:)Info.plistLSApplicationQueriesSchemesforpubkyauth, ATS configKeychain.swiftpaykitSessionentry typeNavigationViewModel.swift.pubkyRingAuth,.contactsIntro,.contactDetail(publicKey:)routesProfileIntro.swiftColors.swiftpubkyBrandcolorLocalizable.stringsTest plan
ScreenRecording_03-04-2026.23-49-21_1.MP4