Conversation
… (FP-10) _tryDirectTap invokes a Semantics-wrapped button's onTap by walking the Element tree structurally, with no relationship to paint order — unlike a real hit-tested pointer tap, which Flutter's own pointer dispatch resolves correctly. That let `tap` succeed against a widget hidden behind a modal barrier, loading overlay, or Stack sibling a real user's tap would hit instead. tap now runs a read-only hit test (the same hitTestInView call Flutter's own dispatch makes internally) before taking the direct-invoke path, and only uses it when the target is genuinely the topmost thing at its own screen position — otherwise it falls through to the existing real hit-tested pointer tap, which already lands on whatever's actually on top. No change needed for _doubleTap/_longPress — they never had the direct-invoke branch to begin with. Version bump to 0.14.0 (agent + CLI, kept in lockstep) to ship this alongside the already-unreleased FP-6 GPS route simulation feature.
3 tasks
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.
Summary
_tryDirectTapinvoked a Semantics-wrapped button'sonTapby walking the Element tree structurally, with no relationship to paint order — unlike a real hit-tested pointer tap, which Flutter's own pointer dispatch resolves correctly. That lettapsucceed against a widget hidden behind a modal barrier, loading overlay, orStacksibling that a real user's tap would hit instead.tapnow runs a read-only hit test (the samehitTestInViewcall Flutter's own dispatch makes internally) before taking the direct-invoke path, and only uses it when the target is genuinely the topmost thing at its own screen position. Otherwise it falls through to the existing real hit-tested pointer tap, which already lands on whatever's actually on top — no new error path needed._taphas the direct-invoke branch —_doubleTap/_longPressalready only use the real gesture path, so they're untouched.IMPROVEMENT_TASKS.mdfor why that would regress confirmed bugs.CHANGELOG.md,probe_agent/CHANGELOG.md,VERSION,probe_agent/pubspec.yaml,vscode/package.json, anddocs/wiki/Home.mdall updated.Test plan
dart analyze lib/ test/tap_occlusion_test.dart— no issuesflutter test(probe_agent) — full suite passes (42/42), including newtap_occlusion_test.dart(covered button not tapped; uncovered button still tapped directly — PT-05 regression guard) and no regressions intap_focus_test.dart/tap_no_ontap_test.dart(PT-04/PT-05's own tests)go build ./...— clean (no Go source changed)