fix: mobile list scrolling, relay device env label and add ui tests to mobile#46
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR improves the mobile UX around thread/chat scrolling, propagates the APNs environment end-to-end (mobile → desktop → relay), and adds a CI-backed mobile UI test harness that runs against an in-process mock relay server.
Changes:
- Add RxCodeMobile UI tests (iPhone + iPad) powered by an in-process WebSocket mock relay + deterministic fixtures, plus GitHub Actions wiring to run them on simulators.
- Fix/strengthen mobile chat scrolling behaviors (initial scroll-to-bottom, load-more restoration, and “pin sent message” behavior) and add accessibility identifiers for reliable UI automation.
- Track and surface APNs environment per paired device; route pushes via the correct APNs endpoint (sandbox vs production) in the relay and include the environment in push requests.
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| RxCodeMobileUITests/Support/UITestRunner.swift | New UI test bootstrapping helper that starts a mock relay server and launches the app in mock mode. |
| RxCodeMobileUITests/Support/MobileAppRobot.swift | New page-object “robot” abstraction to make UI tests readable and resilient. |
| RxCodeMobileUITests/RxCodeMobileUITests.swift | Replace template tests with a real smoke test validating the mock pipeline reaches main UI. |
| RxCodeMobileUITests/Mock/MockRelayServer.swift | New in-process mock WebSocket relay server that decrypts/encrypts RxCodeSync payloads and serves canned snapshots. |
| RxCodeMobileUITests/Mock/MockFixtures.swift | New deterministic fixtures used by the mock relay server for UI testing. |
| RxCodeMobileUITests/iPhoneNavigationUITests.swift | New iPhone-specific navigation flow tests (tab-based back navigation). |
| RxCodeMobileUITests/iPadNavigationUITests.swift | New iPad-specific navigation flow tests (split-view column persistence). |
| RxCodeMobile/Views/SyncLoadingView.swift | Make splash animations task-driven and cancelable to avoid runaway animation scheduling. |
| RxCodeMobile/Views/SessionsList.swift | Add accessibility identifier to support UI tests and screen detection. |
| RxCodeMobile/Views/RootView.swift | Fix navigation path construction so compact navigation preserves Projects → Threads → Chat hierarchy. |
| RxCodeMobile/Views/ProjectsSidebar.swift | Add per-project accessibility identifiers on tappable elements for UI automation. |
| RxCodeMobile/Views/MobileChatView.swift | Major scroll/visibility/pinning changes to stabilize initial positioning and “load more” behavior; add UI-test identifiers. |
| RxCodeMobile/Views/MobileBriefingView.swift | Add accessibility identifiers for briefing list/detail elements for UI automation. |
| RxCodeMobile/Views/MobileBriefingDetailView.swift | Add accessibility identifiers for briefing detail and thread row elements for UI automation. |
| RxCodeMobile/Views/GlassThreadCard.swift | Add thread-row accessibility identifiers on the button/navigation link for UI tests. |
| RxCodeMobile/Support/UITestSupport.swift | New DEBUG-only launch-argument seam to override relay URL and clear persisted pairing during UI tests. |
| RxCodeMobile/State/MobileAppState+Pairing.swift | Include APNs environment in pair request payload; add UI-test pairing injection in DEBUG builds. |
| RxCodeMobile/State/MobileAppState.swift | Apply UI-test overrides before reading defaults; bypass Keychain identity in UI tests; expose current APNs environment. |
| RxCodeMobile/RxCodeMobileApp.swift | Suppress TipKit popovers during UI tests to avoid tap interception. |
| RxCodeMobile/AppDelegate.swift | Use centralized currentAPNsEnvironment when reporting APNs registration. |
| RxCode/Views/Settings/MobileSettingsTab.swift | Display APNs environment label in paired-device UI. |
| RxCode/Services/MobileSyncService+LiveActivity.swift | Route push endpoint per device (device relay URL fallback) and include environment on push requests. |
| RxCode/Services/MobileSyncService+EventDispatch.swift | Normalize and store APNs environment received from mobile device. |
| RxCode/Services/MobileSyncService.swift | Add push endpoint selection per device and normalize/store APNs environment; include env in push request/response models. |
| RxCode.xcodeproj/xcshareddata/xcschemes/RxCodeMobile.xcscheme | Switch scheme testing to explicit UI test plans (iPhone/iPad). |
| RxCode.xcodeproj/xcshareddata/xcschemes/RxCode.xcscheme | Add a mobile UI test plan reference to the main scheme. |
| RxCode.xcodeproj/project.pbxproj | Add test plan file references into the project structure. |
| relay-server/README.md | Document new apns_environment field and routing behavior in relay push API. |
| relay-server/push.go | Support per-request APNs environment routing and keep both sandbox/prod clients alive; add compatibility alias. |
| relay-server/push_test.go | Add unit tests for APNs environment parsing and fallback behavior. |
| relay-server/main.go | Adjust APNs sender log text to clarify the default environment behavior. |
| relay-server/k8s/configmap.yaml | Document APNS_PRODUCTION as a compatibility fallback only. |
| Packages/Tests/RxCodeSyncTests/PayloadTests.swift | Add a test asserting pair request JSON carries apnsEnvironment. |
| Packages/Sources/RxCodeSync/Protocol/Payload.swift | Extend PairRequestPayload to include optional apnsEnvironment. |
| Packages/Sources/RxCodeChatKit/InputBarView.swift | Remove shift-return callback wiring and rely on NSTextView behavior improvements. |
| Packages/Sources/RxCodeChatKit/IMETextView.swift | Improve Shift+Enter handling by inserting newline via NSTextView and keeping caret visible. |
| Packages/Sources/RxCodeChatKit/ChatMessageListView.swift | Add per-message IDs inside transient group rendering to support stable scrolling/anchor behavior. |
| MobileUITestPlan-iPhone.xctestplan | New test plan selecting the iPhone UI test subset. |
| MobileUITestPlan-iPad.xctestplan | New test plan selecting the iPad UI test subset. |
| .github/workflows/test.yaml | Add a matrix job to run RxCodeMobile UI tests on iPhone/iPad simulators and upload results. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+76
to
+82
| let readyMarker = app.staticTexts["Project Alpha"].firstMatch | ||
| let ready = XCTNSPredicateExpectation( | ||
| predicate: NSPredicate(format: "hittable == true"), | ||
| object: readyMarker | ||
| ) | ||
| _ = XCTWaiter().wait(for: [ready], timeout: 30) | ||
|
|
Comment on lines
+40
to
+41
| reference = "container:MobileUITestPlan.xctestplan"> | ||
| </TestPlanReference> |
Comment on lines
+728
to
+740
| } | ||
| isThreadLoadingOverlayVisible = true | ||
| threadLoadingHideTask = Task { @MainActor in | ||
| do { | ||
| try await Task.sleep(for: .milliseconds(500)) | ||
| } catch { | ||
| return | ||
| } | ||
| guard !Task.isCancelled else { return } | ||
| withAnimation(.easeInOut(duration: 0.25)) { | ||
| isThreadLoadingOverlayVisible = false | ||
| } | ||
| } |
Comment on lines
+228
to
+239
| func parseAPNSEnvironment(raw string, fallback APNSEnvironment) (APNSEnvironment, error) { | ||
| switch strings.ToLower(strings.TrimSpace(raw)) { | ||
| case "": | ||
| return fallback, nil | ||
| case "sandbox", "development", "dev": | ||
| return apnsEnvironmentSandbox, nil | ||
| case "production", "prod", "release": | ||
| return apnsEnvironmentProduction, nil | ||
| default: | ||
| return "", fmt.Errorf("unknown apns_environment") | ||
| } | ||
| } |
d717dfc to
315880c
Compare
315880c to
54f820d
Compare
Contributor
Author
|
🎉 This PR is included in version 1.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
No description provided.