Skip to content

refactor(ios): drop the flat sweep's discarded hittable computation - #2684

Merged
thymikee merged 1 commit into
mainfrom
chore/ios-flat-sweep-dead-hittable
Sep 19, 2026
Merged

thymikee merged 1 commit into
mainfrom
chore/ios-flat-sweep-dead-hittable

Conversation

@thymikee

Copy link
Copy Markdown
Member

Follow-up to #2669, from the reviewer's non-blocking note there: flatSnapshotNode (the query-sweep tier) still computed hittable from the reported frame, but since #2669 the one normalization pass in captureWithBackend calls replacing(rect:hittable:) on every acquired node, so that value was overwritten before anything read it.

What changed

  • flatSnapshotNode passes hittable: false, the same placeholder the recursive walker and the private-AX path already pass, and its viewport parameter (only used by the dropped computation) is gone. The sweep's own viewport stays: it still sizes the synthetic root and the result.
  • 3 insertions, 14 deletions, one file. No presented output changes: hittable on every node is decided in SnapshotGeometrySpace.normalized, which is unchanged.

Validation (2463a74)

  • iOS runner built with unit tests compiled in (AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1, arm64, iOS 26.2); testAbandonedTreeCaptureSkipsQuerySweepAndHonorsWarmupExemption, testRegularDepthCutsPresentationNotAcquisition, testVisibilityFoldKeepsIndependentChildPastClippedParent pass on a throwaway iPhone 17 Pro simulator (3 executed, 0 failures).
  • pnpm check:affected --run --head 2463a74: xctest-selection and packaged-runner-swift pass; the Swift build lanes are GitHub-authoritative. oxlint is clean on the repo (a local, git-ignored .claude/ file fails the working-tree lint on my machine; it is not in the diff).
  • No changelog entry: the refactor(ios-runner): acquire first, present after — one geometry normalization pass instead of per-walker threading #2661 entry already states that the normalization pass recomputes hittable.

Since #2669 the one normalization pass in captureWithBackend recomputes hittable for every
acquired node, so the value flatSnapshotNode computed from the reported frame was overwritten
before anything read it. The sweep now passes hittable: false like the recursive walker and
private AX do, and the viewport parameter that only fed that computation goes with it.
No presented output changes. Raised as a non-blocking note on #2669.
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.61 MB 4.61 MB -233 B
Package (unpacked) 4.61 MB 4.61 MB -233 B
Package (download) 1.37 MB 1.37 MB -62 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.1 ms 25.8 ms -0.4 ms
CLI --help 77.4 ms 75.3 ms -2.1 ms

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at 2463a74. No blocking findings: normalized() recomputes hittable for every node, so the value the flat sweep computed was never used, and removing it changes no snapshot field. CI is green.

Not blocking: the three tests named in the PR body do not call flatSnapshotNode or querySweepSnapshotAcquisition, so the validation note could say that correctness rests on the recompute in normalized().

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 19, 2026
@thymikee
thymikee merged commit d7be9d7 into main Sep 19, 2026
18 checks passed
@thymikee
thymikee deleted the chore/ios-flat-sweep-dead-hittable branch September 19, 2026 13:51
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-19 13:53 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant