Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
53a4db2
chore: cleanup
ovitrif Dec 4, 2025
6a2e1ca
chore: update all dependencies
ovitrif Dec 4, 2025
fd42dbe
chore: remove unused fun
ovitrif Dec 4, 2025
62b9007
chore: inline deps versions if not reused
ovitrif Dec 4, 2025
5908e6e
chore: rollback agp to 8.12.0 for idea compat
ovitrif Dec 4, 2025
723c2af
refactor: clickableAlpha to ModifierNodeElement
ovitrif Dec 5, 2025
ad8fb8d
fix: use new kotlin.compilerOptions dsl
ovitrif Dec 8, 2025
49c6d93
refactor: replace deprecated clock & instant
ovitrif Dec 9, 2025
52b4824
feat: use all lightning setup steps
ovitrif Dec 9, 2025
ca56aed
chore: update MagicNumber ignoreNumbers lint rule
ovitrif Dec 9, 2025
7f8d5d9
chore: upgrade compile & target SDK to API 36
ovitrif Dec 9, 2025
f30e6bc
chore: upgrade vss-client to 0.4.0
ovitrif Dec 9, 2025
3c7e9e8
chore: upgrade bitkit-core to 0.1.31
ovitrif Dec 9, 2025
9dfa65e
Merge branch 'master' into chore/update-deps
ovitrif Dec 9, 2025
5ac5e52
refactor: move clickableAlpha modifier to own file
ovitrif Dec 9, 2025
5af22b0
chore: update detekt-compose-rules to new version
ovitrif Dec 9, 2025
a11730c
chore: update detekt.yml with comments
ovitrif Dec 9, 2025
73621a7
fix: unit tests
ovitrif Dec 10, 2025
22ca753
refactor: use VERBOSE log in fee calc and syncp
ovitrif Dec 10, 2025
76d713f
fix: improve shutdown and refresh performance
ovitrif Dec 10, 2025
5e9e6a2
fix: drawer button
jvsena42 Dec 10, 2025
61b7b75
fix: bg image padding top
jvsena42 Dec 10, 2025
769b16a
fix: navigate back home on nested graph
jvsena42 Dec 10, 2025
b5581f1
refactor: optimize sync handling and PTR UX #511
ovitrif Dec 10, 2025
ebc8b2b
Merge branch 'master' into chore/update-deps
ovitrif Dec 10, 2025
caed7eb
chore: suppress lint
ovitrif Dec 10, 2025
47d8039
fix: add drawer icon
jvsena42 Dec 10, 2025
48ecd58
fix: add back button to settings
jvsena42 Dec 10, 2025
a97cfb9
refactor: extract navigate home logic
jvsena42 Dec 10, 2025
fd0b71d
fix: home navigation
jvsena42 Dec 10, 2025
c5b75c8
chore: rename method
jvsena42 Dec 10, 2025
9c6ccb7
feat: sync transfers on events
ovitrif Dec 10, 2025
c0d6e3e
refactor: remove `@param:` qualifiers
ovitrif Dec 11, 2025
2b924bc
chore: add code style to VCS
ovitrif Dec 11, 2025
c90b07e
fix: replace nested nav graph with flat navigation to fix HomeNav cre…
jvsena42 Dec 11, 2025
f292ba7
chore: remove unused parameter
jvsena42 Dec 11, 2025
0e7db64
fix: remove box to fix weight
jvsena42 Dec 11, 2025
c02fba4
fix: button clickable alpha
jvsena42 Dec 11, 2025
35630a7
fix: restore back button
jvsena42 Dec 11, 2025
6a2038e
Merge branch 'chore/update-deps' into fix/restore-back-button
jvsena42 Dec 11, 2025
f74f57e
chore: cleanup
ovitrif Dec 11, 2025
630be83
fix: apply v59 style
jvsena42 Dec 11, 2025
d70150e
chore: update AndroidManifest for targetSDK 36
ovitrif Dec 11, 2025
8d825fe
fix: clickableAlpha not triggering click event
jvsena42 Dec 11, 2025
495dd22
fix: apply padding before fill width
jvsena42 Dec 11, 2025
a6a6c85
Merge branch 'chore/update-deps' into fix/primary-bt-width
jvsena42 Dec 11, 2025
8949dfa
Merge branch 'chore/update-deps' into fix/restore-back-button
jvsena42 Dec 11, 2025
2303626
Merge branch 'fix/primary-bt-width' into feat/numpad-button-v59
jvsena42 Dec 11, 2025
834ca75
fix: alpha feedback
jvsena42 Dec 11, 2025
739bbd3
chore: update ldk-node to v0.7.0-rc.1
ovitrif Dec 11, 2025
226b316
feat: localize max boost error message
ovitrif Dec 12, 2025
6192d82
chore: update bitkit-core to "0.1.33"
ovitrif Dec 12, 2025
b1dabea
refactor: use activity factories w. default values
ovitrif Dec 12, 2025
ed1f232
chore: cleanup BackupIntroScreen
ovitrif Dec 12, 2025
16fd390
chore: cleanup LightningNodeServiceTest
ovitrif Dec 12, 2025
102ccea
fix: make qr buttons fill the width
jvsena42 Dec 12, 2025
5861fe5
feat: add new share icon and add share button to details
jvsena42 Dec 12, 2025
2a1a8b8
feat: add new share icon and add share button to details
jvsena42 Dec 12, 2025
cd3dfea
refactor: Add test DI module
ovitrif Dec 12, 2025
1ecec01
chore: Use hiltViewModel from new package
ovitrif Dec 12, 2025
a9714e8
chore: update detekt-baseline.xml
ovitrif Dec 12, 2025
a32f403
Merge branch 'chore/update-deps' into fix/primary-bt-width
ovitrif Dec 12, 2025
07bf511
Merge pull request #515 from synonymdev/fix/restore-back-button
ovitrif Dec 12, 2025
ce263bd
Merge pull request #516 from synonymdev/fix/primary-bt-width
ovitrif Dec 12, 2025
56d1b4a
Merge branch 'chore/update-deps' into feat/numpad-button-v59
ovitrif Dec 12, 2025
5fea2b5
Merge branch 'feat/numpad-button-v59' into feat/new-share-icon
ovitrif Dec 12, 2025
fffa684
Merge pull request #519 from synonymdev/feat/new-share-icon
ovitrif Dec 12, 2025
316a02a
Merge branch 'master' into chore/update-deps
ovitrif Dec 12, 2025
5095067
Merge branch 'chore/update-deps' into feat/numpad-button-v59
ovitrif Dec 12, 2025
e9f9483
Merge pull request #517 from synonymdev/feat/numpad-button-v59
ovitrif Dec 12, 2025
483cdaa
fix: tests
ovitrif Dec 12, 2025
fd54145
chore: update detekt-baseline.xml
ovitrif Dec 12, 2025
795102d
fix: Make Routes stables
ovitrif Dec 12, 2025
46a9744
fix: tests
ovitrif Dec 12, 2025
436ae0b
fix: sync node and activities after a successful boost
jvsena42 Dec 13, 2025
7dcc317
fix: dismiss current toast
jvsena42 Dec 14, 2025
8b998dc
fix: dismiss current toast before adding a new one to the queue
jvsena42 Dec 14, 2025
9f625cf
fix: dismiss current toast
jvsena42 Dec 14, 2025
57c789f
Merge pull request #523 from synonymdev/fix/force-sync-on-boost
ovitrif Dec 15, 2025
576512e
fix: restrict Claude workflow to trusted actors
ovitrif Dec 12, 2025
148e50b
chore: Update claude workflows
ovitrif Dec 12, 2025
7145932
feat: Add rules and setup for AI agents
ovitrif Dec 12, 2025
46872e9
feat: Add cursor rules
ovitrif Dec 12, 2025
6277d45
feat: AGENTS.md symlinks for all SOTA agents
ovitrif Dec 12, 2025
7266315
chore: update AGENTS.md
ovitrif Dec 15, 2025
12b89e4
Merge pull request #520 from synonymdev/feat/restore-claude-review
ovitrif Dec 15, 2025
58eca81
chore: update README.md
ovitrif Dec 15, 2025
338f9c0
fix: Remove toast for known sync errors
ovitrif Dec 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .claude/settings.local.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"permissions": {
"allow": [
"Bash",
"Read",
"Edit",
"Write",
"WebFetch",
"mcp__ide__getDiagnostics",
"WebSearch",
"mcp__github__pull_request_read",
"mcp__github__search_pull_requests",
"mcp__github__list_pull_requests",
"mcp__github__get_me",
"mcp__github__get_file_contents"
],
"deny": [],
"ask": [
"Bash(rm -rf:*)",
"Bash(git commit:*)",
"Bash(git push:*)"
],
"additionalDirectories": [
]
}
}
162 changes: 162 additions & 0 deletions .cursor/notes/libs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Android Libraries Documentation Reference

