Repository navigation
perf(ios): reuse the resolved window for a fill's content translation - #4769
Conversation
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>
Size Report
Startup median (7 runs, lower is better):
|
Apex Sentinel · ✅ Approve · review of
|
| 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.
|
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 |
Summary
A coordinate
fillreplacement resolves the app's window for its tap context, thenliveContentTranslationqueried 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
fill→keyboard enter: the focus phase went from 2 windows rounds / 18 XCTest steps to 1 round / 15 steps; every fill succeeded and verified. Focus took 2.4–2.7 s vs 2.8–2.9 s on base, but the host load average was 300–1000, so wall times are not a clean A/B.check:affectednot run (host load); CI owns the Swift unit and iOS device lanes on the pushed head.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.