Repository navigation
docs: say the nearby window extends only while no phone qualifies - #1573
Conversation
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. |
Confidence Score: 5/5
[Low impact] This documentation-only change appears safe to merge. SummaryClarifies when the nearby-payment scanner extends its selection window.
Reviews (1) · Last reviewed commit: "docs: say the nearby window extends only..." · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Rewords the scanner's doc comments and Docs/nearby-payments.md so the selection window is described as extending only while no phone qualifies and some phone still has fewer than 3 readings. Reviewed b208491, light tier. Static review: iOS does not build on Linux, so nothing was built or run.
What I checked, and 2 candidates I ruled out
Read in full: Bitkit/Services/NearbyPaymentScanner.swift at the head.
Claims checked against code
- "While no peer qualifies yet":
connectToStrongestre-arms only whenbestID == nil, andclosestreturns nil unless some peer hasminReadingsreadings and an eligible median, so "qualifies" means both, as the doc says. - "Some peer has fewer than
minReadings": the same condition requiresneedsMoreReadings(readings), which isreadings.values.contains { $0.count < minReadings }. - "In
selectionWindowsteps, up tomaxSelectionWindow":scheduleSelectionsleepsselectionWindow(0.5 s) per step, andisWindowOpencompares againstmaxSelectionWindow(2 s) fromselectionStartedAt, set at the first discovery. - The numbers in the Markdown (500 ms, 2 s, 3 readings, -75 dBm) match the constants.
Ruled out
- Window can run past 2 s: the check happens at each 0.5 s tick, and the tick at about 2 s finds
isWindowOpenfalse, so collection stops at roughly 2 s, as written. - The
needsMoreReadingscomment misdescribes the function: it now says what the function returns and, separately, how the caller uses it; both are true.
CI: SwiftFormat and validate green; the test jobs were still pending at review time and do not cover comments.
Merge confidence: 5/5, comments and docs only, every reworded claim matches the scanner code.
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at b208491.
No new actionable code findings.
The change updates only doc comments in Bitkit/Services/NearbyPaymentScanner.swift and the Bluetooth LE central selection-window wording in Docs/nearby-payments.md, with no executable code changes. Every reworded claim matches the scanner implementation at b208491 (connectToStrongest extends in selectionWindow 500 ms steps up to maxSelectionWindow 2 s only while closest(readings) is nil and needsMoreReadings(readings) finds a peer with fewer than minReadings 3 readings, with eligibility at -75 dBm or stronger) and resolves the wording nit from #1568.
Cross-platform parity: compared Docs/nearby-payments.md and NearbyPaymentScanner.swift against the Android twin synonymdev/bitkit-android#2225 at 4cf623f (docs/nearby-payments.md, NearbyScanner.kt, and NearbyProtocol.kt). Both copies of nearby-payments.md are byte-for-byte identical, and the scanner doc comments align with the shared selection-window condition on both platforms.
Validation and limitations: verified diff hygiene locally (git diff --check clean) and inspected the passing SwiftFormat CI run for b208491. Local Xcode build, iOS unit tests, and SwiftFormat were not executed in this Linux code-only environment, and the PR's CI test jobs were still pending at review time; no new runtime or automated tests are warranted because no executable code changed.
Device testing: not performed in this review (not required — documentation and doc-comment changes only).
Reviewer model: gemini-4-neon
Reasoning effort: high
|
Merging: approved on b208491 with CI green. |
Refs: #1568, synonymdev/bitkit-android#2225
Description
nearby-payments.mdand the scanner's comments to match the code: the selection window extends in 500 ms steps, up to 2 s, only while no phone qualifies yet and some phone has fewer than 3 readings. Before, they said it extends whenever a phone is short of readings (raised on synonymdev/bitkit-ios#1568).nearby-payments.mdstay identical; fix: connect bluetooth nearby payments at close range bitkit-android#2225 carries the Android side.Design
N/A — no UI changes.
Preview
N/A — no user-visible changes.
QA Notes
Journeys
N/A
Manual Tests
N/A — docs and comments only.
Automated Checks
Models used
Claude Opus 5.5(reasoning:medium)Gemini 4 Neon(reasoning:high)