This document provides a comprehensive reference for all libraries used in the bitkit-android project, including their documentation links and key usage patterns.

## Core Android Libraries

### Kotlin
- **Documentation**: https://kotlinlang.org/docs/
- **API Reference**: https://kotlinlang.org/api/latest/jvm/stdlib/

### Android Core
- **Core KTX**: https://developer.android.com/kotlin/ktx
- **AppCompat**: https://developer.android.com/jetpack/androidx/releases/appcompat
- **Material Design**: https://material.io/develop/android
- **Core Splashscreen**: https://developer.android.com/develop/ui/views/launch/splash-screen

## UI Framework

### Jetpack Compose
- **Main Documentation**: https://developer.android.com/jetpack/compose
- **BOM Mapping**: https://developer.android.com/develop/ui/compose/bom/bom-mapping
- **Material 3**: https://developer.android.com/jetpack/compose/designsystems/material3
- **Navigation**: https://developer.android.com/jetpack/compose/navigation
- **Tooling**: https://developer.android.com/jetpack/compose/tooling

### Accompanist
- **Documentation**: https://google.github.io/accompanist/
- **Permissions**: https://google.github.io/accompanist/permissions/
- **Pager Indicators**: https://google.github.io/accompanist/pager/

### Layout
- **ConstraintLayout Compose**: https://developer.android.com/jetpack/compose/layouts/constraintlayout

