Skip to content

docs(ios): state the fold's clipped-carrier hittability as false, not nil - #2958

Merged
thymikee merged 1 commit into
mainfrom
docs/fold-hittability-comment
Sep 25, 2026
Merged

thymikee merged 1 commit into
mainfrom
docs/fold-hittability-comment

Conversation

@thymikee

@thymikee thymikee commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up on #2945 (cubic inline review, SnapshotVisibilityFold.swift:248). The clippedHittability doc comment claimed a visibilityExempt carrier clipped to nothing by a scroll anchor is the nil case. It is not: the degenerate clipped frame fails isPositiveFinite and answers false; nil stays reserved for containment being undecidable while the capture has no viewport box. Comment-only correction; the implemented policy is unchanged and correct.

Validation

Head 493be9eeef. Docs-only: no runtime behavior changes, so no device or CLI runs apply. swift test --package-path apple/snapshot-presentation: 17/17 pass. pnpm check:affected --run result will be recorded by the CI gate stage on this head.

Review in cubic

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.83 MB 4.83 MB -11 B
Package (unpacked) 4.83 MB 4.83 MB -11 B
Package (download) 1.45 MB 1.45 MB -18 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 18.4 ms 18.3 ms -0.1 ms
CLI --help 52.6 ms 50.0 ms -2.5 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFold.swift">

<violation number="1" location="apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFold.swift:246">
P3: This sentence is ungrammatical and makes the corrected clipping scenario ambiguous. Say that the carrier was clipped to nothing by a scroll anchor.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

/// open question. A `visibilityExempt` carrier clipped to nothing by a scroll anchor is that
/// `nil` today, and its own frame already answers the question.
/// source left undecided is re-decided on the clipped frame: a disabled or degenerate frame —
/// including a `visibilityExempt` carrier a scroll anchor clipped to nothing — answers `false`,

@cubic-dev-ai cubic-dev-ai Bot Sep 25, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This sentence is ungrammatical and makes the corrected clipping scenario ambiguous. Say that the carrier was clipped to nothing by a scroll anchor.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apple/snapshot-presentation/Sources/AgentDeviceSnapshotPresentation/SnapshotVisibilityFold.swift, line 246:

<comment>This sentence is ungrammatical and makes the corrected clipping scenario ambiguous. Say that the carrier was clipped to nothing by a scroll anchor.</comment>

<file context>
@@ -242,10 +242,10 @@ public enum SnapshotVisibilityFold {
-  /// open question. A `visibilityExempt` carrier clipped to nothing by a scroll anchor is that
-  /// `nil` today, and its own frame already answers the question.
+  /// source left undecided is re-decided on the clipped frame: a disabled or degenerate frame —
+  /// including a `visibilityExempt` carrier a scroll anchor clipped to nothing — answers `false`,
+  /// and `nil` stays reserved for the one question the clipped frame cannot answer, containment
+  /// while the capture has no viewport box.
</file context>
Suggested change
/// including a `visibilityExempt` carrier a scroll anchor clipped to nothing — answers `false`,
/// including a `visibilityExempt` carrier clipped to nothing by a scroll anchor — answers `false`,
Fix with cubic

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed at 493be9e. This is a comment-only doc fix, and the change matches the code: the fold's clipped carrier is documented as false, not nil, which lines up with a static read of SnapshotGeometry.swift and SnapshotVisibilityFold.swift and with the validation already recorded on #2945.

All 19 checks are green, and none of them exercise a route beyond the doc text since nothing but wording changed. I did not re-run the iOS differential or golden-table suite locally for this PR; the confirmation rests on #2945's merged validation and the static read above.

This is ready for human review.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 25, 2026
@thymikee
thymikee merged commit 0414e12 into main Sep 25, 2026
19 checks passed
@thymikee
thymikee deleted the docs/fold-hittability-comment branch September 25, 2026 09:39
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-25 09:39 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