Update BaselineProfileGenerator with extended interaction flows#649
Conversation
Extended the Baseline Profile generation circuit to include more comprehensive user interactions: - HomeScreen: Added scroll to bottom, and navigation to 'Daily Mix' and 'Stats' screens. - SearchScreen: Replaced generic click with navigation to 'Unknown' Genre detail screen. - LibraryScreen: Added 3-dot menu interaction (expand and scroll SongInfoBottomSheet) before playing a song. - UnifiedPlayerSheet: Added horizontal carousel swipes, WavyMusicSlider interaction, media button taps, and QueueBottomSheet opening/scrolling. - Added helper functions `scrollToListBottom` and `scrollToTop` for robust navigation.
|
👋 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. |
Refined the interaction logic in `BaselineProfileGenerator` to prevent app crashes and `DeadObjectException` during profile generation. - Updated `scrollToListBottom` and `scrollToTop` to use safer swipe margins (0.25-0.75) and slower speeds (45 steps) to avoid conflicts with system navigation and ensure smoother UI updates. - Replaced immediate `findObject` calls with `device.wait(Until.findObject(...), timeout)` for critical UI elements like 'Daily Mix', 'Stats', 'More options', and Genre cards to handle UI loading delays robustly. - Added null checks and logging for safer execution of interaction steps.
Resolved a critical stability issue in `BaselineProfileGenerator` where `blindScroll` (UP then DOWN swipe) was inadvertently triggering the 'swipe-to-dismiss' gesture on `SongInfoBottomSheet` and `QueueBottomSheet`. This caused the subsequent `device.pressBack()` call to exit the application instead of just closing the sheet, leading to test failures and `DeadObjectException`. Changes: - Introduced `scrollBottomSheetContent()` helper that performs a single UP swipe to scroll content without risking dismissal. - Updated `Library Interaction` and `Unified Player Sheet` steps to use this safe scrolling method. - Added explicit waits (`Thread.sleep`) after sheet interactions to ensure UI stability before proceeding. - Added a safety wait before the 'Force Play' click to guarantee the list is interactive.
Resolved critical stability issues in `BaselineProfileGenerator` that caused the app to close unexpectedly during `WavyMusicSlider` interaction and `QueueBottomSheet` opening. Changes: - **Wavy Slider Y-coordinate:** Adjusted from `0.80` to `0.72` to avoid interacting with system navigation bars or bottom controls that might trigger app switching/back actions. - **Queue Fling:** Changed the start Y coordinate from `displayHeight - 50` to `displayHeight * 0.92`. The previous value was too close to the edge, triggering the system 'Home' gesture on modern Android versions. - **Queue Scrolling:** Replaced single scroll with a repeated `scrollBottomSheetContent()` call to ensure the queue is scrolled "significantly" as requested, without triggering dismissal. - **Safety:** Added waits between actions to allow UI animations to settle.
Resolved issues where the `UnifiedPlayerSheet` was collapsing instead of opening the Queue, and the `WavyMusicSlider` interaction was failing. Changes: - **Queue Opening:** Replaced the unreliable fling gesture with a direct click on the "Song options" (Queue) button in the TopBar. Added a regex pattern `.*(Song options|Opciones|Queue|Cola).*` to robustly identify this button across locales. - **Slider Interaction:** Implemented dynamic coordinate calculation for the `WavyMusicSlider` swipe. The swipe Y-coordinate is now derived from the Play/Pause button's position (`playButton.visibleBounds.top - 12% screen height`), ensuring the gesture correctly targets the slider area relative to the controls on various screen sizes. - **Safety:** Maintained explicit waits and null checks to ensure UI stability.
Resolved stability issues in the extended player flow: - **Queue Opening:** Replaced the button click with a robust "Fling Up" gesture to open the Queue BottomSheet, as explicitly requested. Added verification for the "Next Up" header to ensure the sheet is open before scrolling. - **Play/Pause Stability:** Fixed a crash caused by reusing a stale `UiObject2` reference for the Play/Pause button. The button is now re-found before the second click to handle the icon/state change safely. - **Error Logging:** Improved exception logging to print the full exception string, preventing unhelpful "null" error messages. These changes ensure the Baseline Profile Generator completes the full user journey without crashing or skipping steps.
Improves the reliability and clarity of the `BaselineProfileGenerator` script. - **Profile Recovery:** - Standardizes the output path for the generated profile to `/sdcard/Android/media/com.theveloper.pixelplay.baselineprofile/baseline-prof.txt`, ensuring consistent write permissions. - Adds logging and a 5-second delay after the `killall` command to allow more time for the profile to be written to disk before copying. - **Generator Script:** - Cleans up the script by removing redundant comments and unnecessary `Log.w` calls for non-critical path failures (e.g., if the "Stats" element isn't found). - Simplifies comments in the player UI and queue interaction steps for better readability. - Adds a title to the "Home Screen Extended Flow" section to clarify that it covers "Daily Mix & Stats".
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This change extends the
BaselineProfileGeneratorto cover more UI paths and components during baseline profile generation. This includes interactions with the HomeScreen (scrolling, Daily Mix, Stats), SearchScreen (Genre details), LibraryScreen (SongInfoBottomSheet), and UnifiedPlayerSheet (Carousel, Slider, Queue). The goal is to produce a more complete baseline profile that optimizes these frequently used heavy components.PR created automatically by Jules for task 8173872469908419694 started by @theovilardo