## Architecture & Dependency Injection

### Hilt
- **Documentation**: https://dagger.dev/hilt/
- **Android Guide**: https://developer.android.com/training/dependency-injection/hilt-android
- **Compose Integration**: https://developer.android.com/jetpack/compose/libraries#hilt

### Lifecycle Components
- **Documentation**: https://developer.android.com/jetpack/androidx/releases/lifecycle
- **ViewModel**: https://developer.android.com/topic/libraries/architecture/viewmodel
- **Compose Integration**: https://developer.android.com/jetpack/compose/libraries#viewmodel

### Data Persistence
- **DataStore Preferences**: https://developer.android.com/topic/libraries/architecture/datastore
- **Room**: https://developer.android.com/training/data-storage/room

## Networking & Serialization

### Ktor
- **Documentation**: https://ktor.io/docs/
- **Client Documentation**: https://ktor.io/docs/getting-started-ktor-client.html
- **Android Guide**: https://ktor.io/docs/client-engines.html#android

### Serialization
- **Kotlinx Serialization**: https://kotlinlang.org/docs/serialization.html
- **Protobuf**: https://protobuf.dev/

## Bitcoin & Lightning Network

### LDK Node Android
- **GitHub**: https://github.com/synonymdev/ldk-node (Fork)
- **Upstream Docs**: https://lightningdevkit.org/
- **API Reference**: https://docs.rs/ldk-node/latest/ldk_node/

### Bitkit Core
- **GitHub**: https://github.com/synonymdev/bitkit-core
- **Custom Android bindings for Bitcoin operations**

### Cryptography
- **BouncyCastle**: https://www.bouncycastle.org/java.html
- **Provider Documentation**: https://www.bouncycastle.org/documentation.html

## Media & Scanning

### Camera
- **CameraX**: https://developer.android.com/training/camerax
- **Camera2 API**: https://developer.android.com/training/camerax/architecture

### Barcode/QR Scanning
- **ZXing**: https://github.com/zxing/zxing
- **ML Kit Barcode**: https://developers.google.com/ml-kit/vision/barcode-scanning

