Skip to content

Commit f3b69aa

Browse files
authored
Merge branch 'master' into feat/sweep-funds
2 parents 0d83422 + a80515d commit f3b69aa

7 files changed

Lines changed: 73 additions & 35 deletions

File tree

.claude/commands/pr.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Create a PR on GitHub using the `gh` CLI for the currently checked-out branch.
1111
- `/pr master` - Interactive with explicit base branch
1212
- `/pr --dry` - Generate description only, save to `.ai/`
1313
- `/pr --draft` - Create as draft PR
14-
- `/pr develop --draft` - Draft PR against develop branch
14+
- `/pr develop --draft` - Draft PR against non-default branch
1515

1616
## Steps
1717

@@ -23,24 +23,31 @@ Run `gh pr view --json number,url 2>/dev/null` to check if a PR already exists f
2323
### 2. Parse Arguments
2424
- `--dry`: Skip PR creation, only generate and save description
2525
- `--draft`: Create PR as draft
26-
- First non-flag argument: base branch (default: `master`)
26+
- First non-flag argument: base branch (default: auto-detected, see Step 2.5)
2727
- **If no flags provided**: Use `AskUserQuestion` to prompt user:
2828
- Open PR (create and publish)
2929
- Draft PR (create as draft)
3030
- Dry run (save locally only)
3131

32+
### 2.5. Determine Base Branch
33+
If no base branch argument provided, detect the repo's default branch:
34+
- Run: `git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'`
35+
- Use result as default (typically `main` or `master`)
36+
- If command fails, fall back to `master`
37+
3238
### 3. Gather Context
3339
- Get current branch name: `git branch --show-current`
40+
- Extract repo identifier: `git remote get-url origin | sed 's/\.git$//' | sed -E 's#.*[:/]([^/]+/[^/]+)$#\1#'` (e.g., `synonymdev/bitkit-android`)
3441
- Read PR template from `.github/pull_request_template.md`
35-
- Fetch 10 most recent PRs (open or closed) from `synonymdev/bitkit-android` for writing style reference
42+
- Fetch 10 most recent PRs (open or closed) from the extracted repo for writing style reference
3643
- Run `git log $base..HEAD --oneline` for commit messages
3744
- Run `git diff $base...HEAD --stat` for understanding scope of changes
3845

3946
### 4. Extract Linked Issues
4047
Scan commits for issue references:
4148
- Pattern to match: `#123` (just the issue number reference)
4249
- Extract unique issue numbers: `git log $base..HEAD --oneline | grep -oE "#[0-9]+" | sort -u`
43-
- Fetch each issue title: `gh api "repos/synonymdev/bitkit-android/issues/NUMBER" --jq '.title'`
50+
- Fetch each issue title: `gh api "repos/$REPO/issues/NUMBER" --jq '.title'` (using repo from Step 3)
4451
- These will be used to start the PR description with linking keywords (see Step 6)
4552

4653
### 5. Identify Suggested Reviewers
@@ -80,7 +87,6 @@ This PR adds support for...
8087
- Example:
8188
```
8289
This PR:
83-
8490
1. Adds a Claude Code /pr command for generating PRs
8591
2. Fixes issue preventing Claude Code reviews to be added as PR comments
8692
3. Updates reviews workflow to minimize older review comments
@@ -93,22 +99,41 @@ This PR adds support for...
9399
- Match writing style of recent PRs
94100
- Focus on functionality over technical details
95101
- Avoid excessive bold formatting like `**this:** that`
96-
- Minimize code references like `TheClassName` or `someFunctionName`
102+
- Minimize code and file references like `TheClassName` or `someFunctionName`, `thisFileName.ext`
97103
- Exception: for refactoring PRs (1:10 ratio of functionality to code changes), more technical detail is ok
98104
99105
**QA Notes / Testing Scenarios:**
100106
- Structure with numbered headings and steps
101107
- Make steps easily referenceable
102108
- Be specific about what to test and expected outcomes
103109
104-
**Preview Section:**
110+
**For library repos (has `bindings/` directory or `Cargo.toml`):**
111+
Structure QA Notes around testing and integration:
112+
113+
Example:
114+
```
115+
### QA Notes
116+
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
126+
```
127+
128+
**Preview Section (conditional):**
129+
Only include if the PR template (`.github/pull_request_template.md`) contains a `### Preview` heading:
105130
- Create placeholders for media: `IMAGE_1`, `VIDEO_2`, etc.
106131
- Add code comment under each placeholder describing what it should show
107132
- Example: `<!-- VIDEO_1: Record the send flow by scanning a LN invoice and setting amount to 5000 sats -->`
108133
109134
### 7. Save PR Description
110135
Before creating the PR:
111-
- Get next PR number: `gh api "repos/synonymdev/bitkit-android/issues?per_page=1&state=all&sort=created&direction=desc" --jq '.[0].number'` then add 1
136+
- Get next PR number: `gh api "repos/$REPO/issues?per_page=1&state=all&sort=created&direction=desc" --jq '.[0].number'` then add 1 (using repo from Step 3)
112137
- Create `.ai/` directory if it doesn't exist
113138
- Save to `.ai/pr_NN.md` where `NN` is the predicted PR number
114139
@@ -130,10 +155,6 @@ Saved: .ai/pr_NN.md
130155
Suggested reviewers:
131156
- @username1 (X files modified recently)
132157
- @username2 (CODEOWNER)
133-
134-
## TODOs
135-
- [ ] IMAGE_1: [description]
136-
- [ ] VIDEO_2: [description]
137158
```
138159

139160
**If dry run:**
@@ -146,10 +167,13 @@ To create PR: /pr [--draft]
146167
Suggested reviewers:
147168
- @username1 (X files modified recently)
148169
- @username2 (CODEOWNER)
170+
```
149171

