feat: apple watch app + home screen widgets#655
Open
islandbitcoin wants to merge 17 commits into
Open
Conversation
…-driven relay, remove dead createGroup - Remove the malformed react-native-svg+15.15.2.patch: it captured Android build artifacts (android/build/.transforms, classes.dex, generated BuildConfig.java) rather than source. react-native-svg patching is owned by #645, which supersedes this. - Gate the verbose [nip29] publish/join logs behind __DEV__ via nip29Log / nip29Warn so signed events and relay chatter never reach production logs. - Make the default relay + support group id config-driven via react-native-config (NIP29_RELAY_URL / NIP29_SUPPORT_GROUP_ID), with groups.0xchat.com and the support group as defaults — no longer hard-coded. Also route the provider's relayUrls default prop through NIP29_DEFAULT_RELAY_URL. - Remove the unused createGroup from NostrGroupChatProvider (dead code that duplicated the standalone createNip29Group used by CreateGroupModal); drop the now-unused generateSecretKey / bytesToHex imports. No new type errors (tsc unchanged at 87, all pre-existing). Note: react-native-config may need a jest mock when the suite is revived (ENG-433). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The three derive-from-EventStore effects returned `store.subscribe(...)` directly as the cleanup, but its unsubscribe returns `boolean`, which violates useEffect's `void` cleanup contract (TS2345). Wrap each so the cleanup discards the return. No runtime change (React ignored the value); clears the 3 tsc errors this PR introduced. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Native home-screen widget for iOS (WidgetKit) and Android (AppWidget) in small/medium/large sizes showing the live BTC price plus Scan/Receive quick actions. - Shared price snapshot via App Group (iOS) / SharedPreferences (Android), written by the RN app on each price poll through a WidgetBridge native module, and refreshed independently by the widget via the public realtimePrice GraphQL query so it stays current while the app is closed. - Quick actions deep-link via flash://scan and flash://receive; added those routes to the navigation linking config and a flash:// intent filter on Android MainActivity. - iOS extension sources scaffolded with Xcode setup steps in ios/FlashWidget/SETUP.md (target creation must be done in the GUI). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a native watchOS app and a WidgetKit complication that show a live BTC price on the watch and on any watch face, mirroring the conventions of the existing home-screen widget (ios/FlashWidget). - Watch app (SwiftUI): glanceable price, manual refresh, last-updated, and Scan/Receive quick actions handed off to the iPhone. - Complication (WidgetKit, watchOS 9+): accessoryCircular, inline, rectangular, and corner families. - Self-contained price fetch via the public unauthenticated realtimePrice query (works with the phone away / before login; defaults to USD). - Watch-local App Group group.com.lnflash.watch shares the snapshot between the watch app and its complication. - Phone-side WatchConnectivityBridge RN module pushes the user's display currency to the watch and opens flash:// deep links from watch actions; WatchCurrencySync wires it into the authed tree. - ios/FlashWatch/SETUP.md documents Xcode target creation + wiring (pbxproj edited in the GUI, per repo convention). Closes ENG-459 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… chart - Replace generic SF Symbol icons with Flash logo on widgets, watch app, watch complications, and watch app icon - Add price change badge (+/- percent) with green/red coloring on all widget sizes and watch app - Add 30-day high/low range row on large widget and watch app - Add end-point dot marker on sparkline for current price position - Polish typography spacing and chart proportions to match River quality - Chart data: ONE_MONTH range with smooth Catmull-Rom curves (140 points)
…watch The widget sparkline was using a different price conversion formula than the watch app, causing wrong price values (+82140% change) and a broken flat-line chart. Now uses the same (base / 10^offset) * multiple(currencyUnit) formula as the Flash price-history screen and watch app. Also switched from timestamp-based to index-based x-axis positioning so data points are evenly spaced — matching the watch chart exactly.
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.
Summary
Verification
git diff --check origin/main...HEADxcodebuild -workspace ios/LNFlash.xcworkspace -scheme 'FlashWatch Watch App' -configuration Debug -destination 'platform=watchOS Simulator,id=B12E90B2-3F78-4E36-874D-EC1835869416' -derivedDataPath /tmp/lnflash-watch-action-dd buildxcodebuild -workspace ios/LNFlash.xcworkspace -scheme FlashWidgetExtension -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -derivedDataPath /tmp/lnflash-watch-action-dd buildxcodebuild -workspace ios/LNFlash.xcworkspace -scheme FlashWidgetExtension -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -derivedDataPath /tmp/lnflash-watch-qr-ios-dd buildCurrent CI Notes
tsc -p .with TS5095 under the repo's current TypeScript config.ts-jestcannot load missingttypescript.Governement,Cantacts,Infor, andEnjoingin files outside this watch/widget scope.Notes
yarn tsc:checkwith the existing config hits the same TS5095 CI blocker.module: esnext,moduleResolution: bundler, andts-patchclears the immediate CI config blockers but exposes broad existing TypeScript errors across app/test files, so that config cleanup is intentionally not included in this PR.