Skip to content

Fix launch and terrain hangs; restore iPad UI tests#6

Merged
RISCfuture merged 1 commit intomainfrom
fix/hangs-and-ipad-ui-tests
Apr 21, 2026
Merged

Fix launch and terrain hangs; restore iPad UI tests#6
RISCfuture merged 1 commit intomainfrom
fix/hangs-and-ipad-ui-tests

Conversation

@RISCfuture
Copy link
Copy Markdown
Contributor

Summary

Resolves two open Sentry issues and the pre-existing iPad UI test failures:

  • SF50-TOLD-28 (fatal launch hang, 3 users, ≥2000 ms main-thread block): App.init() no longer synchronously bulk-deletes 9 SwiftData entities on the main context when schemaVersion is out of date. NavDataLoader.resetData() already performs the same deletes on its @ModelActor during load, so the pre-launch purge was redundant.
  • SF50-TOLD-27 (2.4–3.2 s terrain hang): TerrainDataLoader.refreshAvailableRegions() now runs its 22-file FileManager.fileExists scan on Task.detached, and the URL builders / app-group reads are nonisolated.
  • iPad UI tests (0/47 passing on main): iOS 26 Liquid Glass reports keyboard-focused TextFields as not-hittable, so clearAndType's tap(withNumberOfTaps: 3) was failing. Fall back to typeKey(\"a\", modifierFlags: .command), and enable ConnectHardwareKeyboard in CI so the synthetic keyboard event is delivered.

Test plan

  • Unit tests: 317/317 passed (Xcode MCP RunAllTests)
  • iPhone 17 Pro UI tests: 47/47 passed (iOS 26.4)
  • iPad Pro 13-inch (M5) UI tests: 47/47 passed (iOS 26.4)
  • Cold launch with stale schemaVersion on iPhone: 300 ms (was ≥2000 ms watchdog kill)
  • Cold launch with stale schemaVersion on iPad: 355 ms

🤖 Generated with Claude Code

Addresses two open Sentry issues and the pre-existing iPad UI test
failures:

- SF50-TOLD-28 (fatal): drop the synchronous purgeStaleNavigationData
  call from App.init(); NavDataLoader.resetData() already performs the
  same deletes on its @Modelactor during load, so no main-thread work
  at launch is required.

- SF50-TOLD-27: move the 22-file TerrainRegion filesystem scan in
  refreshAvailableRegions() onto Task.detached, and mark the URL
  builders and app-group reads nonisolated so they can run off the
  main actor.

- iPad UI tests (all 47 failing at Extensions.swift:120): iOS 26
  Liquid Glass reports keyboard-focused TextFields as not-hittable, so
  clearAndType's triple-tap select-all fails. Fall back to Cmd+A via
  typeKey, and enable ConnectHardwareKeyboard in CI so the synthetic
  keyboard event is delivered.

Verified: unit tests 317/317, iPhone UI 47/47, iPad UI 47/47. Cold
launch with stale schemaVersion on iPhone/iPad reduced from a watchdog
kill (≥2000ms) to ~300ms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@RISCfuture RISCfuture merged commit 5093289 into main Apr 21, 2026
4 checks passed
@RISCfuture RISCfuture deleted the fix/hangs-and-ipad-ui-tests branch April 21, 2026 07:00
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.

1 participant