-
Notifications
You must be signed in to change notification settings - Fork 0
Fix image proxy WebView interception and add Cloudflare WARP ToS consent #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Fix WebView blockNetworkLoads bug that prevented proxy interception - Add Cloudflare WARP Terms of Service consent dialog - Create integration tests for image proxy feature - Create E2E tests for ToS consent flow - Update documentation Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
|
@copilot The Android UI testing CI failed. Please properly address the issues in the failed CI run as well as any potential issues that could arise in future CI/test case steps once the current issues are fixed. Please fix & test another issue with the email WebView view that if the user clicks an outlink embedded in the email, the app does nothing; the expected behavior is to open the link using the default browser, and a long press of the link would prompt the user to select whether to open the link or to copy into clipboard (follow conventional/canonical UI/UX best practices). 8m 26s
pixel7Api34 Tests 0/47 completed. (0 skipped) (0 failed)
org.joefang.letterbox.CloudflareTermsConsentE2ETest > toSAlreadyAccepted_noDialogShownWhenEnablingProxy[pixel7Api34] FAILED pixel7Api34 Tests 11/47 completed. (0 skipped) (1 failed)
org.joefang.letterbox.CloudflareTermsConsentE2ETest > disablingProxy_afterToSAccepted_noDialogShown[pixel7Api34] FAILED pixel7Api34 Tests 12/47 completed. (0 skipped) (2 failed)
org.joefang.letterbox.CloudflareTermsConsentE2ETest > tosDialogContainsLinkToCloudflareTerms[pixel7Api34] FAILED pixel7Api34 Tests 13/47 completed. (0 skipped) (3 failed)
org.joefang.letterbox.CloudflareTermsConsentE2ETest > enablingPrivacyProxy_withoutToSAccepted_showsTermsDialog[pixel7Api34] FAILED pixel7Api34 Tests 14/47 completed. (0 skipped) (4 failed)
org.joefang.letterbox.CloudflareTermsConsentE2ETest > acceptingToS_enablesProxyAndSavesConsent[pixel7Api34] FAILED pixel7Api34 Tests 15/47 completed. (0 skipped) (5 failed)
org.joefang.letterbox.CloudflareTermsConsentE2ETest > decliningToS_keepsProxyDisabledAndNoConsent[pixel7Api34] FAILED pixel7Api34 Tests 17/47 completed. (0 skipped) (6 failed)
org.joefang.letterbox.ImageProxyIntegrationTest > emailWithRemoteImages_alwaysLoadEnabled_noBannerShown[pixel7Api34] FAILED pixel7Api34 Tests 38/47 completed. (0 skipped) (7 failed)
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_10-1768626226356.json [Incubating] Problems report is available at: file:///home/runner/work/Letterbox/Letterbox/build/reports/problems/problems-report.html
Execution failed for task ':app:pixel7Api34StagingDebugAndroidTest'.
BUILD FAILED in 8m 25s You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/9.0.0/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. Please implement fixes and test cases (mostly integration & end-to-end tests) to verify your fix. Follow best practices and write idiomatic code with comprehensive test & documentation coverage, and update existing documents & create new documents for all design decisions you made during inspecting & fixing the codebase. Make sure all implementations are correct, secure, and efficient especially around the FFI boundary. Analyze carefully on performance impacts and implement the most efficient design following best practices. |
- Fix CloudflareTermsConsentE2ETest to use test tags for Switch components - Add test tags to privacy proxy and always load switches - Handle SecurityException when app lacks INTERNET permission - Add outlink click handling to open links in external browser - Add long-press context menu for links and images (copy/open) - Add LinkHandlingE2ETest for link interaction tests - Update ImageProxyIntegrationTest to account for no INTERNET permission - Update documentation with link handling section Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
- Extract openUrlInBrowser and copyToClipboard helper functions - Simplify showLinkContextMenu and showImageContextMenu - Fix inconsistent Assert import in ImageProxyIntegrationTest Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Fixed in commits 1d13a96 and 6515378. CI Test Failures Fixed:
Outlink Click Handling Added:
New Tests:
|
|
@copilot The Android UI testing CI failed. Please properly address the issues in the failed CI run as well as any potential issues that could arise in future CI/test case steps once the current issues are fixed. Run ./gradlew pixel7Api34StagingDebugAndroidTest
pixel7Api34 Tests 0/50 completed. (0 skipped) (0 failed)
org.joefang.letterbox.CloudflareTermsConsentE2ETest > toSAlreadyAccepted_noDialogShownWhenEnablingProxy[pixel7Api34] FAILED pixel7Api34 Tests 11/50 completed. (0 skipped) (1 failed)
[Incubating] Problems report is available at: file:///home/runner/work/Letterbox/Letterbox/build/reports/problems/problems-report.html FAILURE: Build failed with an exception.
BUILD FAILED in 9m 36s You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/9.0.0/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. Please implement fixes and test cases (mostly integration & end-to-end tests) to verify your fix & ensure comprehensive test coverage of all functionalities. Follow best practices and write idiomatic code with comprehensive test & documentation coverage, and update existing documents & create new documents for all design decisions you made during inspecting & fixing the codebase. Make sure all implementations are correct, secure, and efficient especially around the FFI boundary. Analyze carefully on performance impacts and implement the most efficient design following best practices. |
Wait for DataStore to emit cloudflareTermsAccepted before clicking the privacy proxy switch. This fixes the test that was failing because collectAsState started with initial=false and the actual value wasn't loaded yet when the switch was clicked. Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Replace Thread.sleep with composeTestRule.mainClock.advanceTimeBy() for more deterministic test behavior. Also avoid runBlocking inside waitUntil loop. Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Fixed in commits ff92d11 and 1be8de0. Root Cause: The test Fix: Added proper waiting for Compose state to settle:
|
|
@copilot The Android UI testing CI failed. Please properly address the issues in the failed CI run as well as any potential issues that could arise in future CI/test case steps once the current issues are fixed. Run ./gradlew pixel7Api34StagingDebugAndroidTest
pixel7Api34 Tests 1/50 completed. (0 skipped) (0 failed)
org.joefang.letterbox.BackNavigationTest > backNavigation_fromHistoryEntry_returnsToList[pixel7Api34] FAILED pixel7Api34 Tests 9/50 completed. (0 skipped) (1 failed)
[Incubating] Problems report is available at: file:///home/runner/work/Letterbox/Letterbox/build/reports/problems/problems-report.html
Deprecated Gradle features were used in this build, making it incompatible with Gradle 10. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. BUILD FAILED in 4m 14s Please implement fixes and test cases (mostly integration & end-to-end tests) to verify your fix & ensure comprehensive test coverage of all functionalities. Follow best practices and write idiomatic code with comprehensive test & documentation coverage, and update existing documents & create new documents for all design decisions you made during inspecting & fixing the codebase. Make sure all implementations are correct, secure, and efficient especially around the FFI boundary. Analyze carefully on performance impacts and implement the most efficient design following best practices. |
…eliability Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Co-authored-by: MinecraftFuns <25814618+MinecraftFuns@users.noreply.github.com>
Fixed in commits f250b41 and 36a5312. Root Causes Addressed:
Code Improvements:
|
Image Proxy Bug Fix
Latest Fixes
FLAG_ACTIVITY_NEW_TASK for startActivity calls: Added
FLAG_ACTIVITY_NEW_TASKto allstartActivitycalls in EmailDetailScreen to prevent crashes when starting activities from non-Activity contexts (WebView callbacks).BackNavigationTest reliability improvements:
waitForIdle()calls between activity scenario transitions to ensure database writes completewaitForIdle()after click actions to ensure UI transitions completeCode duplication reduction:
openUrlInBrowserhelper function for opening HTTP/HTTPS URLsopenMailtoLinkhelper function for opening mailto: linksshouldOverrideUrlLoadingto use these helper functionsOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.