Skip to content

Restore automatic Zwift Click discovery - #46

Open
sbroenne wants to merge 1 commit into
mainfrom
sbroenne-fix-click-discovery-regression
Open

Restore automatic Zwift Click discovery#46
sbroenne wants to merge 1 commit into
mainfrom
sbroenne-fix-click-discovery-regression

Conversation

@sbroenne

Copy link
Copy Markdown
Owner

What changed

  • give Click and Headwind independent startup discovery windows
  • apply the trainer's existing rule to optional accessories: one result is saved and connected automatically; multiple results require a choice
  • key the Settings discovery deadline to the active scan generation so it cannot remain on “Checking for others” forever
  • add a UI regression test for saving a sole discovered Click
  • record the physical iPhone/Click verification and upload TestFlight build 1.0 (18)

Validation

  • full Swift package test suite with coverage
  • full iPhone simulator UI suite
  • physical iPhone 17 Pro with the original Zwift Click that exposed the regression
  • build 1.0 (18) uploaded successfully to App Store Connect

Make optional accessory discovery independent, auto-select a sole Click with the trainer's existing rule, and bind Settings completion to each scan generation. Record the physical regression check and upload build 18.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 12cd380d-7f6c-46ea-b8fb-0e96b9b362ad
Copilot AI lite review requested due to automatic review settings August 21, 2026 07:18

Copilot AI 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.

Pull request overview

Restores reliable Zwift Click auto-selection by decoupling optional accessory discovery at startup and making Settings’ discovery timeout robust to missed “scanning started” transitions (keyed to scan generation), plus adds a UI regression test and updates release/documentation surfaces for TestFlight build 1.0 (18).

Changes:

  • Run Click and Headwind discovery independently at startup and apply the “single candidate auto-connect, otherwise ask” rule to accessories.
  • Replace Settings’ scanning-timeout scheduling with a scanGeneration/isScanning-keyed SwiftUI task so it can’t stick on “Checking for others…”.
  • Add a UI regression test + screenshot fixture for a single discovered Click; bump build number and update App Store / demo / development docs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
VirtualGearsUITests/VirtualGearsUITests.swift Adds a UI regression test for single-candidate Click discovery saving.
VirtualGearsProduct/VirtualGearsHomeView.swift Splits Click/Headwind startup discovery into independent async flows and reuses TrainerPicker’s selection rule.
VirtualGearsProduct/VirtualGearsApp.swift Adds a screenshot fixture for the single-candidate Click scenario and stages Click scanning state/candidates.
VirtualGearsProduct/SetupView.swift Makes Settings discovery timeout keyed to (scanGeneration, isScanning) via .task(id:) and threads scanGeneration into the UI.
VirtualGearsProduct/ClickCentralService.swift Supports staged “scanning” behavior for DEBUG screenshot fixtures/tests.
VirtualGears.xcodeproj/project.pbxproj Bumps CURRENT_PROJECT_VERSION to 18.
docs/DEMO_VIDEO.md Updates demo video instructions for the latest TestFlight build (1.0 (18)).
docs/APP_STORE.md Updates TestFlight build number and records the discovery regression + fix and validation details.
DEVELOPMENT.md Records the real-device regression and the corrected behavior/verification.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +183 to +186
launch("-shotSettingsClickSingleCandidate")
assertVisible("screen.settings")
app.staticTexts["Zwift Click"].firstMatch.tap()

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.

2 participants