Repository navigation
perf(ios-runner): confirm a back button pop from the back buttons before reading the bars - #5304
Conversation
…ore reading the bars After the navigation bar back button tap, each confirmation read snapshotted every navigation bar, even when the back buttons alone already showed the pop. The candidates are some of the back buttons in tree order, so when the labels before the tap are not a subsequence of the labels read now, no bars can keep them. Such a read now answers the pop without the bar query, so a bar query that would fail or hang there can no longer turn it unverified. Otherwise the bars are read and the whole state is compared, as before. The confirmation read no longer repeats the deadline check its loop has just made; each button snapshot still checks the deadline. The runner log line gains poppedBy=buttons|bars, a test hook fails or hangs the bar query alone, and a fixture flag keeps the floating back button across the pop, as on the closed iPhone Duo, to cover the bar title path.
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Thanks for the speedup. No blocking problems were found in the code at 65cc2da, and the required evidence is in place. The wording thread on The Runner Build (tvOS + visionOS + watchOS) failure is likely unrelated, because the changed Swift code and the changed fixtures compile only for iOS. This is not confirmed from logs, since no failure excerpt was available. The Body rules check was cancelled, probably because a newer run replaced it. Not verified here: the live timings and the iPhone Duo runs are author-reported. The runner unit tests were not run for this review; CI and the author report 790 runs with 0 failures. Before merge, please re-run Body rules and confirm that the Runner Build failure also happens on main or is a flake. Nothing in the diff stands in the way. |
Summary
After iOS
backtaps the navigation bar back button, each confirmation read snapshotted every navigation bar, even when the back buttons alone already showed the pop. The candidates are a tree-order subset of theBackButtonbuttons, so when the labels before the tap are not a subsequence of the labels read now, no bars can keep them. Such a read now answers the pop without the bar query, so a bar read that would fail or hang cannot turn it unverified. Otherwise nothing changes, including the lookup before the tap.The
BACK_NAVIGATION_BAR_BUTTONline gainspoppedBy=buttons|bars. A fixture flag keeps the floating back button across the pop, as on the closed iPhone Duo.Validation
iPhone 17 Pro simulator, iOS 27.2. Base
feb94004f5, timed at8f71338150(head65cc2da784only rewordsRUNNER_PROTOCOL.md). Settings, General > Fonts > System Fonts, thenbackthree times; builds alternated, 21 backs per build per round:outcome=performed changed=yes). Ataab1deb7ab, base and head matched on Settings depths 3, 2 and 1, Safari in both orientations, and landscape Contacts.poppedBy=bars, thenpoppedBy=buttons. Open and half-open: the lookup exceeds its 1 s budget at base and head alike.native-dupes,xctest-selection,packaged-runner-swiftandcheck:affectedpass.