Skip to content

Commit 4e75c6a

Browse files
authored
Merge branch 'master' into feat/os-widgets
2 parents 5312360 + 422de71 commit 4e75c6a

57 files changed

Lines changed: 1920 additions & 213 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,27 +102,76 @@ This PR adds support for...
102102
- Minimize code and file references like `TheClassName` or `someFunctionName`, `thisFileName.ext`
103103
- Exception: for refactoring PRs (1:10 ratio of functionality to code changes), more technical detail is ok
104104
105-
**QA Notes / Testing Scenarios:**
106-
- Structure with numbered headings and steps
107-
- Make steps easily referenceable
108-
- Be specific about what to test and expected outcomes
105+
**Custom Instructions:**
106+
When the user provides custom instructions after `--`:
107+
- Parse any referenced commit SHAs and read their full messages
108+
- Focus the description content on areas the user emphasizes
109+
- Structure QA Notes according to user's specific manual testing instructions and automated coverage notes
110+
- Custom instructions take priority over default generation rules for sections they address
111+
- Preserve exact manual testing steps provided by the user (don't summarize or omit details)
112+
- If custom instructions include automated checks or coverage notes, place them under `#### Automated Checks`
113+
114+
**QA Notes / Validation:**
115+
- QA Notes separate actionable human QA instructions from automated verification coverage.
116+
- Always use this structure:
117+
```md
118+
### QA Notes
119+
#### Manual Tests
120+
#### Automated Checks
121+
```
122+
- Keep local verification commands, `xcodebuild`, Swift tests, SwiftFormat, translation validation, unit tests, build passes, cargo test, cargo clippy, npm test, typecheck, CI coverage, or similar automated checks out of `#### Manual Tests`; summarize them under `#### Automated Checks` when they add useful context.
123+
- Use `#### Automated Checks` to summarize automated verification evidence, prioritizing coverage added, modified, or removed with file paths and a short explanation.
124+
- For removed automated coverage, state why it was removed.
125+
- Do not list standard CI or PR bot commands as checkbox items just because they run for every PR. If standard CI coverage is worth mentioning, summarize it in one sentence.
126+
- List raw commands only when they were run locally, are non-standard, use special flags or environment values, validate workflow behavior, or explain a meaningful verification gap.
127+
- For workflow behavior validation, include `(after merge)` in the automated check item because workflow changes only take effect for PRs opened after the workflow update merges.
128+
- If no actionable manual validation exists, write `N/A` under `#### Manual Tests`.
129+
- If no automated checks were run and no automated coverage changed, write `N/A` under `#### Automated Checks`.
130+
- Write manual tests using this template:
131+
```md
132+
- [ ] **{numbering}.** {optional_condition + →} {screen_action} → {next_screen_action}: expectation
133+
```
134+
- Use a list of unchecked checkboxes for each individual test.
135+
- Use a numbered prefix for each test, in bold, for example `**1.**`, `**2.**`.
136+
- Use `regression:` for regression checks, positioned after the numbering.
137+
- Use sub-lists for variations of the same test.
138+
- Use letter suffixes in numbering for each variation when a test has a sub-list, for example `**3a.**`, `**3b.**`.
139+
- Always use `` to denote navigation, for example `Send → Amount`.
140+
- Use screen names from code, formatted as separate words without the `View` or `Screen` suffix, for example `FundReceiveView` becomes `Fund Receive`.
141+
- Use short-form wording like `in-sheet` for sheet screens, `nav` for navigation, `back` for back nav, and `LN` for Lightning Network.
109142

110143
**For library repos (has `bindings/` directory or `Cargo.toml`):**
111-
Structure QA Notes around testing and integration:
144+
Structure manual QA around integration validation only. Automated checks belong under `#### Automated Checks`.
112145

113146
Example:
114147
```
115148
### QA Notes
149+
#### Manual Tests
150+
- [ ] **1.** Consumer app → exercise updated binding flow: behavior matches previous release.
151+
- [ ] **2.** `regression:` iOS integration screen → trigger changed API path: no crash or stale data.
152+
#### Automated Checks
153+
- Binding tests added: cover updated iOS API path in `bindings/ios/...`.
154+
- CI: standard cargo and binding checks run by the PR bot.
155+
```
116156

117-
#### Testing
118-
- [ ] `cargo test` passes
119-
- [ ] `cargo clippy` clean
120-
- [ ] Android bindings: `./build_android.sh`
121-
- [ ] iOS bindings: `./build_ios.sh`
122-
123-
#### Integration
124-
- Tested in: [bitkit-android#XXX](link)
125-
- Or N/A if internal refactor with no API changes
157+
Concrete style target:
158+
```md
159+
### QA Notes
160+
#### Manual Tests
161+
- [ ] **1.** No usable channels/spending balance → scan LN invoice: error shows immediately, not after 15s.
162+
- [ ] **2.** Scanner → scan fixed amount LN invoice: Send Confirm or QuickPay opens directly.
163+
- [ ] **3a.** `regression:` Send → scanner/paste fixed amount LN invoice: in-sheet nav to Confirm or QuickPay.
164+
- [ ] **3b.** `regression:` Variable amount LN invoice/LNURL-pay: lands on Amount view.
165+
- [ ] **4a.** Activity Detail of LN transfer → tap Connection: lands on Channel Detail.
166+
- [ ] **4b.** back: returns to Activity Detail.
167+
- [ ] **5a.** Settings → Lightning Connections → tap channel: still opens Channel Detail.
168+
- [ ] **5b.** back: returns to Connections List.
169+
- [ ] **6.** `regression:` Channel Detail → tap Close Connection: works.
170+
#### Automated Checks
171+
- Unit tests added: cover invoice timeout handling in `BitkitTests/TransferViewModelTests.swift`.
172+
- Unit tests modified: update channel navigation assertions in `BitkitTests/ChannelDetailsViewModelTests.swift`.
173+
- Test coverage removed: delete stale mock-only assertions from `BitkitTests/OldFlowTests.swift` because the flow no longer exists.
174+
- CI: standard build and test checks run by the PR bot.
126175
```
127176

128177
**Preview Section (conditional):**
File renamed without changes.

.claude/commands

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.agents/commands

AGENTS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# AGENTS.md
22

3-
This file provides guidance to AI agents like Claude Code (claude.ai/code) when working with code in this repository.
3+
This file provides guidance to Codex, Claude Code, and Cursor when working with code in this repository.
44

55
This file is symlinked for cross-agents compatibility to the following paths:
66
- `CLAUDE.md`
77

8+
## Agent Commands
9+
10+
Durable shared agent command specs live in `.agents/commands/`. For PR creation, follow `.agents/commands/pr.md`; `.claude/commands` is a compatibility symlink and Cursor command entries under `.cursor/commands/` resolve to the same files.
11+
812
## Project Overview
913

1014
Bitkit iOS is a native Swift implementation of a Bitcoin and Lightning Network wallet. This is a work-in-progress repository that is **NOT** the live production app. The production app uses React Native and is at github.com/synonymdev/bitkit.

Bitkit.xcodeproj/project.pbxproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
Extensions/PaymentDetails.swift,
110110
Models/BlocktankNotificationType.swift,
111111
Models/LnPeer.swift,
112+
Models/PubkyPublicKeyFormat.swift,
112113
Models/Toast.swift,
113114
Models/Transfer.swift,
114115
Models/TransferType.swift,
@@ -139,6 +140,7 @@
139140
Extensions/PaymentDetails.swift,
140141
Models/BlocktankNotificationType.swift,
141142
Models/LnPeer.swift,
143+
Models/PubkyPublicKeyFormat.swift,
142144
Models/Toast.swift,
143145
Services/CoreService.swift,
144146
Services/GeoService.swift,
@@ -1082,8 +1084,8 @@
10821084
isa = XCRemoteSwiftPackageReference;
10831085
repositoryURL = "https://github.com/pubky/paykit-rs";
10841086
requirement = {
1085-
kind = revision;
1086-
revision = cd1253291b1582759d569372d5942b8871527ea1;
1087+
kind = exactVersion;
1088+
version = 0.1.0-rc5;
10871089
};
10881090
};
10891091
18D65DFE2EB9649F00252335 /* XCRemoteSwiftPackageReference "vss-rust-client-ffi" */ = {
@@ -1114,8 +1116,8 @@
11141116
isa = XCRemoteSwiftPackageReference;
11151117
repositoryURL = "https://github.com/synonymdev/bitkit-core";
11161118
requirement = {
1117-
kind = revision;
1118-
revision = 99bd86bb60c1f14e8ce8a6356cd2ab36f222fc69;
1119+
kind = exactVersion;
1120+
version = 0.1.58;
11191121
};
11201122
};
11211123
96E20CD22CB6D91A00C24149 /* XCRemoteSwiftPackageReference "CodeScanner" */ = {

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

Lines changed: 4 additions & 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ struct AppScene: View {
560560
Task {
561561
await clearDeliveredNotifications()
562562
await LightningService.shared.reconnectPeers()
563+
await wallet.refreshPublicPaykitEndpointsOnForeground()
563564
}
564565
}
565566
}

Bitkit/Components/Activity/ActivityList.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import SwiftUI
33

44
struct ActivityList: View {
55
@EnvironmentObject var activity: ActivityListViewModel
6+
@EnvironmentObject var contactsManager: ContactsManager
67
@EnvironmentObject var feeEstimatesManager: FeeEstimatesManager
78
@State private var isHorizontalSwipe = false
89

@@ -28,7 +29,11 @@ struct ActivityList: View {
2829

2930
case let .activity(item):
3031
NavigationLink(value: Route.activityDetail(item)) {
31-
ActivityRow(item: item, feeEstimates: feeEstimatesManager.estimates)
32+
ActivityRow(
33+
item: item,
34+
feeEstimates: feeEstimatesManager.estimates,
35+
contact: item.contact(in: contactsManager.contacts)
36+
)
3237
}
3338
.accessibilityIdentifier("Activity-\(index)")
3439
.disabled(isHorizontalSwipe)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import SwiftUI
2+
3+
struct ContactAvatarLetter: View {
4+
let source: String
5+
let size: CGFloat
6+
var backgroundColor: Color = .white.opacity(0.1)
7+
var strokeColor: Color?
8+
var strokeWidth: CGFloat = 0
9+
10+
private var letter: String {
11+
String(source.prefix(1)).uppercased()
12+
}
13+
14+
var body: some View {
15+
Circle()
16+
.fill(backgroundColor)
17+
.frame(width: size, height: size)
18+
.overlay {
19+
avatarText
20+
}
21+
.overlay {
22+
if let strokeColor, strokeWidth > 0 {
23+
Circle()
24+
.stroke(strokeColor, lineWidth: strokeWidth)
25+
}
26+
}
27+
.accessibilityHidden(true)
28+
}
29+
30+
@ViewBuilder
31+
private var avatarText: some View {
32+
if size >= 72 {
33+
HeadlineText(letter)
34+
} else if size >= 56 {
35+
TitleText(letter)
36+
} else if size >= 44 {
37+
BodyMSBText(letter)
38+
} else {
39+
CaptionBText(letter, textColor: .textPrimary)
40+
}
41+
}
42+
}

Bitkit/Constants/Env.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ enum Env {
272272
case .bitcoin:
273273
return "/pub/bitkit.to/:rw,/pub/pubky.app/:r,/pub/paykit/v0/:rw"
274274
default:
275-
return "/pub/staging.bitkit.to/:rw,/pub/staging.pubky.app/:r,/pub/staging.paykit/v0/:rw"
275+
return "/pub/staging.bitkit.to/:rw,/pub/staging.pubky.app/:r,/pub/paykit/v0/:rw"
276276
}
277277
}
278278

0 commit comments

Comments
 (0)