Skip to content

perf(ios): reuse the resolved window for a fill's content translation - #4769

Merged
thymikee merged 1 commit into
mainfrom
perf/ios-fill-reuse-resolved-window
Nov 19, 2026
Merged

thymikee merged 1 commit into
mainfrom
perf/ios-fill-reuse-resolved-window

Conversation

@thymikee

@thymikee thymikee commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

A coordinate fill replacement resolves the app's window for its tap context, then liveContentTranslation queried the windows again in the same command. The content translation now comes from the context's own resolved window, which removes one XCTest windows round (about 3 queries) from every ref/point fill.

The fresh read stays wherever the context does not prove a window origin: no resolved window (sole-screen frame), an unreadable tree, or a lit-panel booking. The off-origin window case from #3899 keeps its proof.

3 runner files, +14/−2.

Validation

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

A coordinate replacement resolves the app's window for its tap context,
then liveContentTranslation queried the windows again. The translation
now comes from the context's own resolved window. A context without one
(sole-screen frame, unreadable tree) or booked on a lit panel still reads
fresh, so the off-origin window case from #3899 keeps its proof.

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

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.41 MB 6.41 MB +582 B
Package (unpacked) 6.41 MB 6.41 MB +582 B
Package (download) 1.95 MB 1.95 MB +116 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 50.0 ms 50.6 ms +0.6 ms
CLI --help 112.3 ms 125.8 ms +13.4 ms

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 273c9a9

No open findings.

2 findings below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (eeff795f47df).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 273c9a9. The code is correct, and all reported checks pass or skip, including Smoke Tests (ios), Runner Build (tvOS + visionOS), Integration Tests and Coverage. There are no conflicts. No other change is needed before merge.

Not blocking, and you can take or leave these: the two-line window-to-translation rule in the new overload repeats the read overload, so one private helper could serve both; no unit test pins that a resolved-window context skips the windows read while lit-panel, no-window and treeUnreadable contexts still read (the existing windowListReads helper could count this); and the #3899 off-origin case has only been checked by reading the code, because the live Bluesky run was full-screen, so one fill @ref on the shrunken-window iPad Calendar or Settings would back the PR body's claim.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 19, 2026
@thymikee
thymikee merged commit 8d40b08 into main Nov 19, 2026
19 checks passed
@thymikee
thymikee deleted the perf/ios-fill-reuse-resolved-window branch November 19, 2026 17:25
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