Skip to content

Commit 71f063f

Browse files
ben-kaufmanclaude
andcommitted
Add Pubky profile, contacts, and Ring auth import flow
- Profile creation with restore flow (detects existing remote profile) - Ring auth flow with contact import overview and selection screens - Pay Contacts onboarding step after profile creation and Ring import - Session restoration with re-sign-in recovery, preserving session on failure - Toast notification when session restoration fails - Lightbulb icon and tag suggestion button placement fixes - Edit profile error message fix - PubkyProfileData backward-compatible decoding (tags field defaults to []) - New tests for PubkyProfileData encoding/decoding Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 578f848 commit 71f063f

File tree

52 files changed

+4369
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4369
-295
lines changed

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ This project follows **modern SwiftUI patterns** and explicitly **AVOIDS traditi
116116
- Async operations should delegate to `@Observable` business logic objects
117117

118118
4. **Component Design**
119+
- **Always reuse existing components** before creating new ones — check `Components/` for buttons, text styles, layouts, and other shared UI. If identical or near-identical UI exists elsewhere in the codebase, extract it into a shared component rather than duplicating it.
120+
- Use the project's text components (`DisplayText`, `HeadlineText`, `TitleText`, `SubtitleText`, `BodyMText`, `BodyMSBText`, `BodySSBText`, `BodySText`, `CaptionMText`, `CaptionText`) instead of raw `Text().font().foregroundColor()` chains.
119121
- Decompose views into small, focused, single-purpose components
120122
- Use descriptive names (e.g., `UserProfileCard` not `Card`)
121123
- Prefer composition over deep view hierarchies

Bitkit.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@
687687
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
688688
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
689689
CODE_SIGN_ENTITLEMENTS = Bitkit/Bitkit.entitlements;
690+
CODE_SIGN_IDENTITY = "Apple Development";
690691
CODE_SIGN_STYLE = Automatic;
691692
CURRENT_PROJECT_VERSION = 184;
692693
DEVELOPMENT_ASSET_PATHS = "\"Bitkit/Preview Content\"";
@@ -720,6 +721,7 @@
720721
);
721722
PRODUCT_BUNDLE_IDENTIFIER = to.bitkit;
722723
PRODUCT_NAME = "$(TARGET_NAME)";
724+
PROVISIONING_PROFILE_SPECIFIER = "";
723725
SDKROOT = auto;
724726
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
725727
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -734,6 +736,7 @@
734736
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
735737
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
736738
CODE_SIGN_ENTITLEMENTS = Bitkit/Bitkit.entitlements;
739+
CODE_SIGN_IDENTITY = "Apple Development";
737740
CODE_SIGN_STYLE = Automatic;
738741
CURRENT_PROJECT_VERSION = 184;
739742
DEVELOPMENT_ASSET_PATHS = "\"Bitkit/Preview Content\"";
@@ -767,6 +770,7 @@
767770
);
768771
PRODUCT_BUNDLE_IDENTIFIER = to.bitkit;
769772
PRODUCT_NAME = "$(TARGET_NAME)";
773+
PROVISIONING_PROFILE_SPECIFIER = "";
770774
SDKROOT = auto;
771775
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
772776
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -966,7 +970,7 @@
966970
repositoryURL = "https://github.com/synonymdev/bitkit-core";
967971
requirement = {
968972
kind = revision;
969-
revision = ea770caabdaf07f5fd196b6e1df3997ac497f25a;
973+
revision = aa28d339e049bf94aefb13ff2cabc519536cbdf3;
970974
};
971975
};
972976
96E20CD22CB6D91A00C24149 /* XCRemoteSwiftPackageReference "CodeScanner" */ = {

Bitkit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Bitkit/AppScene.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,19 @@ struct AppScene: View {
137137
.environmentObject(channelDetails)
138138
.environmentObject(pubkyProfile)
139139
.environmentObject(contactsManager)
140-
.onChange(of: pubkyProfile.authState) { _, authState in
140+
.onChange(of: pubkyProfile.authState, initial: true) { _, authState in
141141
if authState == .authenticated, let pk = pubkyProfile.publicKey {
142142
Task { try? await contactsManager.loadContacts(for: pk) }
143143
} else if authState == .idle {
144144
contactsManager.reset()
145145
}
146146
}
147+
.onChange(of: pubkyProfile.sessionRestorationFailed) { _, failed in
148+
if failed {
149+
pubkyProfile.sessionRestorationFailed = false
150+
app.toast(type: .error, title: t("profile__session_expired_title"), description: t("profile__session_expired_description"))
151+
}
152+
}
147153
.onAppear {
148154
if !settings.pinEnabled {
149155
isPinVerified = true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "contact-card.png",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
},
12+
"properties" : {
13+
"preserves-vector-representation" : true
14+
}
15+
}
569 KB
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "ellipse-inner-green.png",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
},
12+
"properties" : {
13+
"preserves-vector-representation" : true
14+
}
15+
}
8.28 KB
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "ellipse-outer-green.png",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
},
12+
"properties" : {
13+
"preserves-vector-representation" : true
14+
}
15+
}
13.5 KB
Loading

0 commit comments

Comments
 (0)