172+
**Media TODOs (only if Preview section was included):**
173+
If the PR description includes a Preview section with media placeholders, append:
174+
```
150175
## TODOs
151176
- [ ] IMAGE_1: [description]
152177
- [ ] VIDEO_2: [description]
153178
```
154-
155179
List all media placeholders as TODOs with their descriptions.

.cursor/commands/pr.md

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

.github/workflows/claude-code-review.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Claude Code Review
22

33
on:
44
pull_request:
5-
types: [opened, synchronize]
5+
types: [opened, synchronize, ready_for_review, reopened]
66
# Optional: Only run on specific file changes
77
# paths:
88
# - "src/**/*.ts"
@@ -56,20 +56,7 @@ jobs:
5656
uses: anthropics/claude-code-action@v1
5757
with:
5858
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
59-
additional_permissions: "actions:read"
60-
prompt: |
61-
REPO: ${{ github.repository }}
62-
PR NUMBER: ${{ github.event.pull_request.number }}
63-
64-
Please review this pull request and provide meaningful feedback on:
65-
- Code quality and best practices
66-
- Potential bugs or issues
67-
- Performance considerations
68-
- Security concerns
69-
- Test coverage
70-
71-
Use the repository's CLAUDE.md for guidance on style and conventions.
72-
Be constructive, helpful, terse and stay relevant in your feedback.
73-
74-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
75-
# or https://code.claude.com/docs/en/cli-reference for available options
59+
# use_sticky_comment: "true" # doesn't work
60+
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
61+
plugins: 'code-review@claude-code-plugins'
62+
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'

.idea/codeStyles/Project.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,15 @@ See also:
4343
- [bitkit-core android bindings](https://github.com/synonymdev/bitkit-core/tree/master/bindings/android#installation)
4444
- [vss-rust-client-ffi android bindings](https://github.com/synonymdev/vss-rust-client-ffi/tree/master/bindings/android#installation)
4545

46-
### References
47-
48-
- For LNURL dev testing see [bitkit-docker](https://github.com/ovitrif/bitkit-docker)
46+
### Related Repositories
47+
48+
- [bitkit-ios](https://github.com/synonymdev/bitkit-ios) - Native iOS Bitkit app
49+
- [bitkit-core](https://github.com/synonymdev/bitkit-core) - Shared Core Rust library with FFI bindings
50+
- [ldk-node](https://github.com/synonymdev/ldk-node) - Fork of ldk-node
51+
- [vss-server](https://github.com/synonymdev/vss-server) - Versioned Storage Service backend
52+
- [vss-rust-client-ffi](https://github.com/synonymdev/vss-rust-client-ffi) - FFI bindings for vss-rust-client
53+
- [bitkit-e2e-tests](https://github.com/synonymdev/bitkit-e2e-tests) - End-to-end tests (WebdriverIO + Appium)
54+
- [bitkit-docker](https://github.com/synonymdev/bitkit-docker) - Docker setup for LNURL dev testing and local backend for integrations development
4955

5056
### Lint
5157

app/src/main/java/to/bitkit/services/MigrationService.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,7 @@ class MigrationService @Inject constructor(
14201420
}
14211421
}
14221422

1423+
@Suppress("CyclomaticComplexMethod")
14231424
private suspend fun updateOnchainActivityMetadata(
14241425
item: RNActivityItem,
14251426
onchain: OnchainActivity,
@@ -1468,6 +1469,20 @@ class MigrationService @Inject constructor(
14681469
wasUpdated = true
14691470
}
14701471

1472+
item.feeRate?.let { feeRate ->
1473+
if (feeRate > 0 && updated.feeRate != feeRate.toULong()) {
1474+
updated = updated.copy(feeRate = feeRate.toULong())
1475+
wasUpdated = true
1476+
}
1477+
}
1478+
1479+
item.address?.let { address ->
1480+
if (address.isNotEmpty() && updated.address != address) {
1481+
updated = updated.copy(address = address)
1482+
wasUpdated = true
1483+
}
1484+
}
1485+
14711486
return if (wasUpdated) updated else null
14721487
}
14731488

docs/transfer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,5 +455,5 @@ Transfers are serialized to JSON and included in backup. Restore deserializes an
455455

456456
[^1]: Currently we can't display the channel closure transactions as 'transfer' yet in the activity list, due to an api missing in ldk-node. See comment in [ldk-node/wallet/mod.rs#L728-L738][ldk-node-comment]
457457
458-
[external-node-channel]: https://github.com/ovitrif/bitkit-docker#external-node-channel
458+
[external-node-channel]: https://github.com/synonymdev/bitkit-docker#external-node-channel
459459
[ldk-node-comment]: https://github.com/lightningdevkit/ldk-node/blob/22a5d7742cf4e9265173ae51106db4bd9668ec8a/src/wallet/mod.rs#L728-L738

0 commit comments

Comments
 (0)