### Animations
- **Lottie Compose**: https://airbnb.io/lottie/#/android-compose

## Firebase

### Firebase Platform
- **Documentation**: https://firebase.google.com/docs/android/setup
- **Messaging**: https://firebase.google.com/docs/cloud-messaging/android/client
- **Analytics**: https://firebase.google.com/docs/analytics/get-started?platform=android

## Security & Authentication

### Biometric
- **Documentation**: https://developer.android.com/jetpack/androidx/releases/biometric
- **Guide**: https://developer.android.com/training/sign-in/biometric-auth

## Background Processing

### WorkManager
- **Documentation**: https://developer.android.com/topic/libraries/architecture/workmanager
- **Hilt Integration**: https://developer.android.com/training/dependency-injection/hilt-jetpack

## Utilities

### Date/Time
- **Kotlinx DateTime**: https://github.com/Kotlin/kotlinx-datetime

### Charts
- **Compose Charts**: https://github.com/ehsannarmani/ComposeCharts

### Native Libraries
- **JNA**: https://github.com/java-native-access/jna

## Testing Libraries

### Unit Testing
- **JUnit**: https://junit.org/junit4/
- **Mockito Kotlin**: https://github.com/mockito/mockito-kotlin
- **Robolectric**: http://robolectric.org/
- **Turbine**: https://github.com/cashapp/turbine

### Android Testing
- **Espresso**: https://developer.android.com/training/testing/espresso
- **Compose Testing**: https://developer.android.com/jetpack/compose/testing
- **Hilt Testing**: https://developer.android.com/training/dependency-injection/hilt-testing

## Key Configuration Notes

### Compose Compiler Flags
- StrongSkipping is disabled
- OptimizeNonSkippingGroups is enabled

### Build Configuration
- Minimum SDK: 28
- Target SDK: 35
- Kotlin JVM Target: 11
- Compose BOM manages all Compose library versions

## Development Guidelines

### When Adding New Libraries
1. Check if functionality exists in current libraries first
2. Prefer AndroidX/Jetpack libraries when available
3. Ensure compatibility with current Compose BOM version
4. Add to libs.versions.toml for version management
5. Update this documentation with links and usage notes

### Version Management
- All versions are centralized in `gradle/libs.versions.toml`
- Use BOM (Bill of Materials) for related library groups
- Keep major dependencies (Compose, Kotlin, Hilt) aligned

### Testing Strategy
- Unit tests: JUnit + Mockito + Robolectric
- Integration tests: Hilt testing + Room testing
- UI tests: Compose testing + Espresso
- Flow testing: Turbine for StateFlow/Flow testing
28 changes: 28 additions & 0 deletions .cursor/rules/rules.arch.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
description:
globs:
alwaysApply: true
---
### Business Layer Design Principles
- Always prefer creating specialized methods over complex inline logic
- If a feature implementation requires >5 lines of method chaining, extract to a new method
- New feature implementations should read like the business requirement

### API Design Guidelines
- Create domain-specific methods that match the business language
- Method names should describe WHAT, not HOW
- Hide complexity behind simple, single-purpose APIs

### Refactoring Triggers
- When implementing new features, always ask: "Does the business layer need a new method to support this cleanly?"
- If you see repeated patterns across different features, extract them into reusable methods
- Prefer failing fast with meaningful defaults over complex null handling in business logic

### Business Logic Method Design
- Service methods should handle their own error cases and return simple types
- Let callers focus on business logic, not infrastructure concerns

### Implementation Priority
- Before writing complex feature logic, spend time designing the ideal API first
- Ask: "What would the cleanest possible calling code look like?" then work backwards
- Create the relevant methods needed to achieve that clean calling code
68 changes: 68 additions & 0 deletions .cursor/rules/rules.main.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
description:
globs:
alwaysApply: true
---
## Setup rules:
- you're a senior kotlin android developer with very good knowledge of react native and swift, and you're also an expert in bitcoin and lightning network developer, especially with ldk and ldk-node.
- do not add code comments, except for math, complex logic, docs
- do not remove existing code comments
- when working with libraries, always check `.cursor/notes/libs.md` for documentation links and usage patterns

