Skip to content

chore: restore master SwiftFormat compliance - #1040

Merged
ovitrif merged 1 commit into
masterfrom
chore/settings-format-20261020
Oct 20, 2026
Merged

ovitrif merged 1 commit into
masterfrom
chore/settings-format-20261020

Conversation

@ben-kaufman

Copy link
Copy Markdown
Contributor

Description

  • Apply SwiftFormat 0.64.0 to the Electrum/RGS connection guards and the Activity timestamp conditional so current master passes the repository formatting check. Guard evaluation order and behavior are unchanged.

The settings findings reproduce on bcaa461b, from #871. The Activity formatting finding also reproduces on that base. These failures affect merge-checkout CI for unrelated PRs, including #1025.

Design

N/A — no UI changes.

Preview

N/A

QA Notes

Journeys

N/A — no user-visible behaviour change.

Manual Tests

N/A

Automated Checks

N/A — formatting-only correction; no test coverage changes.

@ovitrif

ovitrif commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

@ben-kaufman I closed #1035 in favour of this PR, since it covers all three files; it's ready to undraft and merge once approved.

@ovi-reviewer ovi-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: ✅ Approve

Findings: None.

QA for 035b8e6:

Test 1: SwiftFormat compliance ✅ Repository lint passes with SwiftFormat 0.64.0.

Checked with swiftformat --lint .. The three changed files fail lint at the base; applying SwiftFormat 0.64.0 to those base files produces the PR's contents byte for byte.

Test 2: Simulator build ✅ Bitkit Debug builds successfully for the iOS simulator.

Built the reviewed head with Xcode 27.0 for the arm64 iOS simulator. This was a compile-only check; the app was not launched.

Device journeys and manual tests were not run: the PR lists none, and the change has no user-visible behavior. No runtime behavior was exercised.

Full review of bcaa461b..035b8e6, covering all three changed files and the connection lifecycle code they call. The guard conditions retain their order and generation checks around await; the Activity spacer condition is unchanged.

Android twin: none linked; this is an iOS SwiftFormat correction with no cross-platform behavior change.


Reviewed by gpt-6.1-sol-high via gh-pr-review-loop skill
Commands: @ovi-reviewer review · test · retest

@ovitrif ovitrif 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.

utAck

@ben-kaufman
ben-kaufman marked this pull request as ready for review October 20, 2026 15:23
@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This formatting-only PR appears safe to merge.

Summary

Applies formatting changes to three Swift files.

  • These Swift files now match the repository formatter.

No actionable issues found. Build and formatting checks were not run.

Reviews (1) · Last reviewed commit: "chore: restore master SwiftFormat compli..." · Reviewed by Greptile

@ovitrif ovitrif added this to the 3.1.0 milestone Oct 20, 2026
@ovitrif

ovitrif commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Triage: milestone 3.1.0, with the lint work in #1028. It turns master's SwiftFormat check green, after which SwiftFormat becomes a required check. It closes no issue, so this PR carries the milestone itself. Not a release blocker.

@talosmachina talosmachina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No findings. Folds the split Electrum/RGS connection guards into one guard and braces the ActivityRow spacer so master passes SwiftFormat 0.64.0. Reviewed 035b8e6, full tier, reasoned from the code and CI (iOS does not build on this reviewer's host).

What I checked, and 2 candidates I ruled out

Read in full: ElectrumSettingsScreen.swift, RgsSettingsScreen.swift, the changed ActivityRowContent body
CI: SwiftFormat, validate, Greptile green; Run Tests, Run Integration Tests and build-local still pending at review time

Ruled out

  • Guard order changed: Swift evaluates a guard condition list left to right and stops at the first false one, so isCurrentServerConnection(generation) still short-circuits before the await, and the post-await generation check still runs after it. Same behaviour as the two separate guards.
  • Layout change in ActivityRow: if !stacked { Spacer(minLength: 0) } and the braced form build the same view tree.

Merge confidence: 4/5, the unit and integration test jobs had not finished when I reviewed.

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving. The change is formatting only:

  • ElectrumSettingsScreen / RgsSettingsScreen: each pair of guards becomes one guard with the conditions in the same order, so the generation checks before and after the await behave as before.
  • ActivityRow: the spacer's if body moves onto its own lines and builds the same views.

SwiftFormat, Run Tests and validate are green at 035b8e6. Merging this clears the SwiftFormat failure on the other open PRs.

Device gate: no device check needed (formatting only); perf: not relevant; l10n: no UI text changed.

@ovitrif
ovitrif enabled auto-merge October 20, 2026 16:19
@ovitrif
ovitrif merged commit 039c7b5 into master Oct 20, 2026
35 of 38 checks passed
@ovitrif
ovitrif deleted the chore/settings-format-20261020 branch October 20, 2026 16:38
@ovitrif

ovitrif commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Admin-merged this PR before its integration and e2e runs finished, and cancelled those runs.

Why: master's SwiftFormat check was red after #1028 began enforcing it, which turned the lint check red on every open iOS PR. This PR only reformats three Swift files and touches no logic. It was approved, its SwiftFormat, unit tests and build were green, and the e2e queue on the self-hosted runner was several hours long. Cancelling its runs freed that runner for other PRs.

Follow-ups:

  • master's SwiftFormat check is green on 039c7b5, so SwiftFormat is now a required status check on master, next to Run Tests, Run Integration Tests and e2e-status.
  • PRs that were red only because of master's formatting turn green once they sync with master.

@ovitrif

ovitrif commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

SwiftFormat is now a required check on master (ruleset default, id 1395861), next to e2e-status, Run Integration Tests and Run Tests, now that master passes it since this PR. A PR whose own Swift files are unformatted can no longer merge and turn master red again.

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.

4 participants