Skip to content

docs: say the nearby window extends only while no phone qualifies - #1573

Merged
ovitrif merged 1 commit into
masterfrom
docs/nearby-window-wording
Dec 2, 2026
Merged

ovitrif merged 1 commit into
masterfrom
docs/nearby-window-wording

Conversation

@ovitrif

@ovitrif ovitrif commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Refs: #1568, synonymdev/bitkit-android#2225

Description

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

  • SwiftFormat lint on the changed file passes

Models used

  • Planning/scoping: Not used
  • Implementation: Claude Opus 5.5 (reasoning: medium)
  • Review: Gemini 4 Neon (reasoning: high)
  • Review rounds: 1

Verified: swiftformat --lint on the changed file
@ovitrif ovitrif self-assigned this Dec 1, 2026
@ovitrif
ovitrif requested review from a team, ben-kaufman and piotr-iohk and removed request for a team December 1, 2026 21:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T21:08:16.849516Z b208491 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] This documentation-only change appears safe to merge.

Summary

Clarifies when the nearby-payment scanner extends its selection window.

  • Nearby payment notes explain when phone selection keeps going.

Reviews (1) · Last reviewed commit: "docs: say the nearby window extends only..." · Reviewed by Greptile

@talosmachina talosmachina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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": connectToStrongest re-arms only when bestID == nil, and closest returns nil unless some peer has minReadings readings and an eligible median, so "qualifies" means both, as the doc says.
  • "Some peer has fewer than minReadings": the same condition requires needsMoreReadings(readings), which is readings.values.contains { $0.count < minReadings }.
  • "In selectionWindow steps, up to maxSelectionWindow": scheduleSelection sleeps selectionWindow (0.5 s) per step, and isWindowOpen compares against maxSelectionWindow (2 s) from selectionStartedAt, 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 isWindowOpen false, so collection stops at roughly 2 s, as written.
  • The needsMoreReadings comment 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 piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ovitrif

ovitrif commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

Merging: approved on b208491 with CI green.

@ovitrif
ovitrif merged commit 33c9a47 into master Dec 2, 2026
22 checks passed
@ovitrif
ovitrif deleted the docs/nearby-window-wording branch December 2, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants