You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stacked on PR #1929, targeting claude/1797-clip-fold at e4b19df6c.
This PR completes the next smallest #1797 architecture unit: the effective-geometry carrier and
the rect-consumer inventory/migration. It does not add the separate occlusion/actionability
enforcement slice.
Acquisition keeps RawAXNode.rect as the backend-reported frame.
Regular presentation now carries a SnapshotPresentationNode with both the raw node and its
presentation-owned effectiveRect.
The regular wire projection writes effectiveRect through the existing PresentedNode.rect
field. Raw snapshots and direct single-element reads retain reported geometry.
Scope, reindexing, hidden-content hints, and collapsed-depth projection preserve the carrier.
The only policy branch is the declared SnapshotVisibilityFold.Policy: iOS's cursorProjected policy supplies ancestor scroll clips; plainViewport does not. No backend
name or acquisition implementation is inspected by the geometry code.
Rect inventory
Consumer class
Owners reviewed
Classification / migration
Acquisition facts and runner-internal geometry
RunnerTests+Snapshot.swift, the acquisition half of RunnerTests+PrivateAXPresentation.swift, and raw-node builders in RunnerTests+Interaction.swift, RunnerTests+SystemModal.swift, and RunnerTests+CommandJournal.swift
Reported geometry. These continue to use RawAXNode.rect for traversal, roots, deduplication, and direct reads.
Effective geometry for regular projection; raw geometry for raw/direct-read paths. The typed carrier is the single migration point.
iOS daemon presentation
src/daemon/snapshot-presentation/ios/*.ts (rows, noise, action-shelf, actions, scroll, transitions, and web)
Existing wire rect consumers; no parallel field or adapter. They now receive effective geometry automatically.
Occlusion, targeting, touch-point, and overlays
src/snapshot/snapshot-occlusion.ts, src/core/interaction-targeting.ts, src/core/interaction-touch-point.ts, src/core/react-native-overlay.ts, src/daemon/screenshot-overlay*.ts, and src/daemon/session-target-evidence.ts
Effective geometry. These are post-wire consumers and remain unchanged.
Freshness, unchanged snapshots, selectors, Maestro, find/interaction, replay, and diff evidence
src/commands/capture/runtime/snapshot-unchanged.ts, src/commands/interaction/runtime/*, packages/selectors/src/internal/*, packages/maestro/src/internal/*, src/daemon/handlers/*, src/daemon/adapters/maestro/*, and src/screenshot-diff/*
Effective geometry from the existing rect contract; no consumer-specific migration was needed.
The complete rect search was classified before changing the carrier. No downstream wire consumer
was changed because rect remains the wire field and now has the intended regular-projection
meaning.
Explicit red evidence: temporarily bypassing the carrier (node.effectiveRect → node.raw.rect) made testRegularPresentationPublishesEffectiveRectWhileRawKeepsReportedFrame
fail with 100.0 vs 52.0; the carrier path was restored before commit.
A focused macOS host execution attempt stalled before XCTest output at the host automation
boundary, so this PR claims the macOS compilation result but not a host execution pass.
Live full-production-route iOS geometry evidence
Captured at this PR's exact head 428b8c9b62b30d202c06b5a3b568cb03045d4851 after PR #1929's
Coverage lane passed. Stacked base #1929 remains a readiness dependency for this stack until its
Coverage lane is green; that dependency is now green for this evidence.
The existing booted iPhone 17 Pro (F7D6F9A4-4FCC-4DD7-AC0B-3280C9319CB9) ran the shipped examples/test-app Catalog screen. No simulator was created or deleted. The source and runner
paths were rebuilt to defeat daemon/runner staleness:
The purpose-specific session was geometry-live-428b8c9b6, with isolated state at /private/tmp/agent-device-1931-geometry.SBL95K/state. The public CLI route was:
Both snapshots returned structured success: true output for com.callstack.agentdevicelab with snapshotQuality.state: "healthy" and snapshotQuality.backend: "tree". The regular artifact reports visibility.partial: true,
45 nodes, and scroll-hidden-above/scroll-hidden-below; the raw artifact reports visibility.partial: false, 279 nodes, and no visibility reasons. The isolated events.ndjson records the regular snapshot as flags: {platform: "ios"} and the raw snapshot
as flags: {platform: "ios", raw: true}; runner.log records both commands as accepted and
completed successfully. This proves the projection through CLI → daemon → runner → wire rather
than through a helper or XCTest-only path.
For the deliberately clipped Bakery descendant in the same post-scroll state:
Wire projection
x
y
width
height
Regular effective rect
34.333334
62.000000
75.333328
24.333314
Raw reported rect
34.333334
48.666658
75.333328
37.666656
The raw rect spans y=48.666658..86.333314; the regular rect spans y=62.000000..86.333314. The regular wire output therefore carries the effective top clip and
reduced height, while raw output preserves the original reported geometry.
Cleanup completed with close --session geometry-live-428b8c9b6; the isolated session list was
empty afterward. Scoped daemon cleanup removed only this verification daemon and retained runner;
no verification-owned processes remained. The iPhone 17 Pro stayed Booted as it was before the
run, and the JSON/log artifacts remain at /private/tmp/agent-device-1931-geometry.SBL95K/.
No source files changed, so the exact head remains 428b8c9b62b30d202c06b5a3b568cb03045d4851.
No app-control-bench files or unrelated worktrees/devices were touched. Nothing is merged.
Reviewed exact head 428b8c9: the implementation is code-clean. Regular presentation now carries one effective rectangle through the visibility fold and scope/reindex path, while raw/direct projections retain reported geometry; the existing wire shape is unchanged. Exact-head CI is green and Size is +2.6 kB unpacked. One merge-readiness proof is still missing: the current simulator evidence executes fabricated RawAXNode/CGRect unit cases, not the shipped agent-device snapshot route. Please attach an exact-head iOS simulator/device run with a partially clipped element showing regular wire rect = viewport/ancestor intersection and raw/direct rect = reported frame, including the target and command/artifact. This stack also cannot land before base #1929's failed Coverage lane is rerun or otherwise resolved.
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
ready-for-humanValid work that needs human implementation, judgment, or maintainer merge
1 participant
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
Stacked on PR #1929, targeting
claude/1797-clip-foldate4b19df6c.This PR completes the next smallest #1797 architecture unit: the effective-geometry carrier and
the rect-consumer inventory/migration. It does not add the separate occlusion/actionability
enforcement slice.
RawAXNode.rectas the backend-reported frame.SnapshotPresentationNodewith both the raw node and itspresentation-owned
effectiveRect.effectiveRectthrough the existingPresentedNode.rectfield. Raw snapshots and direct single-element reads retain reported geometry.
SnapshotVisibilityFold.Policy: iOS'scursorProjectedpolicy supplies ancestor scroll clips;plainViewportdoes not. No backendname or acquisition implementation is inspected by the geometry code.
Rect inventory
RunnerTests+Snapshot.swift, the acquisition half ofRunnerTests+PrivateAXPresentation.swift, and raw-node builders inRunnerTests+Interaction.swift,RunnerTests+SystemModal.swift, andRunnerTests+CommandJournal.swiftRawAXNode.rectfor traversal, roots, deduplication, and direct reads.RunnerTests+SnapshotPresentation.swift,RunnerTests+SnapshotVisibilityFold.swift,RunnerTests+SnapshotCapturePlan.swiftsrc/daemon/snapshot-presentation/ios/*.ts(rows,noise,action-shelf,actions,scroll,transitions, andweb)rectconsumers; no parallel field or adapter. They now receive effective geometry automatically.src/snapshot/snapshot-occlusion.ts,src/core/interaction-targeting.ts,src/core/interaction-touch-point.ts,src/core/react-native-overlay.ts,src/daemon/screenshot-overlay*.ts, andsrc/daemon/session-target-evidence.tssrc/commands/capture/runtime/snapshot-unchanged.ts,src/commands/interaction/runtime/*,packages/selectors/src/internal/*,packages/maestro/src/internal/*,src/daemon/handlers/*,src/daemon/adapters/maestro/*, andsrc/screenshot-diff/*rectcontract; no consumer-specific migration was needed.The complete rect search was classified before changing the carrier. No downstream wire consumer
was changed because
rectremains the wire field and now has the intended regular-projectionmeaning.
#1797 checklist status
Complete in this PR:
Still separate / remaining:
remaining cross-runtime parity work.
Validation
pnpm buildpnpm check:xctest-selectionpnpm check:affected --run(all runnable checks passed; GitHub-authoritative native/device lanesremain delegated to CI)
pnpm build:xcuitest:iosandpnpm build:xcuitest:macostest builds passed.geometry, plain-vs-cursor policy, regular fold behavior, raw/regular wire compatibility, and
scope/depth.
node.effectiveRect→node.raw.rect) madetestRegularPresentationPublishesEffectiveRectWhileRawKeepsReportedFramefail with
100.0vs52.0; the carrier path was restored before commit.boundary, so this PR claims the macOS compilation result but not a host execution pass.
Live full-production-route iOS geometry evidence
Captured at this PR's exact head
428b8c9b62b30d202c06b5a3b568cb03045d4851after PR #1929'sCoverage lane passed. Stacked base #1929 remains a readiness dependency for this stack until its
Coverage lane is green; that dependency is now green for this evidence.
The existing booted iPhone 17 Pro (
F7D6F9A4-4FCC-4DD7-AC0B-3280C9319CB9) ran the shippedexamples/test-appCatalog screen. No simulator was created or deleted. The source and runnerpaths were rebuilt to defeat daemon/runner staleness:
pnpm buildpnpm clean:daemonAGENT_DEVICE_IOS_RUNNER_DERIVED_PATH=/private/tmp/agent-device-1931-ios-live-428b8c9b6 pnpm build:xcuitest:ios/private/tmp/agent-device-1931-ios-live-428b8c9b6/Build/Products/AgentDeviceRunner_AgentDeviceRunnerUITests_iphonesimulator26.2-arm64.xctestrunThe purpose-specific session was
geometry-live-428b8c9b6, with isolated state at/private/tmp/agent-device-1931-geometry.SBL95K/state. The public CLI route was:Both snapshots returned structured
success: trueoutput forcom.callstack.agentdevicelabwithsnapshotQuality.state: "healthy"andsnapshotQuality.backend: "tree". The regular artifact reportsvisibility.partial: true,45 nodes, and
scroll-hidden-above/scroll-hidden-below; the raw artifact reportsvisibility.partial: false, 279 nodes, and no visibility reasons. The isolatedevents.ndjsonrecords the regular snapshot asflags: {platform: "ios"}and the raw snapshotas
flags: {platform: "ios", raw: true};runner.logrecords both commands as accepted andcompleted successfully. This proves the projection through CLI → daemon → runner → wire rather
than through a helper or XCTest-only path.
For the deliberately clipped
Bakerydescendant in the same post-scroll state:The raw rect spans
y=48.666658..86.333314; the regular rect spansy=62.000000..86.333314. The regular wire output therefore carries the effective top clip andreduced height, while raw output preserves the original reported geometry.
Cleanup completed with
close --session geometry-live-428b8c9b6; the isolated session list wasempty afterward. Scoped daemon cleanup removed only this verification daemon and retained runner;
no verification-owned processes remained. The iPhone 17 Pro stayed Booted as it was before the
run, and the JSON/log artifacts remain at
/private/tmp/agent-device-1931-geometry.SBL95K/.No source files changed, so the exact head remains
428b8c9b62b30d202c06b5a3b568cb03045d4851.No app-control-bench files or unrelated worktrees/devices were touched. Nothing is merged.