Repository navigation
dogfood port: cmux next focus: no reclaim inside the grant of a page that still has focus (port of #25689) - #32654
Draft
lawrencecchen wants to merge 2 commits into
Draft
lawrencecchen wants to merge 2 commits into
lawrencecchen wants to merge 2 commits into
Conversation
…ting state of #25222) The granting state the reclaim guard of #25689 reads. Only this part of #25222: its keysReturned API, its app callers (FocusEffectApplier, KeyWindowRole), NSWindow+ChromiumPage and its webviews changes are not on the dogfood line and the guard does not need them. No behavior change by itself. (cherry picked from commit b36320b, ChildPageFocus granting state only)
… focus (#25689) * cmux next focus: test that a reclaim inside a grant still takes the keys back once the page blurred aReapplyInsideTheGrantDoesNotGrantAgain (red on feat-cmux-next since #24913) covers the other half: a reclaim inside the grant while the page still has focus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * cmux next focus: no reclaim inside the grant of a page that still has focus The grant's own key change (the page window's didBecomeKey) could re-apply the model, and its reclaim gave the keys straight back to the cmux window: two key changes, and the page stayed focused with no keys. keysReturned already treats key changes inside a grant as the grant's own; reclaim now does too, while the granted page still has focus. After a blur inside the grant it still reclaims. Fixes aReapplyInsideTheGrantDoesNotGrantAgain, red on feat-cmux-next since #24913 and surfaced by #25222 swift test run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Leo <cheerleaderleo@outlook.com> (cherry picked from commit 002c20e)
Contributor
Author
|
Not needed: the dogfood line is retired as a dogfood source; dogfood builds come from the feat tip (lead, STATUS 7979). Feat already has this guard (#25689). |
lawrencecchen
marked this pull request as draft
November 3, 2026 01:28
Contributor
Author
|
Not needed: the dogfood line is retired as a dogfood source (Lawrence, 2026-11-03); dogfood builds come from the feat tip, which has this fix. |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Port to the dogfood line of feat #25689 (no reclaim inside the grant of a page that still has focus). On
cp/dogfood-v2-2-12-opt,ChildPageFocus.reclaimhad no grant guard: the page window's owndidBecomeKeyinside a focus grant could re-apply the model, and its reclaim gave the keys straight back to the cmux window (two key changes; the page kept focus with no keys). This holds the browser P0 on dogfood (STATUS 7582 and 7809; REOPEN VIDEO journey cycle A fails 1 of 3 on dogfood for this reason).What this PR takes, exactly:
5f16828addc: from feat cmux next: cmd-n's new tab chat takes the keyboard, and the arrow keys come back to the text #25222 (b36320b), only thegrantingstate ofChildPageFocus(a private Bool set infocus(_:)aroundsetFocus). Not taken:keysReturned(to:during:), its app callers (FocusEffectApplier,KeyWindowRole),NSWindow+ChromiumPage.swift, its tests and all its webviews changes. The guard reads onlygranting.514a623397b: feat cmux next focus: no reclaim inside the grant of a page that still has focus #25689 (002c20e),cherry-pick -xwith no conflict:reclaimreturns whilegranting && page != nil, and the testreclaimInsideTheGrantAfterThePageBlurredTakesTheKeysBack(a blur inside the grant still reclaims).The regression test
ChildPageFocusKeyChangeTests.aReapplyInsideTheGrantDoesNotGrantAgainis already on the dogfood line, so the red run is the dogfood base itself.CEFTabHostFocusTests.aPageWindowTargetNeverTakesFirstResponder(fails on the dogfood base, same STATUS 7582) is NOT fixed by these feat commits, and no feat commit fixes it: the test and the.pageWindowinput target exist only on the dogfood line (37d2d85). Merge 259ac77 ("Merge perf/chrome-parity into the p13-webui-030 integration") brought back the unconditionalbecomeFirstResponderof a814b7a inChromiumHostPageView, somakeFirstResponderon a.pageWindowview succeeds. That needs its own dogfood fix; it is not in this PR.Testing
Fleet, dogfood suite filter (
scripts/ci/package-test-lane.sh suite Packages/macOS/CmuxNext ChildPageFocusKeyChangeTests), display worker gui-session-v1:5b50f8bb57ac6d0964fb9c75146a3423a0ceeeb2: step6a1db195f55ae829a1b6ff4a: FAILED as expected ("Test run with 6 tests", 1 issue):aReapplyInsideTheGrantDoesNotGrantAgainsaw key-window changes["pageB", "cmux"], expected["pageB"]514a623397b07da136afd56af0bceda7cb63bd76, 5 runs one after another: 1/5fd7dd53b6cb7db07aa242f32PASSED, 2/54cffa8a7692b750f97d03bf8PASSED (each "Test run with 7 tests in 1 suite passed"); 3/5174d9d7211e0211e4aca5dedPASSED; 4/568b90c9e48f4cea49a648fc8PASSED (each "Test run with 7 tests in 1 suite passed"); 5/51357853d98e9c46a69829b93CANCELLED when the dogfood ports stopped (4 of 5 greens)cmux-ci compile-check --app --package CmuxNext --recipe-version 2at the head: jobb9cea9ab5180b3526b4c8f02: PASSEDprepush-gate.py --base origin/cp/dogfood-v2-2-12-opt: no new violations.Observed / Not run
CEFTabHostFocusTests(not changed here, see above).No capture: focus logic with no visible UI change.
Changelog
none