Repository navigation
feat: spark connection and app status design - #1360
Conversation
Implement the v64 frames for Spark in Lightning Connections and App Status: Spark sits last under Open Connections with receiving "no limit", its detail screen gains Status, Provider, Balance and Deposits sections with Transfer To Savings and Force Transfer To Savings, and App Status names the row "Lightning Provider (Spark)", shows a running force transfer on it, and adds the version footer. The menu's status colour now counts Spark. Verified: swiftformat lint, validate-translations, Debug simulator build
Verified: swiftformat lint
Verified: swiftformat lint
A claimed deposit's row shows the amount sent on-chain, not the amount after the claim fee, and the txid row shows its first and last 8 characters. The connection details and app status journeys match the Android wording. Verified: swiftformat --lint on the changed file
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Verified: none (changelog fragment only)
[Medium impact] The changes affect Spark’s settings and app-wide health indicator, not the transfer operations themselves. The PR appears safe to merge, with a non-blocking fix needed for receiving capacity shown while offline. Findings
SummaryUpdates Spark connection screens and App Status to show receiving capacity, deposit details, and force-transfer progress.
Reviews (1) · Last reviewed commit: "fix: show spark deposit sent amount and ..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d33bbae2a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A deposit still in the mempool reads Pending instead of 0/3 confirmations, as on Android. Verified: swiftformat --lint; simulator build (pass)
talosmachina
left a comment
There was a problem hiding this comment.
No findings. The iOS twin of synonymdev/bitkit-android#1964: Spark joins Open Connections with "no limit" receiving, the Spark connection screen follows the v64 frame, App Status carries the force transfer on the Spark row with a version footer, and the header status counts Spark. Reviewed 4fdd433, full tier, static: iOS does not build on Linux, so nothing was run here.
What I checked, and 6 candidates I ruled out
Read in full: the whole diff, plus AppStatusHelper (sparkStatus, exitStep, combinedAppStatus), SparkConnectionRow.isVisible, SparkManager.isReceiving, how deposits get their confirmations (deposits(unclaimed:claimed:), onchainConfirmations, applyBroadcastDeposits), String.ellipsis(maxLength:)
Call sites traced: SparkDepositRow (split into SparkWithdrawalRow and depositRows, no stale callers), the removed keys settings__status__exit__title, settings__status__exit__pending, lightning__spark_deposits_claimed / _pending (no references left), NetworkMonitor reaching SparkConnectionDetailView (injected app-wide in AppScene)
CI: SwiftFormat, validate and detect-changes green; Run Tests, Run Integration Tests and build-local still pending when I reviewed
Ruled out
- A just-broadcast deposit reads "0/3 confirmations": it did at
241cc9f, sinceapplyBroadcastDepositsandonchainConfirmationsboth produce0, andOptional.mapfell back to "Pending" only for nil.4fdd433filters zero out, so it now matches Android'stakeIf { it > 0u }and the shared journey. - The header's status turns red where Spark is unsupported:
combinedStatus(of:)drops nil before checking, andtestCombinedStatusCountsSparkpins it. - App Status shows both an exit row and a Spark row: the exit branch runs first in
sparkStatusRowand the plain Spark row is itselse, andcombinedAppStatususes the sameexitStepfor the header, so the two agree. - "no limit" during a force transfer: the header, the list bar and the BALANCE row all switched from
isReadytoisReceiving(isReady && !isExiting), the same condition Android uses. - Spark listed under Open Connections on a wallet with no channels but the empty state shown:
isEmptyalready includes!SparkConnectionRow.isVisible, and the section header now opens onSparkConnectionRow.isVisible, so the row has a section to land in. - The txid truncation differs from Android:
ellipsis(maxLength: 16)keeps 8 characters each side, asellipsisMiddle(17)does on Android; only the separator differs ("..." against "…"), which follows each platform's existing helper.
Merge confidence: 4/5. Run Tests had not finished when I reviewed, and the force transfer state on the Spark row was not run on a device (J3, per the PR's Gaps); AppStatusExitTests cover it.
Reviewer model: claude-opus-5-5
Reasoning effort: Unknown (the reviewing session's metadata does not record it)
Spark shows its receiving side and "no limit" only while the device is online, matching the Offline status on the same screen. Verified: AppStatusHelperTests and AppStatusExitTests on an iPhone 17 Pro simulator (pass); swiftformat --lint
coreyphillips
left a comment
There was a problem hiding this comment.
Two independent reviews, nothing blocking a merge.
worth doing, does not block
- move-to-spark journey still expects no open connection after the close (journeys/transfer/move-to-spark.xml:26).
journeys/transfer/move-to-spark.xml:26says to verify that "Lightning Connections shows no open connection and the Spark balance grew". This PR lists Spark under OPEN CONNECTIONS (LightningConnectionsView.swift:118,SparkConnectionRow.isVisibleis true whenever Spark is ready on regtest). So after the channel closes, the section still shows with "Spark via Breez" in it, and an agent driving this journey can fail the step even though the app is right. This PR changes the route that step checks, and CLAUDE.md asks such journeys to be updated in the same PR. The Android twin did not touch its copy either, so the wording should be changed on both sides to keep the prose identical. Something like: "shows no channel under OPEN CONNECTIONS, only Spark via Breez, whose balance grew by the moved amount". Found by reading the journey against the new list code. I did not run it. - Spark's full spending balance renders as a partial bar (Bitkit/Views/Settings/Advanced/SparkConnectionViews.swift:53-59)
nits
- Doc comment for sparkStatus now sits on isSparkReceiving (Bitkit/Utilities/AppStatusHelper.swift:98-104)
- ExitStatusStep doc no longer matches its keys (Bitkit/Utilities/AppStatusHelper.swift:25-29).
ExitStatusStepsays it is "named like its App Status subtitle key". After this PR,.pendingmaps tosettings__status__spark__exitandsettings__status__exit__pendingis gone (AppStatusView.swift:162), so the doc is stale.
|
@coreyphillips thanks.
Agreed. The transfer to savings and force transfer PR will change step 26 to "shows no channel under OPEN CONNECTIONS, only Spark via Breez, whose balance grew by the moved amount", on both apps so the wording stays identical. I'm not pushing it here because a push would dismiss the approval.
Agreed. That PR fixes the doc too.
Answered in their threads. |
coreyphillips
left a comment
There was a problem hiding this comment.
Rechecked after replies, with no new commit since a6dd3d9. Nothing blocking remains.
addressed
- Spark's full spending balance renders as a partial bar (Bitkit/Views/Settings/Advanced/SparkConnectionViews.swift:53-59). Rebutted: Your thread reply holds. I opened the Figma exports in the PR's Preview table. On both the Lightning Connections and Spark Via Breeze frames, the Spark bar shows a dim purple segment and a bright one for its 580 000 spending balance. The app screenshot draws it the same way. So the partial fill follows the design and is not a regression.
still open
- move-to-spark journey still expects no open connection after the close (journeys/transfer/move-to-spark.xml:26).
journeys/transfer/move-to-spark.xml:26says to verify that "Lightning Connections shows no open connection and the Spark balance grew". This PR lists Spark under OPEN CONNECTIONS (LightningConnectionsView.swift:118,SparkConnectionRow.isVisibleis true whenever Spark is ready on regtest). So after the channel closes, the section still shows with "Spark via Breez" in it, and an agent driving this journey can fail the step even though the app is right. This PR changes the route that step checks, and CLAUDE.md asks such journeys to be updated in the same PR. The Android twin did not touch its copy either, so the wording should be changed on both sides to keep the prose identical. Something like: "shows no channel under OPEN CONNECTIONS, only Spark via Breez, whose balance grew by the moved amount". Found by reading the journey against the new list code. I did not run it.journeys/transfer/move-to-spark.xml:26still says "Lightning Connections shows no open connection". You agreed and plan to fix the wording on both apps in the transfer to savings PR. Nothing has changed on this branch yet, so the stale step is still here. - Doc comment for sparkStatus now sits on isSparkReceiving (Bitkit/Utilities/AppStatusHelper.swift:98-104).
isSparkReceivingwas inserted between/// Nil where Spark is unsupported.andsparkStatus(AppStatusHelper.swift:98-104). The Bool function now carries a nil-return doc that does not apply to it, andsparkStatus, which can return nil, lost its doc. Move the line back abovesparkStatus./// Nil where Spark is unsupported.still sits aboveisSparkReceivingatAppStatusHelper.swift:98, andsparkStatusat line 104 has no doc. You agreed and deferred the fix to a later PR, so it is not fixed on this branch. - ExitStatusStep doc no longer matches its keys (Bitkit/Utilities/AppStatusHelper.swift:25-29).
ExitStatusStepsays it is "named like its App Status subtitle key". After this PR,.pendingmaps tosettings__status__spark__exitandsettings__status__exit__pendingis gone (AppStatusView.swift:162), so the doc is stale.AppStatusHelper.swift:25still saysExitStatusStepis "named like its App Status subtitle key". But.pendingmaps tosettings__status__spark__exitatAppStatusView.swift:162. You agreed and deferred the fix, and the doc is unchanged here.
Verified: validate-translations
coreyphillips
left a comment
There was a problem hiding this comment.
Rechecked after 1 new commit (1ded1ba). Nothing blocking remains.
still open
- move-to-spark journey still expects no open connection after the close (journeys/transfer/move-to-spark.xml:26).
journeys/transfer/move-to-spark.xml:26says to verify that "Lightning Connections shows no open connection and the Spark balance grew". This PR lists Spark under OPEN CONNECTIONS (LightningConnectionsView.swift:118,SparkConnectionRow.isVisibleis true whenever Spark is ready on regtest). So after the channel closes, the section still shows with "Spark via Breez" in it, and an agent driving this journey can fail the step even though the app is right. This PR changes the route that step checks, and CLAUDE.md asks such journeys to be updated in the same PR. The Android twin did not touch its copy either, so the wording should be changed on both sides to keep the prose identical. Something like: "shows no channel under OPEN CONNECTIONS, only Spark via Breez, whose balance grew by the moved amount". Found by reading the journey against the new list code. I did not run it.journeys/transfer/move-to-spark.xml:26still says to verify that "Lightning Connections shows no open connection". Commit 1ded1ba changes only Localizable.strings, and your comment does not address this journey. Spark is still listed under OPEN CONNECTIONS after the close, so the step's wording still needs updating. - Doc comment for sparkStatus now sits on isSparkReceiving (Bitkit/Utilities/AppStatusHelper.swift:98-104).
isSparkReceivingwas inserted between/// Nil where Spark is unsupported.andsparkStatus(AppStatusHelper.swift:98-104). The Bool function now carries a nil-return doc that does not apply to it, andsparkStatus, which can return nil, lost its doc. Move the line back abovesparkStatus.Bitkit/Utilities/AppStatusHelper.swift:98still has/// Nil where Spark is unsupported.aboveisSparkReceiving, which returns a non-optional Bool.sparkStatusat line 103 still has no doc. No code changed since a6dd3d9. - ExitStatusStep doc no longer matches its keys (Bitkit/Utilities/AppStatusHelper.swift:25-29).
ExitStatusStepsays it is "named like its App Status subtitle key". After this PR,.pendingmaps tosettings__status__spark__exitandsettings__status__exit__pendingis gone (AppStatusView.swift:162), so the doc is stale.Bitkit/Utilities/AppStatusHelper.swift:25still says ExitStatusStep is "named like its App Status subtitle key"..pendingstill maps tosettings__status__spark__exitatAppStatusView.swift:162, andsettings__status__exit__pendingno longer exists in any locale.
new since the last review
nits
- es and nl Spark trust paragraph uses formal address, unlike every other Spark string (Bitkit/Resources/Localization/es.lproj/Localizable.strings:352)
The Latest Full Data Backup row uses the cloud-with-check icon and reads its date as the frame does ("Jan 2, 2023 at 11:45" in US English), in each locale's own order elsewhere.
Verified: swiftformat --lint; date template checked for en_US, en_GB and de_DE
|
Pushed 16aaeba after a design check against the v64 frame. The Latest Full Data Backup row on App Status now uses the frame's cloud-with-check icon (the same as Android). Its date reads the way the frame does, "Jan 2, 2023 at 11:45" in US English, using each locale's own order and words elsewhere. The push dismissed the approval, so I've asked for a review again; new stills follow in the description. |
coreyphillips
left a comment
There was a problem hiding this comment.
Rechecked after 1 new commit (16aaeba). Nothing blocking remains.
still open
- move-to-spark journey still expects no open connection after the close (journeys/transfer/move-to-spark.xml:26).
journeys/transfer/move-to-spark.xml:26says to verify that "Lightning Connections shows no open connection and the Spark balance grew". This PR lists Spark under OPEN CONNECTIONS (LightningConnectionsView.swift:118,SparkConnectionRow.isVisibleis true whenever Spark is ready on regtest). So after the channel closes, the section still shows with "Spark via Breez" in it, and an agent driving this journey can fail the step even though the app is right. This PR changes the route that step checks, and CLAUDE.md asks such journeys to be updated in the same PR. The Android twin did not touch its copy either, so the wording should be changed on both sides to keep the prose identical. Something like: "shows no channel under OPEN CONNECTIONS, only Spark via Breez, whose balance grew by the moved amount". Found by reading the journey against the new list code. I did not run it.journeys/transfer/move-to-spark.xml:26still says "Lightning Connections shows no open connection". Spark via Breez still lists under OPEN CONNECTIONS, and there was no reply or change on this point. - Doc comment for sparkStatus now sits on isSparkReceiving (Bitkit/Utilities/AppStatusHelper.swift:98-104).
isSparkReceivingwas inserted between/// Nil where Spark is unsupported.andsparkStatus(AppStatusHelper.swift:98-104). The Bool function now carries a nil-return doc that does not apply to it, andsparkStatus, which can return nil, lost its doc. Move the line back abovesparkStatus.AppStatusHelper.swift:98still carries/// Nil where Spark is unsupported.aboveisSparkReceiving, which returns a non-optional Bool.sparkStatusat line 104 is still undocumented. - ExitStatusStep doc no longer matches its keys (Bitkit/Utilities/AppStatusHelper.swift:25-29).
ExitStatusStepsays it is "named like its App Status subtitle key". After this PR,.pendingmaps tosettings__status__spark__exitandsettings__status__exit__pendingis gone (AppStatusView.swift:162), so the doc is stale.AppStatusHelper.swift:24still says the step is "named like its App Status subtitle key"..pendingstill maps tosettings__status__spark__exit, so the doc remains stale. - es and nl Spark trust paragraph uses formal address, unlike every other Spark string (Bitkit/Resources/Localization/es.lproj/Localizable.strings:352). The new
lightning__spark_trustin es and nl uses formal address, while the other Spark strings in those files use informal address. In es (es.lproj/Localizable.strings:352) it says "Su saldo de gasto ... requiere que inicie". The neighbouring Spark strings say "tu saldo de gastos", for examplelightning__spark_deposit__waitingat line 344. In nl (nl.lproj/Localizable.strings:365) it says "Uw bestedingssaldo ... moet u zelf", while the other 27lightning__spark*lines use "je". The master versions used neutral wording ("Este saldo", "Dit saldo"), so this commit introduces the mismatch. es also changes "saldo de gastos" to "saldo de gasto" here, though es-419 keeps "saldo de gastos". I found this by grepping thelightning__spark*keys in each file for the informal and formal pronouns. Both files passplutil -lintandnode scripts/validate-translations.js, so this is only a wording issue. Something like "Tu saldo de gastos usa Spark ... que inicies" and "Je bestedingssaldo gebruikt Spark ... moet je zelf" would match the rest of the screen. Codex still sees it: The reply establishes that formal address predominates elsewhere in these files. It does not resolve the Spark copy's local mismatch, which remains atBitkit/Resources/Localization/es.lproj/Localizable.strings:352andBitkit/Resources/Localization/nl.lproj/Localizable.strings:365.
new since the last review
worth doing, does not block
- Backup date now forces a 24-hour clock, even in 12-hour locales (Bitkit/Views/Settings/AppStatusView.swift:192-193)
nits
rewindicon asset is now unused (Bitkit/Assets.xcassets/icons/rewind.imageset/Contents.json). The App Status backup row was the only user of therewindimage, and this commit moves it tocloud-check.git grep -w rewindnow finds onlyBitkit/Assets.xcassets/icons/rewind.imageset/Contents.jsonand an unrelated code comment. The imageset can be deleted.
|
Merged: approved by @coreyphillips on 16aaeba, required checks green. I resolved the backup-time thread, which was answered there: the locale hour-cycle fix ( |
Refs: #1270
Twin: synonymdev/bitkit-android#1964
Description
Out of Scope
Design
Figma page "Bitkit - Progress v64" in the Bitkit Wallet file:
Preview
The force transfer, connecting, offline, empty and pending deposit states were captured on a local build that reports each state, since a regtest wallet cannot reach them on demand (a real force transfer cannot be cancelled);
AppStatusExitTestsandAppStatusHelperTestscover the states themselves. Rows the frames show degraded (Internet, nodes, backup) stay healthy in those stills.J1, Spark connection details (2x):
b-j-spark-connection-details2x.mp4
J2, App Status Spark row (2x):
j2.mp4
J4, Force Transfer To Savings up to the swipe (2x):
b-j-spark-emergency-exit2x.mp4
Figma notes
Every note above the v64 frames for these flows, with what this PR does about it.
Changelog v64
Settings > Advanced
Support & App Status
Menu
Subscriptions
QA Notes
Setup
SPARK_CHAIN_SERVICE_URL, so Spark watches its own regtest chain, on a wallet with no channels.SparkDepositAddress), and wait about 3 minutes for Spark to claim it.Journeys
settings/spark-connection-details.xml— Spark under Open Connections, the detail screen's sections and footer (passed on d33bbae)settings/app-status-spark-row.xml— row title, "Connected", version footer (passed on 16aaeba)settings/app-status-emergency-exit.xml— the force transfer on the Spark rowtransfer/spark-emergency-exit.xml— "Force Transfer To Savings" label only (passed on d33bbae, up to the swipe)Manual Tests
Automated Checks
swiftformat --lint,node scripts/validate-translations.js,AppStatusHelperTests,AppStatusExitTests(pass)Evidence
e57befda…2e58d5cawith Deposit ₿ 200 000 and Claim fee ₿ 99; tapping it opens the block explorer at that txid; the footer shows Transfer To Savings and the outlined Force Transfer To Savings with its warning icon.Gaps
AppStatusExitTestscover the Spark row in that state.AppStatusHelperTestscover the statuses.Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium),Claude Sonnet 5.5(reasoning:high)Claude Sonnet 5.5(reasoning:high)