Repository navigation
fix(sdk): a page's element rules no longer restyle HotkeySheet, and it finishes without a look - #1180
Conversation
|
The hotkeys browser spec ran at the head of the stacked #1181, which carries this PR's new case unchanged (#1181 only edits the sheet-listing test and adds a step): |
6509a1f to
eb86790
Compare
|
Re-check (GPT 6.1 Sol, xhigh) on 37ec16a: FAIL, one P2. The reset weighs (0,0,9), so a ten-element selector such as Next: weight each reset rule as a single
|
|
Re-check (GPT 6.1 Sol, xhigh) on 8cf7bac: FAIL. Unlayered element rules of any length are now blocked, and every
Next, the last round on this PR:
|
|
Final re-check (GPT 6.1 Sol, xhigh) on 5a50bb7: one P3 left, being fixed. The bidi reset skips the dialog element itself, so on an RTL page a Verified within the stated contract:
The browser case fails at |
|
Sol's last P3 is fixed in 5f05bf1. The bidi reset now includes |
Acceptance: PASS with notesChecked I published seven tier 1 patches from the environment's CLI. Each one went up twice: once built against this head's release, and once against the base's Done means
Golden journeys
Rollback answers: they match the diff. The change is SDK styling plus one class on the keycaps. It has no schema, API, CLI or server change, and published bundles keep their styles. Not run
Notes
|
a55c6ee to
b344013
Compare
…t finishes without a look Co-Authored-By: Claude Opus 5.5 <[email protected]>
5f05bf1 to
4fd1683
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 page's ordinary element rules restyled the shortcuts sheet by accident. One page's
kbd { … }shrank every keycap, another's hid them, and abutton { … }rule redrew the?and close buttons. On a page without the company look, the sheet drew in the system font with an ink frame and an offset shadow that matched nothing, and the?button had no hover. Now the page's rules made only of element names, however long, such askbd,html body kbdorbody dialog, don't reach the sheet or its button. Rules aimed at thehotkey-*classes still restyle them. Without a look, the sheet and button take the page's font and text colour, with hairlines and no shadow. With a look, the?is one of the look's buttons, square, with the look's height and hover.Closes #1158
Look at
A page without the company look, with its own
kbdandbuttonrules. Before, the page's green button rule and dark keycap rule reach the sheet, and it draws in the system font with a black frame and an offset shadow. After, it draws in the page's serif and text colour, with hairlines:The button row is hovered: before, it was the page's green button with no hover feedback; after, it has a hover tint.
With the Patchy look, the sheet itself is unchanged, and the
?becomes one of the look's buttons. This is the call to check: "follows the look's control size and hover" read literally makes it the look's plain button, which in the Patchy look is the blue primary. The look's hover only makes sense on the look's own resting colours, so the colours come with it.These screenshots render the real
HotkeySheetfrom each commit's source, bundled into one page in Chromium, without the Patchy frame. The base is #1157's head.How the stylesheet is built (
packages/patchy/src/hotkeySheet.ts): two<style>elements.The contract: element rules in the page's stylesheets, layered or not, don't reach the sheet. Its unlayered rules with a class, attribute or pseudo-class can,
button:hoverincluded, and so can layers declared after the sheet first mounts. The?button also takes the page's layered styles, as the page's own buttons do, which is how it follows the look.kbd,html body kbdinside@media,html body dialog div div section ul li span kbd, and a Tailwind-style@layer base { kbd { … } button { … } }, including rules added to that layer later.directionandunicode-bidionkbdor on thedialogare blocked too: on a right-to-left page, the sheet stays right to left.button:hoveror.dark kbd.hotkey-*classes, a single class included, as in.hotkey-key { … }. That holds even for one prepended to<head>after the sheet mounted, since the sheet moves its reset back first as it opens. A hover restyle names the state with the class:.hotkey-opener:hover.<head>wholesale, which loses the reset until the sheet next opens.The
button:hoverchoice was deliberate: a patch's deliberate.hotkey-openerrestyle matters more than blocking an accidental hover rule. The page's unlayered class rules and element rules differ only in specificity and source order. Blockingbutton:hover(0,1,1) would also outweigh.hotkey-opener(0,1,0).On a page without a look, tokens used without a fallback drop out:
color: var(--look-fg)inherits the page's colour, the card's shadow disappears, and each line falls back to a hairline. Amax-contentwidth withaspect-ratio: 1keeps the?square at whatever height the look gives its buttons, even in a stretching flex column.How it was verified
a page's element rules don't reach the sheet…, publishes a page with unlayeredkbd,buttonanddialogrules, longer ones such ashtml body main button,body dialogand@media (min-width: 0px) { html body kbd { display: none } }, abody *rule, a Tailwind-style@layer basepreflight onkbdandbutton,direction: rtlonkbd, plus a one-class.hotkey-keyrule, all in<head>before the sheet mounts. After it mounts, the page prepends a.hotkey-keyrule ahead of the reset; opening the sheet moves the reset back first, and that rule wins. The page then addshtml body dialog div div section ul li span kbd, one weighing twenty element names, and a rule in the existingbaselayer. The keycaps stay visible, opaque, in the page's font and left-to-right, and the close button isn't uppercased. No element of the sheet or its button takes thebody *rule, whilemaindoes. A one-class rule for every renderedhotkey-*class, added after the reset, reaches every part. Without a look it checks that the keycaps keep their size, the close button its padding and the dialog its border, and that the class rule still colours the keycaps. It also checks the page's font and colour, the 1px frame, no shadow, and a hover on the?. It then adds a look and checks that the?is 48×48, takes the look's resting and hover backgrounds, and that the sheet takes the look's 2px frame and offset shadow.pnpm exec playwright test -c playwright.tier1.config.ts --project=chromium test/browser-tier1/hotkeys.spec.ts: 5 passed at the stack's head (09e9a6e, feat(sdk): HotkeySheet's own row takes a group, and openHotkeySheet opens it from a page's control #1181), which carries this PR's case unchanged. The screenshots above were re-shot at this head and came out byte-identical.pnpm typecheck,pnpm typecheck:tests, and the hotkeys and SDK skill tests (hotkeys.test.ts,hotkeySheet.test.ts,hotkeyRules.test.ts,SdkApi.test.ts), all passing. No fullpnpm verifyran locally: the machine is shared and heavily loaded, so CI's full suite is the judge.?measured square in a flex column, a flex row and a block, with no look (36px), the Patchy look (44px) and a look whose buttons are 32px high.The README's sheet paragraph, the
HotkeySheetdoc comment and thepatchy-hotkeysskill now describe the styling.Release impact
Patch-side SDK styling. A patch picks it up when it is rebuilt against a release that carries it, and its
?button then looks like the look's buttons. Its own rules aimed athotkey-*classes keep working.Built by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code, through T3 Code.