Repository navigation
fix(serving): a key pressed as a patch opens reaches the patch - #1183
Conversation
|
Review (GPT 6.1 Sol, xhigh) on 9504e7d: approve, no findings.
|
Acceptance: PASS with notesChecked Done means
Golden journeys
Rollback answers: they match the diff. Only the shell's browser script changes, served under a digest-named URL. Nothing is stored, and a revert only brings the lost key back. No Not run
Notes
|
d9eedbf to
2b6e2c4
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2b6e2c4 to
fe096f5
Compare
…ges publish (#1241) ## What changed This adds release 36's What's new entry, written from `1acc968`. It covers everything merged since release 35's `through` (`dd0e2ec`), and sets the `patchy` release to `0.36.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | Improved: shortcuts work where you use them (keys for one part of a patch, the closest wins, text boxes keep their typing keys) | #1231 | | Improved: the shortcuts sheet shows what works where you are (Ctrl+/ and ⌘/ open it, its commands run, it opens from a patch's menu and in view on a narrow screen, keeps the look, spells keys out away from a Mac) | #1231, #1181, #1178, #1180, #1177 | | Fixed: keys pressed while a patch opens reach it | #1183 | | Fixed: pages styled with Tailwind 4 publish, and a look with the same rule saves | #1191 | | Fixed: an old copy of a patch no longer replaces newer work (**Breaking** for such a copy: it needs `patchy pull` or one `--allow-behind` publish) | #1179 | | Improved: your agent can check a publish before sending it | #1188 | | Improved: your agent hears what changed when it updates a patch | #1186, #1185 | | Fixed: your agent stops chasing false alarms (`pnpm install` exit codes, `manifest.json` bytes, the description notice, a copied dev record) | #1176, #1174, #1175 | | Behind the scenes: fuller hotkeys instructions for agents; fewer redraw costs for patches with many shortcuts | #1182, #1187 | `patchChanges` has three sentences for the agent refreshing a patch across this release: - #1231's, from its PR: text fields keep their keys, `preventDefault()`, and the sheet's Mod+/ and `.hotkey-row` buttons. - The sheet's dialog renders in `document.body`, and element-only page rules don't reach it (#1178, #1180). Its own row lists last (#1181). The hotkey label helpers take only valid literals (#1177). - Publish's `unknown_base_version` (#1179). It also rewords release 33's "Press ? to see every shortcut a patch has". That was true only for a patch that mounts the shortcuts sheet, so it now says a patch *can* list its shortcuts. The rest get no line: - #1206, #1207, #1209 and #1220 are `pnpm dev eval` tooling. - #1222 is release 35's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`, and release 33's reworded line. - **Rollback safety, from the live commit `d28fdd0` (release 35) to `1acc968`:** - #1191 is labelled `one-way`. Its Release impact: a company look published after this release with a nested `@supports` condition stays stored after a revert. Release 35 refuses any bundle carrying it, so repo publishes in that company would fail until an admin runs `patchy look restore` to an earlier revision. Pages and Tailwind 4 repos already published stay published. - #1183 is the only change to what the server serves browsers: the shell's script, under a digest-named URL. Its revert leaves nothing behind. - The hotkeys PRs change `patchy/hotkeys`, which patches bundle when they are built. Published patches keep their copy. - The CLI PRs change what a CLI writes and refuses. Release 35 reads everything they leave behind: #1176's `allowBuilds` entry, #1174's indented `manifest.json`, and the `version` recorded by an `--allow-behind` publish. **Rollback line:** If this release misbehaves, roll back to `d28fdd0` (release 35). First check that no company's look has a nested `@supports` condition, and `patchy look restore` an earlier revision where one does (#1191). ## How it was verified - **Tests.** `whatsNew.test.ts`, `WhatsNewPages.test.ts` and `schemas.test.ts` pass (22 tests), and `bun fmt` passes on the changed files. - **Facts.** The sheet's new `document.body` home and its element-rule reset were checked against `hotkeys.ts` and `hotkeySheet.ts` on main. - **Deploy state.** I pinned the live commit from `/healthz/deep`: `d28fdd0` (release 35). The Deploy run updated last succeeded, and none is unfinished. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Text and version numbers only. Like every release, the `0.36.0` bump tells CLIs and patch repos installed before this deploy to upgrade. - **What does a revert leave behind?** Nothing. - **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]>
What changed
A patch is on screen and listening before its frame's load event, which waits for the page's last subresource. The shell only gave the frame focus in that load event, so a key pressed in between went to the shell and the patch never saw it. Now the shell focuses the frame as it starts loading the patch, so the first key pressed once the patch is listening reaches it, with no click. Focus on the shell's own UI, such as the starting cover, still stays where it is.
Closes #1171
Look at
packages/serving/src/broker.ts: one guardedhandOffKeys()runs just beforeframe.srcis set, and again in the load listener. The guard is unchanged from fix(serving): a patch gets the keyboard when it opens #1097: it moves focus only whendocument.activeElementisnullorbody. The load call stays for the case where focus falls back to the shell's body while the frame loads.test/browser-tier1/focus.spec.ts, new case "a key pressed before the frame's load event still reaches the patch". It opens the gap without relying on timing. An init script stops the frame's load event from reaching the shell's listeners, so the patch is up and listening and the shell never runs its load handoff. A key pressed then must reach the patch. Red on main, green here:Because the new case never lets the shell's load listener run, its pass also shows that focus given to the frame before its document loads survives the frame's navigation in both Chromium and Firefox.
How it was verified
pnpm check, then onepnpm verifybefore CI took over as the judge: format, lint, typecheck, synth, postgres-concurrency, cli-smoke, install, tier2-smoke and the whole browser suite pass.testandtest (bun)failed outside serving: the CLI stub-server cases recorded a strayGET /, the local port probe that doesn't happen on CI, which also double-countsGET /inRequestEvents; the rest were 5 s timeouts while other worktrees ran their suites on this machine.Release impact
Tick exactly one.
Breaking — requires action from anyone already running this
Not breaking — no action required. It changes only the shell's browser script, served under a digest-named URL: no contract, schema or configuration.
What does a revert leave behind? Nothing. A key pressed before the frame's load event is lost again.
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.