Skip to content

fix: mobile list scrolling, relay device env label and add ui tests to mobile#46

Merged
sirily11 merged 4 commits into
mainfrom
app-navigation-fix
May 22, 2026
Merged

fix: mobile list scrolling, relay device env label and add ui tests to mobile#46
sirily11 merged 4 commits into
mainfrom
app-navigation-fix

Conversation

@sirily11
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 22, 2026 05:45
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rxcode Ready Ready Preview, Comment May 22, 2026 6:14am

Request Review

@autopilot-project-manager autopilot-project-manager Bot added bug Something isn't working enhancement New feature or request labels May 22, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread relay-server/push.go
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")
}
}
@sirily11 sirily11 force-pushed the app-navigation-fix branch from 315880c to 54f820d Compare May 22, 2026 06:13
@sirily11 sirily11 merged commit d7aea02 into main May 22, 2026
10 checks passed
@sirily11 sirily11 deleted the app-navigation-fix branch May 22, 2026 06:23
@sirily11
Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants