feat(snapshot): disclose a cut capture on every platform; raise the iOS bridge node cap to 5000 - #2510
Open
thymikee wants to merge 1 commit into
Open
feat(snapshot): disclose a cut capture on every platform; raise the iOS bridge node cap to 5000#2510thymikee wants to merge 1 commit into
thymikee wants to merge 1 commit into
Conversation
…OS bridge node cap to 5000 Every backend sets truncated: true when it cuts a capture at one of its limits, but only JSON carried it. One shared warning now renders from that flag in the cross-platform warnings assembly and tells the agent what fell off (what comes last in document order) and what to do. The iOS Simulator AX bridge cap moves from 1500 to 5000 nodes, the Android helper's bound. Measured on a synthetic 600-row screen, acquisition time did not change with the cap while the 1500 cut dropped the on-screen footer.
|
Size Report
Startup median (7 runs, lower is better):
|
thymikee
added this pull request to stack #2513
September 12, 2026 12:07
Member
Author
|
The new warning misclassifies incomplete captures at a552b16. quality-warnings.ts:43-47 treats every truncated flag as a backend-limit cut, but Android presentation failures and iOS accessibility-unavailable responses also set that flag. Those failures now get misleading advice about missing later elements and scrolling. Use wording that describes incomplete capture without inventing its cause, or select limit-specific advice from typed evidence; cover a real sparse/presentation-failure result. Current-head checks pass and there are no conflicts. The separate bridge publish-versus-fallback policy remains deferred, as the description states. |
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.
Part of #2492 (task 5). Two changes, both measured first.
One disclosure for a cut capture, every platform
Every backend already reports the same fact —
truncated: trueon the snapshot — but only in JSON. The text path said nothing: an agent read a screen missing its footer, tab bar, or the items after a long list as complete. The backends walk the tree in document order, so what falls off is what comes last, on screen or not.truncatedCaptureWarningin capture-kit renders one warning from that flag, and the single cross-platform warnings assembly in the snapshot runtime calls it. Android helper (5000-node cap), iOS Simulator bridge, XCTest runner, and the web provider all flow through it. The limit and dimension stay backend-side; the copy names neither, and tells the agent what to do: navigate or scroll so fewer elements render, re-run, usescreenshotfor the rest.Producers that cannot observe truncation keep
truncatedunknown (#2188 invariant 5) and get no warning.iOS Simulator bridge node cap 1500 → 5000
Measured on iPhone 17 Pro with a synthetic unvirtualized list in the fixture dev client (8 regular snapshots per cell, bridge
acquireduration from--debugdiagnostics):The native read fetches the whole tree regardless of the cap; the cap only stops conversion. Cost is the tree itself (~0.25 ms per raw node). At 1500 the screen's on-screen footer (drawn last) was absent; at 5000 present. 5000 matches the Android helper. The 4 MB response bound did not bite at 8k nodes.
Not here
--scopeon the bridge as a real override; today--scopeis presentation-only on iOS, so the warning does not promise it.