Repository navigation
Inspect: off-screen children don't count toward the per-node child cap (#249) - #250
Merged
Merged
Conversation
#249) A visible-only walk took a node's first 100 children and only then skipped the off-screen ones, so a long list scrolled to its middle listed none of its visible rows. Skipped children no longer count toward maxChildren, and the walk reads up to ten times the cap, as PR #212 did. Adds the longlist fixture: 400 rows, all Accessibility children, scrolled past the first 190. Why: native2/Sources/DesktopMac/Elements.swift | the per-node child cap counts only children a visible-only walk kept; skipping happens per child after its descriptor read, so the scan is bounded separately (10x the cap) to keep a huge list's read cost finite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #249. This is the gap left by #238, which superseded PR #212 for #178.
processChildrentookprefix(maxChildren)(100) before the visible-only skip. A container whose every child is in the Accessibility tree, scrolled to its middle, therefore offered 100 off-screen children and no visible ones. Now a child skipped as off-screen doesn't count toward the cap. A visible-only walk scans up to 10× the cap (PR #212's bound), since each skipped child still costs one descriptor read. Scoped and other full walks (no clip) still stop at the first 100 children, as before.New fixture:
native2/fixture/longlist.swift, a scroll area holding a stack of 400 rows, all Accessibility children, scrolled past the first 190.Checked
offscreen_omitted: 100.offscreen_omitted: 384. This matches the screenshot, which shows rows 209–223 with 224 partly visible.swift test --package-path native2passes. Checked live through the standalone host built from this branch; the dev app here still has no Accessibility or Screen Recording grant.🤖 Generated with Claude Code