Skip to content

fix(agent): a bare scroll skips the pages an IndexedStack does not show; follow-up tests and notes for #899 and #901 - #902

Merged
pbertsch merged 2 commits into
mainfrom
fix/site-truth-range-tests
Nov 18, 2026
Merged

pbertsch merged 2 commits into
mainfrom
fix/site-truth-range-tests

Conversation

@pbertsch

Copy link
Copy Markdown
Member

Summary

The nits of the reviews of #899 and #901, in one small pull request (a site-check test and README change, and an agent change).

Agent (follow-up to #901):

  • A bare scroll down (no selector) could still move a list on a page an IndexedStack does not show. It ranks scrollables by "can be scrolled", then "receives touches", then size; when the shown page's list was too short to scroll, a long list on a page that is not shown ranked higher and was moved, so nothing changed on screen and the step passed. The walk in _findScrollable now skips the pages the stack does not show (probeIndexedStackShown, the helper of fix(agent): a widget under an IndexedStack child that is not shown is not visible, in Flutter 3.44 and 3.50 (#900) #901).
  • Tests: probe_agent/test/indexed_stack_bare_scroll_test.dart (4 widget tests: the hidden page before and after the shown one, an index of null, and a control), run on Flutter 3.44.8 and 3.50.0. Against the previous executor.dart, 3 of the 4 fail on both versions (the control passes); with the change all pass.
  • Test for the surviving mutant of fix(agent): a widget under an IndexedStack child that is not shown is not visible, in Flutter 3.44 and 3.50 (#900) #901 (position <= shown in the tree walk): a password field on a page before and after the shown one (hasSecretField, pages 0 to 2). The five position mutants (<= and >= in the walk and in the scroll walk, and the filter dropped in the scroll walk) are killed on Flutter 3.50.0.
  • The negative index is documented in docs/compat/MATRIX.md: the agent reads it as "shows nothing"; a raw RenderIndexedStack with index -1 paints its first child, but IndexedStack asserts the index is null or in range in debug builds of both versions (checked in both SDK sources), so only a release build can reach it, and that was not run.
  • The matrix also lists what stays on a bare child walk and why: the recorder tracks every mounted text field, hidden pages included, so a password field on a page that is not shown is still masked; the element dump, the screenshot boundary and the walks that start below an element already found do not read the stack's index and were not measured with a hidden page. An IndexedStack matrix row waits for a device run.

Website truth check (follow-up to #899):

  • Tests for each end of the dash range (U+2010 to U+2015), a plain-space "money back" and the one-word "moneyback", as offers (must fail) and as denials (must pass). The text of fix(site): the truth check names what it does not read and refuses a few more wordings #899 said each end of the range was mutated and killed; for these ends it was not true. Now every end of the range (start, end, the space, the ASCII hyphen, "hyphen required") is mutated in the offer loop and the denial pattern, and all are killed; the one survivor of that round ("hyphen required" in the denial pattern) got the "moneyback" denial case. Each promise word is mutated too (promptly, anytime, any time, guaranteeing, instantly, automatically, immediately, granted): all killed.
  • website/README.md lists every promise word (it missed "automatically", "promptly", "immediately", "any time", "anytime") and says that a neighbouring sentence with one of them ("Cancel any time.", "Plans renew automatically.", "Access is granted to every member.") fails and must be reworded; three must-fail tests pin those known false rejections.

Tests

  • Agent, whole probe_agent suite: Flutter 3.44.8 350 passed, 2 skipped. Flutter 3.50.0 from a scratch copy of the package: 349 passed, 2 skipped, and one test that reads ../internal/textfold/testdata/cases.json failed only because the copy has no such folder.
  • flutter analyze on the changed files: clean.
  • go test -count=1 ./scripts/, staticcheck ./scripts/, GOOS=windows go vet ./scripts/ and node website/scripts/check-truth.mjs (7 files match).

Docs

docs/compat/MATRIX.md (the IndexedStack finding), CHANGELOG.md (Changed and Fixed, last in each), probe_agent/CHANGELOG.md, website/README.md.

Not measured

  • An app with tab pages in an IndexedStack; a device run; tap on a hidden child on a device.
  • The screenshot boundary, the element dump and the other bare walks of executor.dart with a hidden page.
  • A release build with a negative index.
  • Flutter versions other than 3.44.8 and 3.50.0.

Test plan

  • new agent tests on Flutter 3.44.8 and 3.50.0; before/after for the scroll tests
  • whole probe_agent suite on 3.44.8 (and on 3.50.0 from a copy)
  • site tests, staticcheck, Windows vet, truth check
  • independent review at the head

…README lists every promise word and its known false rejections
…ow; tests for the walk position and the notes of the #899 and #901 reviews
@pbertsch
pbertsch requested a review from a team as a code owner November 18, 2026 18:57
@pbertsch
pbertsch merged commit f4e0203 into main Nov 18, 2026
11 checks passed
pbertsch added a commit that referenced this pull request Nov 18, 2026
… on Flutter 3.44.8 and 3.50.0 (draft) (#903)

## Summary

Pickers and menus, first two widgets: `DropdownButton` and `PopupMenuButton`, assessed on Flutter 3.44.8 and Flutter 3.50.0. This is a **draft** so that it is reviewed before it is merged.

- **A `pickers` screen** in the Flutter fixture app (`PROBE_FIXTURE_WIDGETS=pickers`): a `DropdownButton` with a hint, a disabled one with the id on the control and one with the id on a wrapper only; three `PopupMenuButton`s (a text child, the default icon with a tooltip, a disabled one). Every state a test checks is also shown as text, and `Item taps` counts every tap on a dropdown item.
- **A suite** (`probe-tests/widgets/pickers.probe`, 17 tests) and **12 negative variants** (`probe-tests/negative/pickers.probe.expect-fail`, each with its expected message; three are known gaps, a correct step that fails today: issue #864).
- **A finding that is fixed:** found on Flutter 3.50.0 with the agent of `main` at `15fba797` (issue #900), the items of a closed `DropdownButton` were seen (a `DropdownButton` keeps them in an `IndexedStack`). It is fixed by #901 (squash `2fb46d90`). The suite asserts it again, as its first test, and gets the same result on both versions. `native-test-apps/flutter/test/pickers_indexed_stack_regression_test.dart` runs the same check on the pickers screen and on a plain `IndexedStack` (by hand, once with each Flutter; no device; CI does not run it). It is a different file from the agent's own `probe_agent/test/indexed_stack_hidden_test.dart`.
- **Matrix:** the Pickers and menus row (find, tap and read "see below" for the two widgets, `fixture` and `device test` set; `type` and `scroll` stay "not assessed"), a new section, a run paragraph, and the sentence from #901 that said the row stays "not assessed" is brought up to date. `NEXT.md` item 2 is "half done". The count of "not assessed" cells goes from 10 on `main` to 5, recounted from the family table with a script that reads the exact cell text. CHANGELOG, last bullet of Added.

## Results (Android emulator `ProbeWebViewSpike`, Android 15, API 35)

Builds with the agent of `main` at `2fb46d90` (the fix of #900). The agent change of #902 (a bare `scroll` skips pages an `IndexedStack` does not show) landed after these runs and was not in the builds; the suite uses no bare `scroll`, so it does not exercise it.

| | Flutter 3.44.8 | Flutter 3.50.0 |
|---|---|---|
| `pickers.probe` | 17 of 17 passed | 17 of 17 passed |
| negative file | 0 passed, 12 failed | 0 passed, 12 failed |

Every negative failed at its own step with the message in its comment, on both builds. 58 `restart the app` steps (29 per build), none failed in `before each test` (issue #823's rate, about 1 in 25, predicts about 2; one suite at a time on a no-window emulator, load not measured, so this does not show the failure is gone).

An earlier version of the suite (16 tests, 11 negatives, no assertion about the closed dropdown's items) was run with the agent at `15fba797`, before the fix: 16 of 16 and 11 of 11 on both builds. That run found issue #900; it is not the current result.

**Findings** (in the matrix): a tap on a widget under an open menu lands on the barrier (the menu closes, the widget is not pressed); a tap on the name of the chosen value in the open menu reaches the menu item, not the button under it; `tap` by tooltip and by id open a popup menu; a disabled dropdown and a disabled popup menu open nothing; `is disabled` does not read them (#864); `see #id contains` reads "" for them.

## Checked

- Both Flutter versions were run for real, as above (the 3.50.0 build in a scratch copy with a private SDK).
- `pickers_indexed_stack_regression_test.dart` passes on both versions with the fixed agent; with the agent before the fix it failed on 3.50.0 (run once, before the rework of the test).
- The family file was merged with `main` by taking `main`'s version and re-adding the Pickers class and its two registry lines; it analyzes cleanly and is formatted.
- A clean clone of the branch passes `go test ./scripts/`; `make ci-local` and the disclosure scan: see the head.

## Not checked / limits

- Android only; iOS, a physical device and other API levels were not run. `DatePickerDialog`, `showTimePicker`, `CupertinoPicker`, `DropdownMenu`, `MenuAnchor`, long popup menus, keyboard navigation and type-ahead are not covered (listed in the matrix).
- No test on an app with an `IndexedStack` of tab pages was made on a device.

## Docs

The matrix, `NEXT.md` and the CHANGELOG are updated here; the website and the wiki do not describe this fixture family, so they do not change.

## Test plan

- [x] device runs above (both Flutter versions), negative file
- [x] regression test on both versions
- [x] `make ci-local`, disclosure scan clean
- [ ] Review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant