Improve Baseline Profile with enhanced scrolling and player scenarios#641
Conversation
Enhances the BaselineProfileGenerator to cover more critical user flows and reduce flakiness. - Added explicit list scrolling scenarios (Library, Home, Search) with both scroll and fling gestures to capture list rendering paths. - Added deep navigation to detail screens (e.g., Album Detail) from the library. - Implemented a robust flow for `UnifiedPlayerSheet` including expansion, carousel interaction, and queue toggling. - Improved reliability with `wait(Until...)` and granular try-catch blocks. - Added missing imports and restored the `is_benchmark` intent extra to ensure consistent test behavior.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
Enhances the BaselineProfileGenerator to cover more critical user flows and reduce flakiness. - Added explicit list scrolling scenarios (Library, Home, Search) with both scroll and fling gestures to capture list rendering paths. - Added deep navigation to detail screens (e.g., Album Detail) from the library. - Implemented a robust flow for `UnifiedPlayerSheet` including expansion, carousel interaction, and queue toggling. - Improved reliability with `wait(Until...)` and granular try-catch blocks. - Added missing imports and restored the `is_benchmark` intent extra to ensure consistent test behavior. - Implemented `waitForAppLoading` to handle the initial "Preparing your library..." overlay. - Added explicit `setupPermissions` granting `READ_MEDIA_AUDIO` and other critical permissions. - Switched to `startActivityAndWait` with a manual benchmark intent and added `waitForIdle` to improve startup stability. - Added `runLibrarySubTabsFlow` to iterate and scroll through "Songs", "Albums", and "Artists" tabs explicitly.
Enhances the BaselineProfileGenerator to cover more critical user flows and reduce flakiness. - Added explicit list scrolling scenarios (Library, Home, Search) with both scroll and fling gestures to capture list rendering paths. - Added deep navigation to detail screens (e.g., Album Detail) from the library. - Implemented a robust flow for `UnifiedPlayerSheet` including expansion, carousel interaction, and queue toggling. - Improved reliability with `wait(Until...)` and granular try-catch blocks. - Added missing imports and restored the `is_benchmark` intent extra to ensure consistent test behavior. - Implemented `waitForAppLoading` to handle the initial "Preparing your library..." overlay. - Added explicit `setupPermissions` granting `READ_MEDIA_AUDIO` and other critical permissions. - Switched to `startActivityAndWait` with a manual benchmark intent and added `waitForIdle` to improve startup stability. - Added `runLibrarySubTabsFlow` to iterate and scroll through "Songs", "Albums", and "Artists" tabs explicitly. - Implemented `ensurePlayerCollapsed` to detect and dismiss the expanded player if it obscures navigation. - Added `runSettingsFlow` to navigate to and scroll through the Settings screen. - Enhanced UI selectors to support both English and Spanish locales and fall back between `text` and `contentDescription`.
Enhances the BaselineProfileGenerator to be more robust and observable.
- Replaced `startActivityAndWait` with `device.executeShellCommand("am start ...")` to resolve "Unable to confirm activity launch completion" crashes on some devices.
- Added explicit `device.waitForIdle(2000)` pauses and detailed `Log.d` tracing to allow visual confirmation of test progress.
- Implemented `ensurePlayerCollapsed` to guarantee the UI is in a navigable state before running tab interactions.
- Added `runSettingsFlow` to profile the Settings screen.
- Improved reliability of `runTabsAndScrollingFlow` and `runUnifiedPlayerSheetFlow` with better selectors and logging.
- Retained waiting logic for "Preparing your library..." overlay.
Enhances the BaselineProfileGenerator to be more robust and observable.
- Replaced `startActivityAndWait` with `device.executeShellCommand("am start ...")` to resolve "Unable to confirm activity launch completion" crashes on some devices.
- Added explicit `device.waitForIdle(2000)` pauses and detailed `Log.d` tracing to allow visual confirmation of test progress.
- Implemented `ensurePlayerCollapsed` to guarantee the UI is in a navigable state before running tab interactions.
- Added `runSettingsFlow` to profile the Settings screen.
- Improved reliability of `runTabsAndScrollingFlow` and `runUnifiedPlayerSheetFlow` with better selectors and logging.
- Retained waiting logic for "Preparing your library..." overlay.
- Added Home specific scroll flow and Library Pager lateral swipe flow.
- Added margin to scroll gestures to avoid pulling notification shade.
- Added interactions with Player buttons and Slider.
Enhances the BaselineProfileGenerator to be more robust and observable.
- Replaced `startActivityAndWait` with `device.executeShellCommand("am start ...")` to resolve "Unable to confirm activity launch completion" crashes on some devices.
- Added explicit `device.waitForIdle(2000)` pauses and detailed `Log.d` tracing to allow visual confirmation of test progress.
- Implemented `ensurePlayerCollapsed` to guarantee the UI is in a navigable state before running tab interactions.
- Added `runSettingsFlow` to profile the Settings screen.
- Improved reliability of `runTabsAndScrollingFlow` and `runUnifiedPlayerSheetFlow` with better selectors and logging.
- Retained waiting logic for "Preparing your library..." overlay.
- Added Home specific scroll flow and Library Pager lateral swipe flow.
- Added margin to scroll gestures to avoid pulling notification shade.
- Added interactions with Player buttons and Slider.
- Reordered steps to match user request: Home -> Settings -> Main Tabs -> Library Sub-tabs -> Player.
Enhances the BaselineProfileGenerator to be more robust and observable.
- Replaced `startActivityAndWait` with `device.executeShellCommand("am start ...")` to resolve "Unable to confirm activity launch completion" crashes on some devices.
- Added explicit `device.waitForIdle(2000)` pauses and detailed `Log.d` tracing to allow visual confirmation of test progress.
- Implemented `ensurePlayerCollapsed` to guarantee the UI is in a navigable state before running tab interactions.
- Added `runSettingsFlow` to profile the Settings screen.
- Improved reliability of `runTabsAndScrollingFlow` and `runUnifiedPlayerSheetFlow` with better selectors and logging.
- Retained waiting logic for "Preparing your library..." overlay.
- Added Home specific scroll flow and Library Pager lateral swipe flow.
- Added margin to scroll gestures to avoid pulling notification shade.
- Added interactions with Player buttons and Slider.
- Reordered steps to match user request: Home -> Settings -> Main Tabs -> Library Sub-tabs -> Player.
- Added critical `waitForTab` gatekeeper check to prevent premature test execution before the app is fully loaded.
- Refined UI selectors to match hardcoded strings like "Settings" and provide robust fallbacks for localized navigation tabs.
- Added UI fallback for permission granting.
- Updated `CustomNavigationBarItem.kt` to accept a `contentDescription` and set it on the root `Column` semantics, ensuring UI Automator can locate the tab. - Updated `PlayerInternalNavigationBar.kt` to pass `item.label` as the `contentDescription`. - Refined `BaselineProfileGenerator.kt` to prioritize `By.desc` for tab selection, while retaining `By.text` as a fallback. - Added explicit waits and checks to ensure navigation scenarios (Home, Settings, Library) run correctly before interacting with the player. - Optimized `runLibraryPagerSwipeFlow` with slower swipes for better pager detection. - Adjusted `safeScrollContent` margin to avoid notification shade interactions.
- Updated `BaselineProfileGenerator.kt`: Optimized `waitForTab` to prioritize checking `By.desc` first, significantly reducing wait times for accessible navigation tabs. - Updated `CustomNavigationBarItem.kt`: Refined the semantics assignment to be conditional (`if (contentDescription != null)`). This prevents overriding the default merged text semantics with an empty string when no description is provided, ensuring better accessibility compliance. - Verified that the generator executes the full sequence (Home -> Settings -> Tabs -> Library -> Player) robustly.
…ompose stability config Overhauls the Baseline Profile generator for increased reliability and introduces a Compose stability configuration to improve runtime performance by reducing recompositions. ### `BaselineProfileGenerator.kt` - Rewrites the entire generation flow to be more linear and robust, using `Thread.sleep` instead of `waitForIdle` for more predictable timing. - Structures the process into discrete, named steps (`runStep`) for improved logging and debugging (e.g., Settings, Force Play, Main Tabs, Library Pager, Player Sheet). - Simplifies UI interactions, replacing complex selectors and waits with more direct actions like coordinate-based clicks and "blind" swipes. - Implements a more resilient permission setup (`setupResilientPermissions`) and a simplified onboarding handler. - Adds a new "Force Play" step to ensure a song is playing, making the player sheet interaction more reliable. - Improves the recovery mechanism (`recoverBaselineProfile`) to manually dump profiles and copy the file upon failure. ### Compose Stability (`app/build.gradle.kts`, `app/compose_stability.conf`) - Adds a `compose_stability.conf` file to explicitly mark frequently used data models and UI state classes (e.g., `Song`, `Album`, `PlayerUiState`) as stable. - Configures the Kotlin compiler in `app/build.gradle.kts` to use this stability file, enabling the Compose compiler to more effectively skip recompositions when underlying data has not changed.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This PR significantly improves the quality and coverage of the Baseline Profile generation for PixelPlay.
Key changes:
UnifiedPlayerSheet, performing expansion, cover swipes (pager interaction), and queue opening/closing. This addresses the user's high priority for optimizing player animations.device.wait(Until...)conditions and added granular error handling to prevent the entire generation process from failing if a single UI element (like an empty list) is missing.Direction) and restored theis_benchmarkintent extra to maintain the original test environment configuration.These changes ensure the generated baseline profile includes the code paths most susceptible to jank, such as heavy list rendering and complex sheet animations.
PR created automatically by Jules for task 13161532055907276109 started by @theovilardo