Repository navigation
feat(serving): desktop Safari is supported, proven by its own CI job - #1505
Merged
Merged
Conversation
Option+Tab, Safari's Tab to every control on a Mac, left a patch's open plain modal dialog for Patchy's page, where Escape no longer closed it. The SDK's Tab helper now takes Option+Tab on a Mac, where Safari and Chromium move focus by it; plain Tab and every other platform are as before. Tell Patchy's panel gives focus back to its button after the switcher closes over it in WebKit too, which hides the panel without a toggle event. Every tier 1 browser spec now runs in WebKit on macOS as its own CI job, browser-webkit, which isn't a required check. Tests that assumed Chromium or Linux say how WebKit differs, and the docs now claim Safari. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Option+Tab is taken only on a desktop Mac outside Firefox. Tell Patchy settles a WebKit switcher close without arming the tap check or waiting, and an answer landing under the switcher waits for that close. The forced-download, embed-refusal, field-key and history tests keep their Chromium and Firefox strength, the WebKit goto waits on iframe#patch and lets a stalled frame fail, the broker is built for Safari 16 too, and the docs say what verify and Option+Tab cover. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The Option+Tab promise holds under Safari's default keyboard settings; with "Press Tab to highlight each item" on, Safari swaps the two keys. Said in the SDK README, the hotkeys skill and modalTab's comment. - The shell broker and core scripts target Safari 16.4, the oldest that runs the shared schemas' lookbehind, instead of 16, which only moved the failure from parsing to running. - WebKit's frame wait follows a shell that loads afresh to its next frame, and a closed or crashed page fails it. - `pnpm verify` is said to leave out server-image and rollback-rehearsal too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The build targets are syntax targets: Safari 16.4 parses the shared schemas' lookbehind, while what the shell and the SDK call, such as Promise.withResolvers, already asks for Safari 17.4 and later. - The keyboard caveat separates the helper's ends from the browser's own moves, and covers macOS's Keyboard navigation as well as Safari's "Press Tab to highlight each item". - WebKit's frame wait waits for the shell goto loaded and no further, as its comment says; a test needing a later shell's patch waits for it. - verify.ts's header matches the docs: server-image and rollback-rehearsal stay CI's, and GitHub's own checks stay GitHub's. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in WebKit WebKit's browser-webkit job failed once on the share dialog's Back and Forward, and the test failed 3 times in 120 runs under load on a Mac. Two races, both the test's: - Back before the redrawn dialog's deferred script ran stayed on the dialog's first entry. The test now waits for the page's DOMContentLoaded first. - Forward before the list's pageshow had given focus back to the menu's button found that hand-back pending and closed the dialog again. Where Back passes through the dialog's first entry, the test now waits for that focus, which it checked only after Close before. 120 of 120 runs pass under load in WebKit; Chromium and Firefox pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Opening Share and submitting the invite now wait for the dialog page's deferred script, as `loadDialog` does for the dialog's other loads, so neither entry can miss its place in the chain under load (Neon's nit on the previous commit). 120 of 120 runs pass under load in WebKit; Chromium and Firefox pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
Acceptance: PASS with notesChecked Done means
Golden journeys
Rollback answers: Match the diff. Patches built and published during the release retain the new helper in their bundles, which the prior release can still serve. No migration or persistent server contract changed. Not run
Notes
|
This was referenced Nov 22, 2026
Merged
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.
What changed
Patchy said desktop Safari was untested. Running the whole tier 1 browser suite in WebKit on macOS, and the bugs it pointed at in real Safari 27.2, found two real bugs, fixed here:
Every tier 1 browser spec now runs in WebKit on macOS as its own CI job,
browser-webkit. It isn't a required check. The docs now say desktop Chromium-based browsers, Firefox and Safari are supported, and mobile is outside this release.Look at
1. The dialog fix (
packages/patchy/src/modalTab.ts). In Safari and Chromium on a desktop Mac, the helper treats Option+Tab as a Tab. Nothing else changes:movesByOptionTabasks for a desktop Mac, not in Firefox. The platform must start with "Mac" (userAgentData.platformwhere Chromium has it, elsenavigator.platform), and a touch device doesn't count: an iPad asking for desktop pages says "MacIntel" but reports touch points. This is narrower than the Mac that TanStack Hotkeys and the switcher read Mod from. Their check also takes an iPhone, whose agent says "like Mac OS X", which is right for ⌘ but not for this key.modalTab.test.tscovers Safari, Chrome, Edge and Firefox on a Mac, an iPad asking for desktop pages, an iPhone, Chrome on Linux with and without a Mac's agent, and Chrome on Windows. Chromium and Firefox on Linux and Windows behave exactly as before.Walks in real Safari 27.2 over safaridriver, using
focus.spec's "New task" dialog with stand-in Patchy buttonsshell-beforeandshell-afteraround the frame. "task" is the dialog element itself.Playwright's WebKit walks Option+Tab the same way. Plain Tab goes round there too, but stops for one press outside the page on the way, where real Safari doesn't. So CI asserts the Option+Tab walks, and plain Tab was checked in real Safari. Chromium on a Mac had the same Option+Tab leak, which this fixes:
focus.spec's two dialog tests now press Option+Tab in WebKit. Both fail in WebKit with main's helper, at the wrap after Close, and pass with this one:2. Tell Patchy (
packages/portal/src/FeedbackPages.ts). When the switcher'sshowModal()hides the panel, WebKit fires notoggleevent for the panel. So the panel never ran its close steps, and never handed focus back. The script now remembers whether the panel is open. A close now has two parts: settling what was in flight, then giving focus back. Chromium and Firefox still get theirtoggleand take the same path as before. In WebKit:In real Safari, focus after Escape was
BODYbefore and is the Tell Patchy button after.tell-patchy.spec.ts:49fails in WebKit on main and passes here. The two new tests fail in WebKit with the first commit's script and pass in all three browsers here:3. The CI job.
browser-webkitruns onmacos-15, a standard GitHub-hosted arm64 runner. Likebrowser-firefox, it installs only its browser, builds what it runs and shares nothing. Nothingneeds:it, it has nocontinue-on-error, and no ruleset changed. A failure shows red on the PR and onmainwithout blocking a merge.webkitproject exists only on macOS.pnpm verify: it leaves WebKit out, since the job isn't required and Linux WebKit isn't Safari. On a Mac,pnpm test:browser:webkitruns it.~/Library/Caches.Promise.withResolvers, already asks for current browsers, Safari 17.4 and later, as it does of Chrome and Firefox. Neither output changes: the broker's is byte for byte whatmainbuilds, and core's is the same as it was for Safari 16.4. What the WebKit failures on main were. On
mainas it was, the suite gave 150 passed, 37 failed and 3 skipped in WebKit on macOS. Every failure but the two fixed above was a test assuming Chromium or Linux:fixtures.tsprepareblob:anddata:throughcontext.route, which aborted themfixtures.tspagegotoloadbefore its frame'sgotoalso waits for the frameiframe#patchholds to load its/~content/page, and fails when it stalls in place or the page closes or crashes. It waits for the shellgotoloaded and no further: a page without that frame returns at once, as does one whose shell takes the frame away for a notice or a fresh load. A test that needs the next shell's patch waits for it, astier1.spec's reload test doesfocus.spec,look-preview.spec, the sheet's steps inhotkeys.spectabhelper presses Option+Tab in WebKitfocus.specclick on a shell button,hotkeys.specopener, menu item and dialog buttonhotkeys.spec,shortcut-setting.spec,tier1.specpasteControl+…and "Ctrl" labels; on a Mac Mod is ⌘ControlOrMeta, and labels from the platform:⌘ /,⇥ Ahotkeys.specfield keyshotkeys.specrich textdownloads.spec,server-subscriptions.specnormalize()d namesui.spechistory at its longestpushStatecalls in 10 s; Firefox trims only after the taskui.specpressed submitui.specforced coloursstarting.specfleet retry, idle documentsLocalTaskProviderrefuses to start off Linux, in every browsertier1.specforced downloaddownloadstripped, WebKit shows the uploaded HTML as ablob:document in the shell's origin, and the inherited CSP refuses its scriptexample.invalidsharing.specshare dialog Back and Forwardpageshowgave focus back closed the dialog againloadDialog, which waits for the dialog page's deferred script, and, where Back passes through the dialog's first entry, the test waits for focus back on the menu's button before Forwardtier1.specembed refusalThe six WebKit skips are the three Firefox also skips (a touch drag, BFCache, tab-and-back), the two Linux-only fleet tests, and forced colours. Steps that drive Chromium's DevTools protocol skip in WebKit as they do in Firefox.
How it was verified
stream.specrerun alone passed, 31 of 31. CI'sbrowser-webkitis the full run on a hosted runner.focus,hotkeys,shortcut-setting,look-preview,downloads,tier1,ui,server-subscriptions,tell-patchyandstarting. At this head:tell-patchy,tier1,hotkeys,uiandfocusin both, all passing. CI'sbrowserandbrowser-firefoxare the full runs.pnpm format:check,pnpm lint,pnpm typecheckandtypecheck:tests, plus the unit tests beside the changed code:modalTab.test.ts(new),client.test.ts,hotkeys.test.ts,key.test.ts,FeedbackPages.test.ts,html.test.ts,SdkApi.test.ts, and serving'sPages.test.tsand the CLI'sdevServer.test.tsover the rebuilt broker.pnpm verifyend to end; mobile Safari; Safari with macOS Keyboard navigation or Safari's "Press Tab to highlight each item" turned on; Firefox on a Mac by hand.pnpm verify's wording. Both reviewed the third commit. Neon approved, with two nits; Sol asked for changes, fixed in the fourth commit: the build targets are described as syntax targets, since the shell and the SDK call APIs from Safari 17.4; the keyboard-settings caveat now separates the helper's ends from the browser's own moves and covers macOS's setting too; andscripts/verify.ts's header matches the docs. One finding is dismissed: Sol and Neon found that the third commit's frame wait could still miss a shell that reloads, if the old frame's detach arrives before the new document. The fourth commit drops the reload-following instead of chasing it. The wait bridges WebKit's load order for the shellgotoloaded; a test that needs a later shell's patch already waits for it itself, as the reload test does. Both approved the fourth commit. The fifth is test-only:browser-webkitthen failed once onsharing.spec's share dialog, which this PR hadn't touched, and the test failed 3 times in 120 runs under load on the Mac. Both failures were the test acting before the page's own script had run; after the fix it passed 120 of 120 runs under load in WebKit, and the spec passes in Chromium and Firefox. Both approved the fifth commit; the sixth applies Neon's nit, opening Share throughloadDialogtoo, and passes 120 of 120 under load in WebKit. Sol and Neon both suggested a separate issue for the two races in the dialog history script itself, which a person on a slow load could meet by pressing Back or Forward at once; that is left out of this PR.Hit every surface. These applied:
packages/patchy/README.mdand thepatchy-hotkeysproject skill say Option+Tab wraps in Safari and Chromium-based browsers on a Mac, and that Firefox there doesn't move focus by it.README.md,docs/product.mdand the Preact capability's limits.docs/DEVELOPMENT.mdcovers thewebkitproject, the job and its runner, and sayspnpm verifyruns the suites CI requires except live Clerk,server-imageandrollback-rehearsal, asAGENTS.md,README.mdandscripts/verify.tsdo.No wire contract, dev loop, vocabulary, migration, company resource or layout change.
Release note, the line for the next release's
patchChanges:Release impact
Breaking — requires action from anyone already running this
Not breaking — no action required. SDK page behaviour on a Mac, in patches rebuilt on this release; the portal's Tell Patchy script; the shell broker, built for Safari 16.4 too, with output unchanged; CI, tests and docs. No API, schema or CLI contract changes.
What does a revert leave behind? Patches built and published while this was in place keep the new helper in their bundles. Nothing on the server.
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.🤖 Generated with Claude Code