## Rules for communication:
- don't be overly enthusiastic in your words, be terse, plain and factual
- do not reply with arguments why the changes are better

---

## Rules for Android code:
- use official kotlin code guide
- always use trailing commas in parameters list, except after modifiers parameter
- when invoking any composable function, always pass the modifier argument last in the call, sse named parameters if needed to ensure this order, and omit trailing commas after it.
- never modify `strings.xml`
- always keep compose preview at end of file
- split screen composables into stateful wrapper parent and stateless child which can be rendered in the previews.
- wrap previews in `AppThemeSurface` composable, and name them simple, like `Preview`, `Preview2`.
- In every ViewModel file, declare the UiState data class immediately AFTER the ViewModel class (never above it)
- prefer to use `_uiState.update {}` for updating ui state flow value
- prefer to add business logic to UI via viewmodels, which can delegate to repositories/service classes
- avoid creating intermediate tuples/triples variables in UI, instead inline logic to the components properties
- do not wire navigation through viewmodel
- do not add logs to viewmodels
- never add any viewmodel as dependency to another viewmodel
- name composable callback parameters with prefix `onClick`, like `onClickSomething` not `onSomethingClick`
- when possible, pass entire `uiState` to the inner Content composable, not individual parameters for each uiState param
- use existing components from `to.bitkit.ui.components` package
- prefer `Dp` unit for new composable parameters
- prefer notation `5000u` and `5000uL` for unsigned integers and long, avoid using `5000U` and `5000UL`
- logging should happen at repository level, viewmodel methods should not re-log if repository already logs the same thing
- prefer list condition check using `in`, i.e. use `myElement in myList` instead of `myList.contains(myElement)`
- for localization use `getString(resId).replace("{param}", hostParam)`
- always trim user input strings, apply the `userInput.trim()` in the viewmodel
- prefer `runCatching` over try/catch
- in compose callbacks, instead of calling `stringResource()` declare `val context = LocalContext.current` and use `context.getString()`
- prefer using `ULong` wherever possible and write ULong values as `1000u` instead of `1000UL`
- prefer to expression body for potential one-line methods

### Rules for Compose Navigation:
- we use strongly typed navigation in compose, most routes are in `ContentView.kt` file, package `to.bitkit.ui.Routes`
- you should use navigation like: `navController.navigate(Routes.ExternalConnection)`

## Rules to map RN (react native) to Compose:
- use `docs/screens-map.md` for mapping screens
- map `color = "secondary"` to `color = Colors.White64`
- map colors to `Colors.kt`
- map `Pressable` or `TouchableOpacity` to `Modifier.clickableAlpha { onClick() } `
- map text components to compose components from `ui/components/Text.kt`
- map settings components to compose components from from `ui/components/settings/*.kt`
- use spacer components from `ui/components/Spacers.kt`
- map `EChannelStatus.open` from react native to `channelDetails.isChannelReady` in kotlin
- map `EChannelStatus.pending` from react native to `!channelDetails.isChannelReady` in kotlin
- map border to `HorizontalDivider()`, without color or thickness params, default color is already White10.

---

## Rules for Android Unit tests and Instrumentation tests:
- run unit tests for specific files like this: `./gradlew :app:testDevDebugUnitTest --tests "to.bitkit.repositories.LightningRepoTest"`
- write unit tests in the same style and using same libraries as: `CurrencyRepoTest`, `LightningRepoTest`, `WalletRepoTest`
- in unit tests, use asserts from `kotlin.test` and mockito-kotlin for mocks
7 changes: 4 additions & 3 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ jobs:

Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.

# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.

# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
15 changes: 9 additions & 6 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ on:
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.review.author_association)) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.issue.author_association))
runs-on: ubuntu-latest
permissions:
contents: write # Allow creating branches/commits
Expand Down Expand Up @@ -45,6 +49,5 @@ jobs:

# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.iml
.gradle
.idea
!.idea/codeStyles/
.kotlin
.DS_Store
/build
Expand All @@ -10,9 +11,8 @@
local.properties
# AI
.ai
.cursor
*.local.*
CLAUDE.md
!*.local.template*
# Secrets
google-services.json
.env
Expand Down
Loading
Loading