fix: Maestro search failures from tab-stack poisoning, repair smoke flow - #1292
Draft
skalthoff wants to merge 2 commits into
Draft
fix: Maestro search failures from tab-stack poisoning, repair smoke flow#1292skalthoff wants to merge 2 commits into
skalthoff wants to merge 2 commits into
Conversation
Every Maestro CI run (PRs and nightly) has failed for weeks in flows/search: the quick-actions flow left an album/artist detail screen pushed on the Search tab's navigation stack, so the search flow's selectors weren't in the hierarchy at all and its 180s scroll-up recovery could never succeed. - quick-actions: focus the search input by testID (placeholder text is randomized, so the old text match hit the tab bar label), close swipe menus by scrolling instead of blind coordinate taps (which tapped result rows and pushed detail screens), and restore the Search tab to its root before leaving it. - gd-search: replace the 180s scroll with a deterministic reset — scroll-up, then a bounded BACK + re-select-tab loop that pops leftover detail screens and cannot back out of the app, then a hard assert. - flow-smoke.yaml: rebuild on current flows/ building blocks; it had referenced maestro/tests/*.yaml files deleted in #1146/#1158 and failed instantly when dispatched. - Remove stale maestro/tests/7-settings.yaml (duplicate of flows/settings/flow.yaml) and maestro/flows/flow-settings.yaml (referenced a deleted file). - scripts/maestro-android.js: point at flow-full.yaml (flow-0.yaml no longer exists). - Add jest/functional/maestro-flow-integrity.test.ts so dangling runFlow references fail the PR jest suite instead of surfacing as emulator-time failures. Verified on a local API 34 x86_64 emulator with Maestro 2.5.1: the old flows reproduce CI's exact failure; the fixed flow-full.yaml passes end-to-end (setup, home, player, quick-actions, library, search, discover, settings). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR repairs the Maestro CI suite by preventing “tab-stack poisoning” in the Search tab, rebuilding the smoke flow on the current flows/ structure, and adding a Jest guard to catch broken runFlow references at review time.
Changes:
- Harden Search-related flows by resetting the Search tab to a known root state (bounded BACK + tab reselect) and avoiding brittle selectors in quick-actions.
- Rebuild
maestro/flow-smoke.yamlto use currentflows/entry points and remove stale/dead flow files. - Add a Jest integrity test to ensure all
maestro/**/*.yamlrunFlowreferences point to existing files.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/maestro-android.js | Updates the Android Maestro runner script to execute maestro/flow-full.yaml. |
| maestro/tests/7-settings.yaml | Deleted redundant legacy settings test file. |
| maestro/README.md | Updates docs to reflect flows/-based structure and adds tab stack hygiene guidance. |
| maestro/flows/search/gd-search.yaml | Adds deterministic Search-tab reset logic before asserting search-input. |
| maestro/flows/quick-actions/flow.yaml | Fixes Search input targeting and adds cleanup/reset to avoid leaving Search stack dirty. |
| maestro/flows/flow-settings.yaml | Deleted stale flow referencing removed test files. |
| maestro/flow-smoke.yaml | Rebuilt smoke entrypoint to reuse flows/ building blocks instead of deleted tests/*.yaml. |
| jest/functional/maestro-flow-integrity.test.ts | Adds Jest test to detect missing runFlow targets in Maestro YAML. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
12
to
+16
| element: | ||
| id: "search-input" | ||
| direction: UP | ||
| timeout: 180000 | ||
| timeout: 20000 | ||
| optional: true |
Comment on lines
+34
to
+39
| - scrollUntilVisible: | ||
| element: | ||
| id: "search-input" | ||
| direction: UP | ||
| timeout: 20000 | ||
| optional: true |
Comment on lines
+233
to
238
| - scrollUntilVisible: | ||
| element: | ||
| id: "search-input" | ||
| direction: UP | ||
| timeout: 20000 | ||
| optional: true |
Two more failures surfaced once the search fix let CI get past the search flow for the first time in weeks: - AnimatedRow dropped its testID (and flex style) entirely in the reduced-motion branch. CI emulators run with animations disabled, which Reanimated reports as reduced motion, so discover's `discover-recently-added` / `discover-suggested-artists` rows never existed in the hierarchy there — the discover flow failed on CI while passing on emulators with animations enabled. Render a plain View with the same testID and style instead. Also give the discover flow an extendedWaitUntil for slow cold loads. - #1289 bumped prettier to 3.9.3 in package.json but bun.lock kept 3.8.4, so CI's `bun i` + `format:check` now fails on three files that 3.9.3 formats differently (single-line short union types). Reformat them and sync the lockfile. Verified: full flow-full.yaml green on a local API 34 emulator with animations disabled (reduced motion active) — including the previously failing discover flow — plus jest 105/105 and format:check clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
skalthoff
marked this pull request as draft
July 2, 2026 16:59
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.
what is the change
fixes the maestro ci suite, red on every run (prs and the nightly) for weeks, and guards against a repeat.
flows/quick-actions/flow.yaml— focus the input byid: "search-input"instead oftapOn: text: "Search"(the placeholder is randomized, so the text match hit the tab bar label), close swipe menus by scrolling instead of a blindtapOn: point: 50%, 40%(which pushed a detail screen onto the search stack), and pop back to the search root before leaving.flows/search/gd-search.yaml— swap the 180s scroll for a boundedBACK+ re-select-tab reset that pops any leftover detail screen, then a hard assert.flow-smoke.yaml+scripts/maestro-android.js— repointed at existing flows (both referenced files deleted in Speed up local playback, Be More Aggressive with Fetching Playback Info, Be Less Aggressive with Fetching User Data #1146/chore: Add additional Maestro Subflows #1158).jest/functional/maestro-flow-integrity.test.ts(new) — fails the pr jest run if anyrunFlow/file:reference is missing, so this can't silently rot again.animated-row.tsx— keep thetestIDwhen animations are off (reduced motion on ci emulators was hiding these rows from maestro).verified locally on android 14 / maestro 2.5.1 against the demo server — full and smoke suites both green end-to-end.
what does this address
every maestro run failing deterministically for weeks, from tab-stack poisoning. each tab keeps its own nav stack; quick-actions left a detail screen pushed on the search tab, so when the search flow later selected that tab it landed on the leftover screen —
search-inputwasn't in the hierarchy at all, and the old 180s scroll recovery could never find it. the dead smoke suite and android script were separately pointing at flow files deleted in #1146/#1158.issue number / link
tag reviewers