Skip to content

refactor(ios): drop the unused vector rotation and the duplicate round trip - #3975

Merged
thymikee merged 1 commit into
mainfrom
simplify/coordinate-space-dead-code
Oct 26, 2026
Merged

thymikee merged 1 commit into
mainfrom
simplify/coordinate-space-dead-code

Conversation

@thymikee

@thymikee thymikee commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Deletes three pieces of the iPhone/iPad coordinate-space code that pin nothing. No behavior change, no scope expansion, no linked issue. Four files, 66 lines removed.

  • CoordinateSpaceRotation.native(vector:interfaceOrientation:) and its test. A repository-wide search finds no caller outside CoordinateSpaceTests.swift; dispatch uses native(point:in:) and capture uses oriented(point:rect:). Its public only serves the runner target in this repo.
  • RunnerTests+SynthesizedInteractionTests.testSynthesizedDispatchInvertsCaptureOnEveryInterfaceOrientation. Host CoordinateSpaceTests.testOrientationRotationRoundTripsBetweenInterfaceAndNativeSpace pins the same inverse identity over the same four orientations, plus unknown and an iPad-sized offset frame. Both maps are affine, so either round trip implies the other.
  • One doc line: TextEntryContentTranslation.none means the resolved window's box sits at the screen origin, not that the app fills the screen.

Validation

Head 66bf202, base 581357b.

  • Mutant, disposable checkout at the base: oriented's landscapeLeft row reads height - point.y. swift test --package-path apple/snapshot-presentation: base 24 tests 0 failures; candidate removed plus mutant 13 failures, led by the retained round-trip test. Worktree removed.
  • pnpm gate ios-snapshot-differential: Swift 23 tests 0 failures; 12 TypeScript tests pass.
  • Runner unit lane, unit-test compile flag on, the 16 RunnerTests+SynthesizedInteractionTests methods: iPhone 17 Pro Max 16 passed, iPad Air 11-inch (M4) 16 passed, 0 failures.
  • pnpm check:affected --run --head 66bf202ae: passed, exactCommit=true. check:xctest-selection: 0 methods dark.
  • Apple / Smoke Tests failed once on an infrastructure fault in its log (hashFiles(...) timed out at 120 s, skipping the iOS XCTest step). Rerun once: passed. The sole-screen route is unchanged, so no XCTest Nightly dispatch.
  • Unresolved risks: none inside the repository.

Size: installed and unpacked package -484 B, download -64 B; startup medians within noise.

🤖 Generated with Claude Code

…d trip

`CoordinateSpaceRotation.native(vector:interfaceOrientation:)` has no caller
outside its own test: gesture dispatch uses `native(point:in:interfaceOrientation:)`
and capture uses `oriented(point:rect:...)`. Delete the overload and its test.

Delete the runner's `testSynthesizedDispatchInvertsCaptureOnEveryInterfaceOrientation`.
The host `CoordinateSpaceTests.testOrientationRotationRoundTripsBetweenInterfaceAndNativeSpace`
already pins the same inverse identity over four orientations, an unknown
orientation, and an iPad-sized offset frame. Mutating the `landscapeLeft` row of
`oriented` now fails three host tests with the runner copy removed.

Say what `.none` means: the resolved window's box sits at the screen origin,
not that the app fills the screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 4 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.56 MB 5.56 MB -484 B
Package (unpacked) 5.56 MB 5.56 MB -484 B
Package (download) 1.69 MB 1.69 MB -64 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 31.3 ms 32.3 ms +0.9 ms
CLI --help 65.2 ms 62.5 ms -2.8 ms

@thymikee

Copy link
Copy Markdown
Member Author

I found no problems in the code at 66bf202. The change touches only Swift runner unit tests, a snapshot-presentation package and a doc comment, so it does not overlap any daemon, CLI or smoke route. The Smoke Tests check is still running and has not failed, so the next step is for it to finish green. I did not run the Swift tests or the mutant experiment; this review relies on the runs reported in the PR and on static greps.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 26, 2026
@thymikee

Copy link
Copy Markdown
Member Author

Smoke Tests is green at 66bf202 (the first run failed on a hashFiles(...) 120 s timeout inside the cache action, which skipped the iOS XCTest step; the single rerun passed). All 15 required checks pass, no conflicts.

@thymikee
thymikee merged commit ed1e3c9 into main Oct 26, 2026
16 of 17 checks passed
@thymikee
thymikee deleted the simplify/coordinate-space-dead-code branch October 26, 2026 19:36
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-26 19:38 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