Repository navigation
test(browser): the local-hotkeys check reads an isolated patch frame's accessibility tree - #1406
Conversation
Acceptance: PASS with notesChecked Done means
The test still checks something: passed. I made one temporary, uncommitted change to Golden journeys: none touched. The diff changes 3 lines in one test file and no product code. Rollback answers: they match the diff. A revert leaves nothing behind except the helper failing again in desktop Chromium. "Not breaking" is right, and no Not run
Notes
Desktop Chromium config (throwaway, outside the repo, not committed)// Throwaway: the tier 1 config with desktop Chromium (channel "chromium") instead of the headless shell.
import base from "<worktree>/playwright.tier1.config.ts";
const root = "<worktree>";
export default {
...base,
testDir: `${root}/test/browser-tier1`,
globalSetup: `${root}/test/browser-tier1/setup.ts`,
outputDir: `${root}/.local/tier1-results-desktop`,
projects: (base.projects ?? []).map((project) => ({
...project,
use: { ...project.use, channel: "chromium" }
}))
};1. Head, both browsers: greenThe headless shell, through the repo's config unchanged. Desktop Chromium: The first run at the head, in the headless shell, included the global setup's build and also passed ( 2. Main, desktop Chromium: red at the native-modal-dialog step
3. Head with the announcer broken: red in both browsers, then green after reverting--- a/packages/patchy/src/hotkeys.ts
+++ b/packages/patchy/src/hotkeys.ts
@@ -1048,7 +1048,7 @@ export function HotkeySheet<const S extends string = "?">(props: HotkeySheetProp
{ class: "hotkey-announce", role: "status", "aria-live": "polite" },
said && createElement("span", { key: said.count }, said.label)
),
- home
+ document.body
),The headless shell, with the global setup rebuilding Desktop Chromium: I reverted with |
|
Review (GPT 6.1 Sol): nothing blocking. It checked Playwright 1.63.0's source and ran both paths. One nit, dismissed: "which has no session for it" means no separate session for the frame. The review found that clear enough in context, and it isn't worth another CI round. |
…s accessibility tree Co-Authored-By: Claude Opus 5.5 <[email protected]>
5a830db to
33a2b80
Compare
… its own process (#1302) ## What changed CI's browser tier ran Playwright's `chrome-headless-shell`, which keeps a patch's sandboxed frame in the shell's process. Desktop Chrome gives it its own process. That's how #1299 shipped: in desktop Chrome a patch didn't hear the keyboard until clicked, while CI was green. #1298 fixed #1299 on `main`. This PR moves the tier 1 suite's `chromium` project to desktop Chromium, so a focus or keyboard bug that only Chrome shows fails CI. It no longer holds anything back: every test in the suite runs in desktop Chromium. #1407's `firefox` project still runs `focus.spec.ts` alone. Closes #1299 ## Look at **`playwright.tier1.config.ts`.** The `chromium` project sets `channel: "chromium"`, the full build in new headless mode, and #1407's `firefox` project sits beside it unchanged. The headless-shell hold-out is gone. #1406 fixed the local-hotkeys test's accessibility helper, which couldn't read an out-of-process frame, and the test now passes in desktop Chromium. `pnpm test:browser` runs `chromium`, as on `main`, so `package.json` doesn't change. **What landed first.** In desktop Chromium on CI, `switcher.spec.ts` failed often (#1402). #1412 fixed that on `main`, with one real desktop-Chrome focus race fixed in the shell's broker and switcher tests that acted too early. One of #1412's tests, the tab switch in `switcher.spec.ts`, skips in the headless shell, which keeps every tab focused. It starts running on CI with this PR. **The frame really is out of process.** CDP's `Target.getTargets` lists it as its own `iframe` target in desktop Chromium, and not in the headless shell. ## How it was verified - **On CI at this head, `a92a7f1`:** the `browser` job passed twice in a row. Each time desktop Chromium passed 180 and Firefox 8, with none failed or skipped. The local-hotkeys test and the tab-switch test ran in desktop Chromium. - **Locally:** the local-hotkeys test passed 3 of 3 in desktop Chromium, and the Firefox project 8 of 8. - **Earlier heads, stacked on #1412 before it merged:** - Five passes in a row at its first head, and two or three at each later one. - One failure was the #1377 flake, since fixed on `main` by #1414. - One `test (bun)` failure was a `Fleet.test.ts` clock-step case, which passed on rerun. - The other failures were gaps in #1412's own fix, each fixed in #1412. - **CI cost.** No new download. `playwright install chromium` without `--only-shell` already puts both Chromium builds in Chromium's cache entry, and the action's comment says why it stays that way. - **Not checked:** headed Chrome on a real display. New headless is the same browser build and runs the frame out of process, as the target count shows. Hit every surface: - **Dev loop docs:** `docs/DEVELOPMENT.md` says the browser job runs desktop Chromium with `focus.spec.ts` also in Firefox, and that a script launching its own browser for a focus check passes the same channel. The CI job's and the Playwright action's comments say the same. - **Doesn't apply:** served pages, the wire contract, the CLI, vocabulary, migrations, company resources, reverse states and the repo layout. ## Release impact Tick exactly one. - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required. Test and CI configuration and doc lines; nothing ships. - **What does a revert leave behind?** Nothing. CI goes back to the headless shell. - **Does the release before it still work with that?** Yes. Built by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, through T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
…ey shortcuts (#1421) ## What changed This adds release 42's What's new entry, written from `1cd6d12`. It covers everything merged since release 41's `through` (`a25a9c5`), and sets the `patchy` release to `0.42.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | New: Tell Patchy what it's missing | #1217, #1218, #1219, #1227, #1228 | | New: Turn off single-key shortcuts | #1276, #1279, #1301 | | Fixed: Typing reaches the patch again | #1407, #1412 | | Fixed: Dialogs in patches keep your place | #1420, #1255 | | Behind the scenes: plainer facts for agents building patches | #1249, #1256, #1297, #1418 | | Behind the scenes: Patchy stores teams and audiences ahead of teams | #1416 | | Patch changes: Mod+/ and `client.close()` in patchy/hotkeys; single-key shortcuts can be off; Tab wraps in plain modal dialogs | #1279, #1301, #1420 | #1376 is release 41's own entry. #1400, #1406, #1414, #1415, #1302, #1413 and #1419 are test, CI and dev tooling and need no line. The teams bridge (#1416) ships alone in this release so teams (#1417) can follow in the next one with a release to roll back to that reads its data closed. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - **Rollback safety, from the live commit `7f93b91` (release 41) to this PR's merge.** No PR in the range is labelled `one-way`, and every Release impact answer says release 41 still works: - **#1217** adds migration `0037_feedback`, a schema release 41 never reads. **#1227** and **#1228** write into it. - **#1276** adds migration `0038_single_key_shortcuts`, a column with a default that release 41 never selects. - **#1416** adds migrations `0039_company_teams` to `0041_connection_audiences`, which hold tables that stay empty until teams ship, and widens one scope check. Its CI rehearsal ran `7f93b91 → head → 7f93b91 → head` on one set of data, and all four steps passed. - **#1279**, **#1301**, **#1255** and **#1420** change the SDK and the shell. Patches built on this release carry a `shortcutSetting` manifest field that release 41 reads without refusing, and its shell names no frame, so every shortcut stays on. - **#1218** and **#1219** add CLI commands and an optional `feedbackHint` in `--json` failures. A CLI from this release refuses to publish to an older instance before sending anything, as any mismatched release does. - Everything else is skill text, docs, tests and CI. If this release misbehaves, roll back to `7f93b91` (release 41). Written by Claude Opus 5.5 in Claude Code, through T3 Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
What changed
The tier 1 browser test "local hotkeys: the narrowest place wins" failed in desktop Chromium. Its
statuses()helper looked for the patch's frame in the page's frame tree, but desktop Chromium runs the sandboxed patch frame in its own process, so that frame isn't in the page's tree and the helper threwTypeError: Cannot read properties of undefined (reading 'frame'). Main is green only because CI still runs chrome-headless-shell, where the frame shares the page's process.The helper now opens a CDP session on the patch frame itself (
context.newCDPSession(frame)). That works when the frame has its own target, as in desktop Chromium. In the headless shell Playwright refuses a separate session for an in-process frame, so the helper falls back to the page's session as before. Either way it finds the/~content/frame in that session's frame tree and reads that frame's accessibility tree withAccessibility.getFullAXTree, so the assertions are unchanged.Once this lands, #1302 can drop its
headlessShellOnlyhold-out and the headless-shell project that runs it.Closes #1306
Look at
The one changed line in
test/browser-tier1/hotkeys.spec.ts, insidestatuses():To check that each browser takes the path I expected, I ran once with a temporary log, since removed. Each of the three
statuses()calls used the frame's own session in desktop Chromium and the page's session in the headless shell.How it was verified
For desktop Chromium I used a throwaway config outside the repo. It imports
playwright.tier1.config.tsand setschannel: "chromium"on its project, and isn't committed. The headless shell runs through the repo's config unchanged.Before, desktop Chromium: red
After, desktop Chromium: green
After, headless shell (
playwright.tier1.config.ts): greenpnpm typecheck:tests,pnpm lintandbun fmt --checkpass. Locally I ran only this test. CI'sbrowserjob runs the rest of the tier.Release impact
Tick exactly one.
Only a test helper changed, and no product code.
Built by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code, through T3 Code.