Skip to content

feat: complete phone onboarding and provision the demo ride - #2254

Merged
timohueser merged 20 commits into
developfrom
codex/onboarding-ios
Oct 2, 2026
Merged

timohueser merged 20 commits into
developfrom
codex/onboarding-ios

Conversation

@timohueser

@timohueser timohueser commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

The phone guides a new rider from welcome through pairing, naming, optional device setup, a first route and a demo ride in the Library. The rider can skip each step after pairing. Setup resumes after relaunch and can be replayed from Settings. Returning riders open their local Library while the OBC reconnects.

This completes A1–A7 and F10 from #2214. Device onboarding #2237 is merged. The owner approves the screens on the real iPhone and OBC.

  • Explain Bluetooth before requesting permission. Connect to one nearby OBC or show a choice when several are found. Keep the system passkey flow and the existing rename command.
  • Handle the fixed /app link. Reuse the firmware updater and compatibility check. Compatible updates can wait. Incompatible firmware gates transfers while allowing setup to finish.
  • Bundle the full Grimsel Pass route. Provision one flagged demo ride through a factory-only image. Preserve its flag through sync and edits. Exclude demo rides from ride totals. Factory reset does not seed another demo.
  • Add the dismissible ready note and setup replay. Keep local routes, rides and empty states available offline. Reconcile catalogs only after the current connection has a verified identity.

The device test exposes a delayed “Sync interrupted, 0 of 5” without visible Bluetooth loss. Logs identify unreadableArchive: the bytes arrive, but an existing schema-4 phone archive lacks the new demo flag. The optional flag now defaults to false. Existing archives remain intact. The owner retries and confirms that the demo ride appears in the Library.

Ride LIST now reads identities only. Each missing ride needs one verified GET. Saved rides need no catalog GET. The former path downloads every ride for catalog metadata, then downloads missing rides again. Canceled queued operations send no commands after admission. Cancellation does not trigger link recovery. Trip uploads wait for reconnect identity before recording results and fail if a required transfer is missing. Phone archive errors have a separate message from download errors.

Factory reset removes routes, trips, rides, retained personal revisions and metadata in bounded card commits. It preserves maps, firmware packages and StoreId. Settings clear only after deletion succeeds. Failed deletion offers Retry. The factory-only seed image also pets an inherited watchdog after a warm reset.

Device checks:

  • The owner completes the first-use path and approves the screens. Pairing, naming and the demo route upload pass. The QR opens the expected coming-soon webpage.
  • Demo ride sync passes after the archive fix. Existing phone archives remain available.
  • Factory provisioning completes on the board. The seed image stays alive beyond one watchdog period. The final normal firmware is then flashed.
  • Factory reset and restart pass. Logs show zero routes, trip folders and rides, and a cleared bond. The owner confirms that the map still draws.
  • Canceling the first passkey prompt and then retrying succeeds. Saved rides remain in the phone Library after reset and re-pairing.
  • The owner interrupts the Grimsel Pass route upload by disabling iPhone Bluetooth, enables it again, and confirms that Send again completes and the route appears on the OBC.

Validation on 7178c2fcf:

  • swift test --no-parallel in companion-ios/Packages/OBCKit: 341 XCTest and 559 Swift Testing tests pass.
  • obc test -p obc-app, obc test -p obc-storage, and obc test -p obc-host-core: 1,197, 214 and 137 tests pass, plus one doc-test. Tests cover archive flags and failures, queued cancellation, reconnect identity, required trip transfers, reset receipts, and deletion across bounded commits and remounts while keeping system bytes.
  • cargo clippy -p obc-app -p obc-storage -p obc-host-core --all-targets -- -D warnings passes. Board cargo clippy --locked -- -D warnings and the same command with --features debug-uart pass. Workspace and board formatting pass.
  • obc companion-core aarch64-apple-ios, Release device xcodebuild build, app installation, obc flash factory-demo-ride and obc flash pass. The test app uses the Personal Team. A temporary generated project omits Associated Domains; the committed entitlement is unchanged.
  • Shipping resource guards pass: 1,969,508 / 2,019,328 image bytes, with 49,820 bytes remaining. No base image is rebuilt.
  • obc shot --check: all 447 frames match after visual review of the three changed reset translations. obc suites check, obc docs check, obc prose --check, python3 docs/build_docs.py --check-links, dependency direction, catalog ownership, card scheduler, render keys, one-home, screen vocabulary and git diff --check pass.
  • The affected test plan and obc ready --base a8f8d69bd --dry-run are inspected. Full workspace tests, downstream suites and all simulator UI suites are not repeated locally for this delta. CI run 36687955334 passes the selected cross-package matrix, all iOS builds and screen comparison. The original implementation also passes whole pairing/onboarding UI suites in light mode and in dark mode with large accessibility text.

Public docs changed: yes, in separate docs: commits. They describe the demo flag, factory provisioning and reset deletion scope, and refresh the bundled route-import capture.

The production universal-link issue #2233 remains open. It needs the release Apple Team ID, App Store/TestFlight destination and AASA hosting. Until those exist, the QR opens the fallback webpage. Sensor and OTA failure cases are not repeated on hardware. Translation proofreading is deferred. The owner accepts the SYS-049 exception for hiding device Settings during first-use setup. The onboarding requirement suggestion awaits the owner; no coverage approval is claimed.

Closes #2225, #2226, #2227, #2228, #2229, #2230, #2231, #2232.

Requirements: SYS-038, SYS-046

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1596fb84-1f50-436f-ba33-aac574e263f1

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@timohueser

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Base automatically changed from claude/zu-skills-install-x0qn6t to develop September 28, 2026 22:42
@timohueser

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@timohueser
timohueser marked this pull request as ready for review September 30, 2026 09:05
@timohueser
timohueser enabled auto-merge October 2, 2026 06:40
@timohueser
timohueser merged commit 2368248 into develop Oct 2, 2026
32 checks passed
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.

Onboarding F10: factory demo ride on the OBC

1 participant