Repository navigation
Conversation
Contributor
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
jvsena42
force-pushed
the
feat/wear-settings-sync
branch
from
November 28, 2026 11:57
0cd1fdd to
92493bc
Compare
jvsena42
force-pushed
the
feat/wear-settings-sync
branch
from
November 28, 2026 14:33
92493bc to
886e270
Compare
This was referenced Nov 28, 2026
26 tasks
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… settings import Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… in the repo's own scope Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e wait Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…schemes Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
jvsena42
force-pushed
the
feat/wear-settings-sync
branch
from
December 4, 2026 12:10
886e270 to
aa51146
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2105
Source: team, #2105
Warning
Do not publish the Wear app until #2152 ships. The watch runs the same Spark wallet as the phone, and Spark real-time sync is off (
realTimeSyncServerUrl = null), so two live instances share no state. Mainnet is also gated off in this build (Env.IS_MAINNET_ENABLED = false).Stacked on #2182 (
feat/wear-payments). This PR makes the watch adopt the phone's settings by reading the phone's settings backup from VSS, read-only, and adds QuickPay on the watch with the phone's rules.Description
BackupCategory.SETTINGS) from VSS. The watch derives the same store id and LNURL-auth sign-in from the shared recovery phrase and passphrase, and its VSS code can only read: one reader interface with a singleread, one file naming the library, and a test that fails if anything else appears. It imports when the wallet is ready on screen, every 5 minutes while the app is open (not in ambient), and when the wearer taps the new "Phone settings" row; it never writes, deletes or lists.WatchBackupContractTest.kton the phone,PhoneBackupContractTest.kton the watch), so a renamed phone setting fails a test instead of silently turning QuickPay off.docs/wear.md› Settings sync, QuickPay) and journeys.Out of Scope
wear: the phone and the watch each keep their own QuickPay daily count until pairing, so together they can spend up to twice the daily limit. The live settings push and shared state come with the pairing PR.wear: QuickPay turned off on the phone reaches the watch at its next successful import (on open, every 5 minutes, or a tap on Phone settings).wear: the phone can require its PIN to raise QuickPay limits; the watch has no PIN and adopts whatever the phone saved.wear: the watch keeps no payment ledger, so a QuickPay payment that was pending and fails later stays counted for the day (the phone reconciles it). Stricter, never looser.wear: an app on the paired phone could open a payment link on the watch while the watch screen is on and unlocked; that counts as attended. Documented.wear: the VSS library's LNURL-auth sign-in has no timeout, so a sign-in server that never answers can block later imports until the process ends. Documented; the fix belongs in the library.wearQuickPay: a watch date once set ahead keeps the daily count on that future day — fix: reset the quickpay daily count after a future date is corrected #2189Design
N/A — no design available. #2105 is a prototype with no Figma; the one new Settings row follows the existing watch Settings rows.
Preview
Large round emulator (454 px, Wear OS 7), local
./sparkstack, phone settings from the hosted staging VSS, app commit0cd1fdd6b.Recordings (large round emulator):
quickpay-skips-hold.mp4
quickpay-over-limit-holds.mp4
settings-import-units.mp4
QA Notes
Setup
Wear_Large_Round_API37as in feat: add wear os app foundation #2177, with the local-stack build (journeys/wear/README.md› Local./sparkstack, bitkit-dockerspark-*services andbitcoind).system-images;android-36;google_apis_playstore;x86_64, no Google account) with the plain phone dev build; it writes its settings to Blocktank's hosted staging VSS. Run one emulator at a time: set the phone's settings, wait for the upload, stop the phone, then start the watch.journeys/wear/README.md› Private settings wallet), so each machine's settings backup is its own. Fund it withreceive-paid.xml.Journeys
settings-import-units.xml— the watch adopts the phone's primary display, unit and currencysettings-swap-survives-import.xml— a swap on the watch survives an import of unchanged settingsquickpay-skips-hold.xml— an invoice under the limit pays without Review or holdquickpay-on-app-start.xml— a link that starts the app pays under QuickPayquickpay-over-limit-holds.xml— an invoice over the limit shows Review and holdquickpay-off-holds.xml— QuickPay off on the phone brings back Review and holdManual Tests
Automated Checks
PhoneBackupReaderTest.kt— the VSS reader can only read; no other source names the library or a write callPhoneSettingsParserTest.kt— envelope, field and enum forms, unknown keys, size limit, newer versionsPhoneBackupContractTest.kt,WatchBackupContractTest.kt— the fixture matches the phone's serializer, store id prefix and URLs, and the watch's parserSettingsSyncRepoTest.kt— import timing, minimum gap, cancellation when the wallet stops being ready, wipe races, unreadable backups turning QuickPay offQuickPayRepoTest.kt— the phone's threshold, boundary and daily-limit arithmetic, missing rates, release pathsQuickPaySpendStoreTest.kt— the day's count, time zones, releaseReplayedLaunchTest.kt— a launch from Recents is a plain launchPaymentsRepoTest.kt,SendViewModelTest.kt— eligible inputs, attendance window, recreated flows, release on failure, never-imported settingsSettingsStoreTest.kt,CurrencyTest.kt,HomeViewModelTest.kt,SettingsViewModelTest.kt,ActivityViewModelTest.kt,ReceiveViewModelTest.kt,TileStateTest.kt— imported settings, Classic formatting, the Phone settings row, the tile's unitEvidence
92493bc43: gate passed (just compile,just test,just lint); a race where QuickPay's second look said yes with the wallet already Offline was found by a new test and fixed. J1–J6 below ran before this rebase, at0cd1fdd6b.0cd1fdd6b):just compile,just test,just lintall passed with strict dependency verification.Wear_Large_Round_API37(Wear OS 7) at0cd1fdd6b: the watch on the local./sparkstack, the phone (Bitkit_Phone_API36, Android 16, dev build) writing to the hosted staging VSS, with the public test phrase plus a per-machine passphrase. J3 and J4 paid 200 sats with the hold skipped (J4 from a cold start, in about 4 s); J5 showed the hold for 10 000 sats and nothing paid before it; J6 showed the hold for 200 sats after QuickPay was turned off on the phone.Gaps
ReplayedLaunchTest.ktchecks only the flag.92493bc43; the merged offline and QuickPay behaviour is unit-tested (SendViewModelTest.kt,PaymentsRepoTest.kt).0.0005000while the secondary reads0.00050000; same value, to be compared with the phone's Classic format.Models used
claude-opus-5-5(reasoning:medium)claude-fable-5-2(reasoning:medium),claude-opus-5-5(reasoning:medium)claude-fable-5-2(reasoning:medium),claude-opus-5-5(reasoning:medium)claude-sonnet-5-5(reasoning:medium)🤖 Generated with Claude Code