Restore automatic Zwift Click discovery - #46
Open
sbroenne wants to merge 1 commit into
Open
Conversation
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
There was a problem hiding this comment.
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() | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Validation