Repository navigation
chore(deps): bump preact to 11.1.0 - #975
Conversation
Review: GPT-6.1-Sol (xhigh), three roundsRound 1, at
Round 2, at Round 3, at
|
48865cd to
a34fa83
Compare
Bump the bundled Preact to 11.1.0, @preact/signals to 2.11.4 and @preact/signals-core to 1.14.5. Preact 11 moves its attribute and event types out of JSX into the preact module, which patches cannot import, so patchy/preact now re-exports Preact's types. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
a34fa83 to
d221d8b
Compare
Acceptance: PASS with notesChecked Done means No linked issue; checked the PR's What changed and Look at claims.
{"ok":false,"error":"Typecheck failed. Run `pnpm exec tsc --noEmit` and fix the errors before publishing. `.agents/skills/patchy-preact/SKILL.md` says where Preact's types live.","kind":"local"}
Golden journeys
Packed-suite outputRollback answers: match the diff, with Not run
Notes
|
## What changed This adds release 30's What's new entry, written from `e3d50f0`. It covers everything merged since release 29's `through` (`5eeb154`). It also sets the `patchy` release to `0.30.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. | Change | PRs | | --- | --- | | Improved: patches move to Preact 11. Pages come out a little smaller, and an existing patch moves over at its next publish, where its agent may need to fix a few type errors first | #975 | #1116 is release 29's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. It carries the line #975 asked the deploying agent to use: patches move to Preact 11 at their next publish, and the agent may need to fix a few type errors first. - **Rollback safety, from the live commit `1d7eca8` (release 29) to `e3d50f0`:** - #975 is labelled `one-way`. Published pages each carry their own Preact, so release 29 serves every page, including pages published on this release. But a repo that adopts Preact 11's moved type imports from `patchy/preact` (such as `TargetedDragEvent` or `CSSProperties`) fails release 29's publish typecheck until those imports go back to `JSX.*`. No schema, rows or wire changes. **Rollback line:** Rolling back past #975 would stop patch repos that adopted Preact 11's moved type imports from publishing, because release 29's typecheck doesn't know them; fix forward instead. ## How it was verified - **Tests.** `whatsNew.test.ts`, `schemas.test.ts` and `WhatsNewPages.test.ts` pass (21 tests), and prettier passes on the changed files. - **The range.** #975 was reviewed by GPT 6.1 Sol over three rounds with every finding resolved. Acceptance gave PASS with notes at its head, and it landed with all 12 required checks green. - **Deploy state.** The live commit, pinned from `/healthz/deep`, is `1d7eca8` (release 29). 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. The `0.30.0` bump tells CLIs and patch repos installed before this deploy to upgrade, as every release does. The breaking change it announces is #975's. - **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 could only get keyboard shortcuts if its builder's agent
hand-wrote `keydown` code. That code is easy to get wrong in text
fields, dialogs, sequences, other keyboard layouts and ⌘ versus Ctrl.
Now tier 1 and 2 pages import `patchy/hotkeys`, Patchy's own API over
TanStack Hotkeys, which is bundled inside it, and every tier 1 and 2
repo gets a `patchy-hotkeys` skill.
```tsx
import { HotkeyScope, formatHotkey, useHotkey, useHotkeyList } from "patchy/hotkeys";
useHotkey("G H", () => patchy.route.set("/"), { label: "Go home" });
useHotkey("Mod+K", openSearch, { label: "Search" });
```
Closes #1092. Part of #1086. Stacked on #1087, so keys reach the page
without a click.
Rebuilt from the #1052 prototype, with the issue's changes:
- **No `Control`.** A chord is `Mod`, `Alt` and `Shift`.
- **`HotkeyScope` is always exclusive.**
- **`Mod+Shift+K` is reserved.** The types refuse it in either letter
case, and a string cast past them is skipped with a console warning.
- **Conflicts warn in Patchy's words.** TanStack lets them through. Our
warning fires once, naming both labels, after every hook's update in a
render has landed.
- **Pins:** `@tanstack/preact-hotkeys` 0.17.1 over `@tanstack/hotkeys`
0.19.0, exact.
- **Licences:** both MIT notices, Hotkeys 2026 and Store 2021, are in
`dist/licenses`.
It costs 13.4 KB gzipped, only in pages that import it: a minimal Preact
page goes from 17.9 to 31.4 KB in Vite's production build.
## Look at
**A string that isn't a hotkey fails `pnpm typecheck`, saying what to
write instead.** `packages/patchy/src/hotkeys.test.ts` asserts these
lines exactly, against the published declarations:
```
consumer.ts(2,11): error TS2345: Argument of type '"Ctrl+K"' is not assignable to parameter of type '"'Ctrl+K' isn't a chord: write 'Mod+K', which is ⌘ on a Mac and Ctrl elsewhere"'.
consumer.ts(3,11): error TS2345: Argument of type '"Control+K"' is not assignable to parameter of type '"'Control+K' isn't a chord: write 'Mod+K', which is ⌘ on a Mac and Ctrl elsewhere"'.
consumer.ts(5,11): error TS2345: Argument of type '"Esc"' is not assignable to parameter of type '"'Esc' isn't a chord: write keys like 'Mod+K', 'Escape', '?' or 'G H', modifiers in the order Mod, Alt, Shift"'.
consumer.ts(7,11): error TS2345: Argument of type '"Mod+Shift+K"' is not assignable to parameter of type '"'Mod+Shift+K' is kept by Patchy for its own shortcuts: choose another chord"'.
consumer.ts(9,11): error TS2345: Argument of type '"G Mod+Shift+K"' is not assignable to parameter of type '"'Mod+Shift+K' is kept by Patchy for its own shortcuts: choose another chord"'.
```
The test also covers `"Cmd+K"`, `"Shift+Mod+K"`, `"Mod+Shift+k"` and
`"Ctrl+Shift+K"`. `"Mod+K"`, `"?"`, `"G H"`, `"Alt+ArrowUp"` and a
`Chord[]` built from data typecheck clean.
**A published tier 1 page in the shell**
(`test/browser-tier1/hotkeys.spec.ts`, Chromium):
- `G H` changes the route on the first press, with no click.
- In a text field, `L` waits and `Mod+Enter` fires.
- On a checkbox, radio or range, `L` fires, and Space and the arrow keys
still work the control.
- An open `HotkeyScope` holds back the page's `L` and its `G H`, while
its own `G H` fires. `useHotkeyList` still lists the page's labelled
hotkeys.
- Layouts use trusted key events:
- AZERTY's `?` (Shift on `KeyM`) fires `"?"`.
- Russian `о` on `KeyJ` fires `"J"`.
- AZERTY's Ctrl+`=` on the `/` key fires `"Mod+="`, not `"Mod+/"`
(TanStack/hotkeys#210).
- Ctrl+Shift on the `/` key, which types `?`, fires `"Mod+Shift+/"`: a
shifted ASCII symbol falls back to its key's position.
- On an emulated Mac, `formatHotkey("Mod+K")` is `⌘ K`, and Meta+Enter
fires `Mod+Enter` where Control+Enter doesn't.
- Two sibling components swap `K` and `L` in one state update, and
nothing warns. A third component binding `K` then warns once: `"Second"
and "Third" both use K`.
```
✓ [chromium] › test/browser-tier1/focus.spec.ts:16:1 › a patch hears the keyboard once its frame loads (166ms)
✓ [chromium] › test/browser-tier1/hotkeys.spec.ts:118:1 › patchy/hotkeys fires in the published frame across fields, scopes, layouts and a Mac (721ms)
✓ [chromium] › test/browser-tier1/hotkeys.spec.ts:227:1 › a conflict warning waits for every hook's update, so siblings swapping keys don't warn (293ms)
```
TanStack 0.19.0 fixed the checkbox, radio and range case
(TanStack/hotkeys#206), so the layer carries no workaround for it.
**Fresh agents, `pnpm dev trial` on Sonnet 5.5, two runs per brief.**
Before is #1087's head, which has no helper. After is this PR plus one
local-only commit, never pushed: a `minimumReleaseAgeExclude` for the
two TanStack versions, so the evidence install gets past the release-age
window. That window has since passed, and nothing pushed bypasses the
policy.
- **Directed: a task tracker with `G H`, `G D`, `C T` and `?`.**
- Run 1: the after agent took the single-file route, with no repo,
hand-wrote the keys in one HTML file and published. A single-file page
can't import `patchy/hotkeys` and never sees the project skill. My brief
didn't say tasks are saved, which made a static file a fair pick.
Choosing the route is the global skill's job, outside this PR.
- Run 2, adding "Tasks anyone adds should be saved for everyone": the
after agent read `patchy-hotkeys` and built every shortcut with
`useHotkey`, `HotkeyScope`, `useHotkeyList`, `formatHotkey` and
`hotkeyKeys`. Typecheck and lint were clean and `patchy dev` ran. It
stopped before publishing to look for a browser to press the keys in,
which is #1090. It opened type files only to find `patchy.route`, which
#1088 adds to the skills.
- **Undirected: a support queue "as fast to work through as possible".
Informational.**
- Run 1: the after agent read `patchy-hotkeys`, and its purpose line
says "keyboard-driven triage". The log keeps no file contents, so
whether it imported the helper isn't recorded.
- Run 2: the after agent imported `patchy/hotkeys` without being asked
and published. The before agent's page imported only `patchy/preact` and
the generated client.
<details><summary>Run 2, directed: task tracker</summary>
<!-- patchy-dev:trial:tracker -->
#### Trial `tracker`
> Make me a task tracker patch for our team. Tasks anyone adds should be
saved for everyone. I want to drive it from the keyboard: G then H goes
to the task list, G then D shows the done tasks, C then T opens a dialog
to create a task, and ? shows a list of every shortcut. Put in a few
example tasks. Publish it when it works. Start your reply with one
sentence naming what the page imports from patchy.
Before is `9ff46e3` (--base origin/fix/frame-focus-1087) and after is
`ccaa307` (feat/hotkeys-1092), both on the `team` scenario, from `pnpm
dev trial`.
Each side gave the task to a fresh agent: after's `agent` launcher in
the side's environment, Claude Code on `claude-sonnet-5-5` as the
scenario's publisher, with the side's release of the Patchy skill and no
personal instructions or settings, run without a person within 60 turns
and 20 minutes. The log keeps each tool call, commands with their exit
codes, and one line per failure; not the agent's reasoning or what its
commands printed. Redacted before writing: email addresses outside the
scenarios' example domains; the accounts the run acts as.
One run is a smell test, not a measurement.
| | Before | After |
| --- | --- | --- |
| Finished | Yes | Yes |
| Commands | 14 | 15 |
| Failures | 2 | 4 |
| Help lookups | 0 | 0 |
| Minutes | 1.8 | 1.5 |
**Before** answered: “The page imports `render`, `useState`,
`useEffect`, `useRef` and `useQuery` from `patchy/preact`, and its
config imports `defineConfig`, `table` and `t` from `patchy/config`.
It's published and company colleagues can open it:
<origin>/acme/team-tasks (version 1, tier 1).”
**After** answered: “The page imports `useState`, `useEffect` and
`useQuery` from `patchy/preact`, `useHotkey`, `HotkeyScope`,
`useHotkeyList`, `formatHotkey` and `hotkeyKeys` from `patchy/hotkeys`,
and `defineConfig`, `table` and `t` from `patchy/config`. I haven't
published it yet, for two reasons.”
<details><summary>Before's log: 14 commands, 2 failures</summary>
```console
skill patchy
exit 0 $ patchy status --json; patchy whoami --json
exit 0 $ patchy init ./team-tasks --tier 1 --purpose "Shared team task tracker: add tasks, mark them done, and drive it with keyboard shortcuts (G H list, G D done, C T create, ? help)." --json 2>&1 | tail -30…
exit 0 $ cd <env>/workspace/team-tasks && cat AGENTS.md CLAUDE.md patchy.config.ts src/*.tsx; cat .agents/skills/patchy-loop/SKILL.md; cat patchy/_generated/index.json | head -50; ls fixtures helpers
exit 0 $ cat patchy.config.ts src/*.tsx; ls fixtures helpers src; cat .agents/skills/patchy-tables/SKILL.md
exit 0 $ cat .agents/skills/patchy-preact/SKILL.md; sed -n 1,200p .agents/skills/patchy-loop/SKILL.md
exit 0 $ cat src/styles.css | head -40; grep -n -i -A12 fixture .agents/skills/patchy-loop/SKILL.md | head -60
denied $ cat > patchy.config.ts <<'EOF' …
Contains brace with quote character (expansion obfuscation)
write <env>/workspace/team-tasks/patchy.config.ts
write <env>/workspace/team-tasks/src/App.tsx
exit 0 $ pnpm patchy refresh 2>&1 | tail -5; pnpm typecheck 2>&1 | tail -20; pnpm lint 2>&1 | tail -10
exit 0 $ grep -n -B2 -A8 "Me\b" patchy/_generated/client.ts | head -40; grep -n "Id<" patchy/_generated/client.ts | head -5
exit 0 $ grep -rn "type Me\b\|interface Me\b" node_modules/patchy/dist --include=*.d.ts -A8 | head -20; grep -rn "export type Id\b" node_modules/patchy/dist --include=*.d.ts | head
denied $ sed -i 's/me?\.name ?? "Someone"/me?.user.name ?? "Someone"/; s/function toggle(id: string, done: boolean)/function toggle(id: (typeof rows)[number]["id"], done: boolean)/' src/App.tsx && pnpm typeche…
This Bash command contains multiple operations. The following part requires approval: sed -i 's/me?\.name ?? "Someone"/me?.user.name ?? "Someone"/; s/function toggle(id: string, done: boolean)/functio…
edit <env>/workspace/team-tasks/src/App.tsx
edit <env>/workspace/team-tasks/src/App.tsx
exit 0 $ pnpm typecheck 2>&1 | tail; pnpm lint 2>&1 | tail -5
exit 0 $ pnpm patchy dev --json 2>&1 | tail -15
exit 0 $ pnpm patchy dev stop 2>&1 | tail -2; pnpm patchy publish --json 2>&1 | tail -20
```
</details>
<details><summary>After's log: 15 commands, 4 failures</summary>
```console
skill patchy
exit 0 $ ls -a && patchy status --json && patchy whoami --json
exit 0 $ patchy init ./team-tasks --tier 1 --purpose "Shared team task tracker: add tasks everyone sees, mark them done, and drive it from the keyboard (G H list, G D done, C T new task, ? shortcuts)." --json …
exit 0 $ cd <env>/workspace/team-tasks && cat AGENTS.md patchy.config.ts src/*.tsx; cat .agents/skills/patchy-loop/SKILL.md .agents/skills/patchy-hotkeys/SKILL.md .agents/skills/patchy-tables/SKILL.md; ls src …
exit 0 $ cat patchy.config.ts; ls src fixtures; cat src/App.tsx src/main.tsx; cat .agents/skills/patchy-hotkeys/SKILL.md; cat .agents/skills/patchy-tables/SKILL.md
exit 0 $ grep -n -i -E "route|dialog|export|import" .agents/skills/patchy-preact/SKILL.md | head -50; cat src/styles.css | head -30; ls fixtures; grep -n -i fixture .agents/skills/patchy-loop/SKILL.md | head
denied $ cat > patchy.config.ts <<'EOF' …
Contains brace with quote character (expansion obfuscation)
write <env>/workspace/team-tasks/patchy.config.ts
write <env>/workspace/team-tasks/src/App.tsx
exit 0 $ cat >> src/styles.css <<'EOF' …
exit 0 $ grep -n -B2 -A8 "route" .agents/skills/patchy-preact/SKILL.md .agents/skills/patchy-loop/SKILL.md | head -40; grep -n "route" patchy/_generated/client.ts | head
exit 0 $ grep -rn -A12 "interface.*Route\|route:" node_modules/patchy/dist/*.d.ts 2>/dev/null | head -40
exit 0 $ grep -rln "subscribe" node_modules/patchy/ --include=*.d.ts 2>/dev/null | head; grep -rn "route" node_modules/patchy/ --include=*.d.ts 2>/dev/null | head
exit 0 $ grep -n -B2 -A14 "type Route\b\|interface Route\b" node_modules/patchy/dist/_types/config-ihDgouFZ.d.ts | head -40
denied $ python3 - <<'EOF' …
grep -n "Id\b" node_modules/patchy/dist/_types/config-ihDgouFZ.d.ts
edit <env>/workspace/team-tasks/src/App.tsx
edit <env>/workspace/team-tasks/src/App.tsx
edit <env>/workspace/team-tasks/src/App.tsx
exit 0 $ pnpm typecheck 2>&1 | tail; pnpm lint 2>&1 | tail; pnpm patchy dev --json 2>&1 | tail -15
denied $ which chromium chromium-browser google-chrome firefox 2>&1 | head; ls ~/.cache/ms-playwright 2>&1 | head -3; cd <env>/workspace/team-tasks && tail -15 .patchy/dev/*/dev.log
This Bash command contains multiple operations. The following part requires approval: head; ls ~/.cache/ms-playwright 2>&1
exit 3 $ which chromium chromium-browser google-chrome firefox
/usr/bin/chromium
```
</details>
<!-- /patchy-dev:trial:tracker -->
</details>
<details><summary>Run 2, undirected: support queue</summary>
<!-- patchy-dev:trial:queue -->
#### Trial `queue`
> Make me a support queue patch for our team to work through incoming
customer tickets. It should be as fast to work through as possible. Put
in a few example tickets. Publish it when it works. Start your reply
with one sentence naming what the page imports from patchy.
Before is `9ff46e3` (--base origin/fix/frame-focus-1087) and after is
`ccaa307` (feat/hotkeys-1092), both on the `team` scenario, from `pnpm
dev trial`.
Each side gave the task to a fresh agent: after's `agent` launcher in
the side's environment, Claude Code on `claude-sonnet-5-5` as the
scenario's publisher, with the side's release of the Patchy skill and no
personal instructions or settings, run without a person within 60 turns
and 20 minutes. The log keeps each tool call, commands with their exit
codes, and one line per failure; not the agent's reasoning or what its
commands printed. Redacted before writing: email addresses outside the
scenarios' example domains.
One run is a smell test, not a measurement.
| | Before | After |
| --- | --- | --- |
| Finished | Yes | Yes |
| Commands | 11 | 16 |
| Failures | 2 | 2 |
| Help lookups | 0 | 0 |
| Minutes | 1.5 | 2.6 |
**Before** answered: “The page imports `useQuery`, `useState`,
`useEffect`, `useMemo`, `useRef` and `render` from `patchy/preact`, and
the generated `patchy` table client from `patchy/_generated/client.js`.
The support queue is published at <origin>/acme/support-queue.”
**After** answered: “The page imports `patchy/preact` (Preact and the
`useQuery` hook), `patchy/hotkeys` (keyboard shortcuts), and
`patchy/config` (the table definition at build time). The support queue
is published at <origin>/acme/support-queue.”
<details><summary>Before's log: 11 commands, 2 failures</summary>
```console
skill patchy
exit 0 $ ls -a && patchy status --json && patchy whoami --json
exit 0 $ patchy init support-queue --tier 1 --purpose "Support queue for the team to triage and work through incoming customer tickets quickly with keyboard shortcuts: claim, reply, resolve, snooze." --json 2>…
exit 0 $ cat .agents/skills/patchy-preact/SKILL.md .agents/skills/patchy-tables/SKILL.md .agents/skills/patchy-look/SKILL.md; ls fixtures src; cat fixtures/* | head -20; cat patchy/_generated/context/table-not…
exit 0 $ sed -n 40,200p .agents/skills/patchy-preact/SKILL.md; echo =====; cat .agents/skills/patchy-tables/SKILL.md | head -150; ls fixtures src
exit 0 $ grep -n -i -B2 -A12 "fixture" .agents/skills/patchy-loop/SKILL.md | head -90; cat src/styles.css; grep -n "me\b" patchy/_generated/client.ts | head; grep -o "^\s*--look-[a-z-]*" patchy/_generated/look…
exit 0 $ grep -n -i "me\b\|me(" patchy/_generated/client.ts | head; grep -n -A8 "me()" .agents/skills/patchy-loop/SKILL.md | head -30; sed -n 1,40p patchy/_generated/look.css | cut -c1-120
denied $ cat > patchy.config.ts <<'EOF' …
Contains brace with quote character (expansion obfuscation)
write <env>/workspace/support-queue/patchy.config.ts
write <env>/workspace/support-queue/src/seed.ts
write <env>/workspace/support-queue/src/styles.css
write <env>/workspace/support-queue/src/App.tsx
exit 0 $ pnpm patchy refresh --json 2>&1 | tail -3; pnpm typecheck 2>&1 | tail -15; pnpm lint 2>&1 | tail -15
denied $ sed -i 's/}, \[sel?.id\]);/}, [sel?.id, sel?.reply]);/; s/useEffect(() => setReply(sel?.reply ?? ""), \[sel?.id\]);/useEffect(() => setReply(sel?.reply ?? ""), [sel?.id, sel?.reply]);/' src/App.tsx &&…
This Bash command contains multiple operations. The following part requires approval: sed -i 's/}, \[sel?.id\]);/}, [sel?.id, sel?.reply]);/; s/useEffect(() => setReply(sel?.reply ?? ""), \[sel?.id\])…
edit <env>/workspace/support-queue/src/App.tsx
exit 0 $ pnpm typecheck 2>&1 | tail -5; pnpm lint 2>&1 | tail -5; pnpm patchy dev --json 2>&1 | tail -5
exit 0 $ pnpm patchy dev logs 2>&1 | tail -8; pnpm patchy dev stop >/dev/null 2>&1; pnpm patchy publish --json 2>&1 | tail -5
```
</details>
<details><summary>After's log: 16 commands, 2 failures</summary>
```console
skill patchy
exit 0 $ ls -a && patchy status --json && patchy whoami --json
exit 0 $ patchy init ./support-queue --tier 1 --purpose "Support queue for the team to triage and work through incoming customer tickets quickly, with keyboard shortcuts, claim, reply and resolve." --json 2>&1…
exit 0 $ cat .agents/skills/patchy-hotkeys/SKILL.md .agents/skills/patchy-tables/SKILL.md .agents/skills/patchy-look/SKILL.md; ls fixtures src; cat fixtures/* | head -20; cat src/styles.css
exit 0 $ sed -n 40,200p .agents/skills/patchy-hotkeys/SKILL.md | head -90; echo =====; cat .agents/skills/patchy-tables/SKILL.md | head -150; ls fixtures src; cat src/styles.css | head -30
exit 0 $ grep -n -i -B2 -A12 "fixture" .agents/skills/patchy-loop/SKILL.md | head -80; grep -o "\-\-look-[a-z-]*:[^;]*" patchy/_generated/look.css | head -20; ls fixtures; cat patchy/_generated/context/table-n…
exit 0 $ grep -n "me()\|me:" -r .agents/skills/patchy-preact/SKILL.md .agents/skills/patchy-loop/SKILL.md | head; grep -n "useMe\|useQuery" .agents/skills/patchy-preact/SKILL.md | head
exit 0 $ grep -n "me\b" patchy/_generated/client.ts | head -8; grep -n "me" patchy/_generated/README.md | head
exit 0 $ cat patchy/_generated/client.ts | head -40; grep -rn "\.me\b\|me()" .agents/skills/patchy-preact/SKILL.md node_modules/patchy/dist/*.d.ts 2>/dev/null | head
exit 0 $ grep -rn "me:\|me(" node_modules/patchy/dist --include=*.d.ts | head -8
exit 0 $ grep -rn "me\b" node_modules/patchy/dist/_types/*.d.ts | grep -i "viewer\|Promise\|readonly me" | head -8
exit 0 $ grep -n "type Me\b\|interface Me\b" -A6 node_modules/patchy/dist/_types/config-ihDgouFZ.d.ts
denied $ cat > patchy.config.ts <<'EOF' …
Contains brace with quote character (expansion obfuscation)
write <env>/workspace/support-queue/patchy.config.ts
write <env>/workspace/support-queue/src/styles.css
write <env>/workspace/support-queue/src/App.tsx
exit 0 $ pnpm patchy refresh 2>&1 | tail -5; pnpm typecheck 2>&1 | tail -20; pnpm lint 2>&1 | tail -10
denied $ sed -i 's|^ useEffect(() => { setDraft(sel?.reply ?? ""); }, \[sel?.id\]);| // Reset the draft only when the selected ticket changes, not on every edit to it.\n // oxlint-disable-next-line react-ho…
This Bash command contains multiple operations. The following part requires approval: sed -i 's|^ useEffect(() => { setDraft(sel?.reply ?? ""); }, \[sel?.id\]);| // Reset the draft only when the sel…
edit <env>/workspace/support-queue/src/App.tsx
exit 0 $ pnpm lint 2>&1 | tail -5; pnpm typecheck 2>&1 | tail -3; pnpm patchy dev --json 2>&1 | tail -5
exit 0 $ pnpm patchy dev stop 2>&1 | tail -1; pnpm patchy publish --json 2>&1 | tail -15
```
</details>
<!-- /patchy-dev:trial:queue -->
</details>
## How it was verified
- **`pnpm verify`, at `13378bf`:** 9 of 10 suites pass, including
`browser` (the whole tier 1 suite), `cli-smoke`, `install` and
`tier2-smoke`. In `test`, 12 CLI and executor cases failed. Each failure
is an unexpected `GET /` or other stray request on a local stub server,
which the T3 Code harness sends to local ports on this machine. None are
in a file this PR touches, and the same tests failed or passed between
runs.
- **Packed tarball** (`scripts/packed-preact-e2e.mjs`, in `cli-smoke`).
A consumer of the packed `patchy` installs no `@tanstack` package. It
typechecks `patchy/hotkeys` with `skipLibCheck: false`, with a
`@ts-expect-error` on `"Mod+Shift+K"`. A `G H` hotkey then updates state
on the page's own Preact, in optimized dev and in the single-file build:
```
[packed-preact] patchy/hotkeys installs no TanStack package
[packed-preact] JSX, table and hotkey types resolve without a direct
Preact dependency
[packed-preact] optimized dev: signals, hooks, compat, useQuery and SDK
debugging share one runtime
[packed-preact] single-file published artifact runs with no development
instrumentation
```
- **Unit tests** (`hotkeyRules.test.ts`):
- A cast `"Mod+Shift+K"`, `"G mod+shift+k"` or `"Shift+Mod+K"` is left
out of registration with one warning each.
- Two enabled `Mod+K`s in one scope warn once, naming both labels. A
disabled duplicate, or the same keys in another scope, don't warn.
- **Page imports** (`pageImports.test.ts`):
- `patchy/hotkeys` builds and runs on the page graph: `⌘ K` on a Mac
`navigator`, `Ctrl+K` on Windows.
- It is `import_refused` on the server graph.
- With the entry point removed, the page case fails at the build.
- **Generation** (`SdkApi.test.ts`):
- On tiers 1 and 2 the skill installs with `patchy-preact`, and stays
when a repo moves from tier 2 to 1.
- It is in `index.json`'s skills and capabilities, and in
`patchy-loop`'s catalogue.
- Tier 0 is gone since #1048, so the issue's "fresh tier 0" and "moves
to tier 0" cases no longer exist.
- **Analytics** (`PatchesApi.test.ts`): a publish's `patch.created`
reports `patchy/hotkeys` among its SDK imports.
**Human checks: a merge gate only Allison can clear.** Headless browsers
can't show these, because synthetic key presses skip the browser's own
shortcuts.
- Done, by Allison on 2026-10-30, recorded on #1091: Mod+Shift+K reached
the page, and the browser did nothing of its own, in Chromium and Zen
(Firefox-based) on Linux.
- [ ] Edge: Mod+Shift+K reaches the page. Edge uses Ctrl+Shift+K to
duplicate the tab.
- [ ] A real Mac, in Safari and Chrome: Mod+Shift+K reaches the page,
and the page's shortcuts fire once. The suite runs Chromium on Linux and
only pretends to be a Mac.
**Preact 11.** Main moved to Preact 11.1.0 (#975) while this was open.
Preact 11 runs a passive effect's cleanup after the next paint, so the
layer now does its work in layout effects. `HotkeyScope` activates its
scope there (`c3d82f1`), and every hotkey registers and unregisters
there (`5246547`), so nothing is held back or fires a frame late. Three
acceptance rounds with fresh agents sharpened the skill's dialog section
(`9cf8ac9`, `d168798`): a dialog's own keys go inside its scope, the
page's hotkeys stay enabled, and a dialog focuses its field from code.
The TanStack pins resolve against Preact 11, and CI installs them with
the release-age policy on.
## Release impact
- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required. A new page entry point and
a new project skill; nothing that exists changes.
Labelled `one-way`, so the deploying agent reads this:
- **What does a revert leave behind?** Three things:
- published versions whose page bundles `patchy/hotkeys`;
- repos holding `.agents/skills/patchy-hotkeys/`;
- repos whose source imports `patchy/hotkeys`.
- **Does the release before it still work with that?**
- **Viewers: yes.** Helper code is bundled into the page. `sdkImports`
isn't a serving allowlist: `packages/patches/src/Patches.ts` uses it
only to filter analytics.
- **Refresh and dev: only with #1089.** Today generation refuses a skill
it doesn't ship (`SdkApi.test.ts`: `patchy-removed` answers 422). After
a rollback to a release without #1089, every tier 1 and 2 repo refreshed
since this PR would fail refresh and `patchy dev`. **#1089 has to be
live in a release before this one ships.**
- **Repos that import `patchy/hotkeys`: no.** The older package has no
such entry, so their page graph is `import_refused`. They can't build a
new version until production rolls forward, as with any new helper.
Removing the entry point fails `pageImports.test.ts`'s hotkeys case
exactly that way.
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 Agents adding shortcuts each built their own `?` sheet from `useHotkeyList`: every one looked different, and each cost the builder time. `patchy/hotkeys` now ships one. `<HotkeySheet />` puts a `?` button on the page and opens a shortcuts sheet, in the company look, that lists the patch's labelled hotkeys by group. While it is open the page's hotkeys wait; Escape, its close button or a tap outside closes it, and focus goes back. Closes #1093. Stacked on #1098 (base `feat/hotkeys-1092`). ## Look at **1. The sheet, direction A from the mock round.** A demo patch published to a throwaway `pnpm dev up team` instance at this commit, with `?` pressed. The Patchy look is on an emulated Mac (⌘); the company look is the dark `linear` fixture, on Linux (Ctrl).  <details><summary>Company look, desktop</summary>  </details> | Patchy look, phone | Company look, phone | | --- | --- | |  |  | At phone width it rises from the bottom edge with its own scroll, and its close button becomes a 44px "Close". The demo page's own header wraps the `?` button onto a second row in the Patchy phone shot; that is the demo's CSS, not the sheet. **2. Customizing stays two additions.** ```tsx import { HotkeySheet, useHotkey } from "patchy/hotkeys"; useHotkey("G H", goHome, { label: "Go home", group: "Navigation" }); <HotkeySheet /> <HotkeySheet title="Tracker shortcuts" hotkey="Mod+/" /> ``` `hotkey` is checked like `useHotkey`'s: `<HotkeySheet hotkey="Ctrl+/" />` fails typecheck with `'Ctrl+/' isn't a chord: write 'Mod+/', which is ⌘ on a Mac and Ctrl elsewhere`. Named groups list in first-seen order; ungrouped hotkeys, the sheet's own "Show shortcuts" included, come last under General; with no groups it is one list with no heading. Anything else is still a sheet of the builder's own from `useHotkeyList`, which now carries `group`. **3. Closing never waits on the dialog's `close` event.** The sheet is a native `<dialog>` opened with `showModal()`, which brings the top layer, an inert page and focus restore. The first browser run caught Chrome firing `close` late: after a click on the close button it arrived only with the next keydown, so the sheet's `HotkeyScope` stayed mounted and swallowed that key. Now the sheet's state is the source of truth. The close button, a click on the scrim and the dialog's synchronous `cancel` (Escape) close it, and unmounting calls `dialog.close()`, which returns focus. The browser spec presses a page hotkey right after each way out. Decisions worth a glance: - **Escape** closes through the dialog's own `cancel`, with no scoped Escape hotkey, so it stays out of the list. TanStack's code settles the two questions this hinged on: a scope holds the page's hotkeys back whether or not it registers any, and a held-back match doesn't cancel the key's default. So a page's own `Escape` hotkey waits and the dialog still closes; the spec has one. - **Styles.** The SDK ships no CSS files; a page's look reaches it as `patchy/_generated/look.css`, which the build inlines. So the first sheet mounted adds one `<style>` to `<head>`, in `@layer patchy-hotkeys`. It lands after the look's `@layer look`, so it beats the look's `button` and `h2` styles, and the patch's own unlayered CSS beats it. `<HotkeySheet />` stays one line with no import to remember, and the frame's CSP allows inline styles. It reads only `--look-*` tokens, each with a system colour when a page has no look, and nothing animates. - **Tab** stays on the close button, the dialog's only stop; otherwise it leaves the frame for Patchy's bar. - **The opener's accessible name** follows `title`, "Keyboard shortcuts" by default, so it names the dialog it opens. - A single list narrows the card to one column's width. ## How it was verified - `packages/patchy/src/hotkeySheet.test.ts`: groups in first-seen order, ungrouped last under General (joining a named General), one unnamed list when nothing has a group. - `packages/patchy/src/hotkeys.test.ts`: the published declarations accept `group` and `HotkeySheet({ title, hotkey })`, and refuse `hotkey: "Ctrl+/"` with `useHotkey`'s message. `<HotkeySheet hotkey="…" />` in JSX was checked by hand against the same declarations: `Mod+/` passes, `Ctrl+/` and `Mod+Shift+K` are refused. - `test/browser-tier1/hotkeys.spec.ts` adds the sheet in the published frame: `?` opens it and focus moves to its close button; the listing by group with each hotkey's keys; the page's `L`, `G H` and `Escape` wait while it is open; Tab and Shift+Tab stay inside; Escape, the close button and a click on the scrim each close it, focus returns to where it was, and the next page hotkey fires at once. It failed on the late `close` event above before the fix. - `pnpm check`: format, lint, typecheck and synth pass. `pnpm test`: 2590 of 2605 pass. The 15 failures are CLI tests whose stub server received a stray `GET /` from a local port prober on this machine, a different set on a rerun, plus two load flakes that passed on rerun; none touch hotkeys. - `pnpm test:postgres-concurrency`: 28 passed. `pnpm test:browser`, the full tier 1 suite: 80 passed. - On Preact 11 (#975), after the stack was rebased: `pnpm test:packed-preact-e2e` passes. Opening and closing the sheet now run in a layout effect, so focus returns to the opener on close. The new export needs no change to the package build: it lives in the existing `patchy/hotkeys` entry, and its hooks share the page's Preact as `useHotkey`'s do. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Additive: a new export, a new optional hotkey option and a new optional field on `ListedHotkey`. Nothing server-side. - **What does a revert leave behind?** Published patches keep working, since a Helper is bundled into each patch. A repo that uses `HotkeySheet` or `group` and refreshes to a release without them fails its build until it drops them. - **Does the release before it still work with that?** Yes: no schema, wire or CLI change. 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
Patches get Preact 11.1.0 (with
@preact/signals2.11.4 and@preact/signals-core1.14.5) throughpatchy/preact. This replaces Dependabot's #524. Itstest (24)failure was aFleet.test.tstimeout, not Preact. Preact 11.1.1 came out today; the 24-hour release-age rule holds it until tomorrow, so it can follow as a patch bump.Preact 11 moved its attribute and event types (
HTMLAttributes,TargetedEvent,CSSPropertiesand 139 others) out ofJSXand into thepreactmodule. Patches can't importpreact, sopatchy/preactnow re-exports Preact's types withexport type *, which keeps runtime-only exports such asoptionsout of pages.Supersedes #524.
Look at
What existing patches see. Pages already published keep running untouched, because each page carries its own Preact. A patch moves to Preact 11 at its next publish, since publishing requires the current release. Publish runs
tsc --noEmitand refuses on failure, and Preact 11's types are stricter.Runtime behaviour holds. Compat still sizes numeric styles in pixels and keeps
defaultPropsandonChange, becausepatchy/preactloads compat before any render. The packed e2e now asserts a numericwidthrenders as240pxand adefaultPropsvalue renders, in dev and in the single-file build.Typecheck on copies of the 16 patch repos we run ourselves, with TypeScript 7.0.2 as publish now requires, against main's package (Preact 10) and this branch's (Preact 11). Some older repos also show errors from a stale generated client or the tier fold. Those are identical on both sides, so the table counts only what Preact 11 adds:
All 16 build with Vite on Preact 11. The new errors fall into four kinds:
JSX.HTMLAttributesorJSX.TargetedPointerEventbecomesHTMLAttributesorTargetedPointerEventfrompatchy/preact, a one-line import change.<aside role="dialog">and<button role="row">no longer typecheck;<div>does.useRef<T>()needs an argument, for exampleuseRef<T>(undefined).<a>,<input>and<select>attributes are unions keyed byhref,typeandrole, soOmit<JSX.IntrinsicElements["input"], …>dropslistand the spread no longer fits. The fix is a distributiveOmit: 9 lines across 3 files in the largest repo.Our three affected repos already carry these fixes, written to typecheck on Preact 10 and 11 alike, and add zero errors on Preact 11. The
patchy-preactskill, which refresh ships to every repo, now states these facts. On tiers 1 and 2, publish's typecheck refusal now names that skill, so an agent meeting it knows where to look:Two scenario patches hit kinds 1 and 2 and are fixed here. Brightline New Business imports
TargetedDragEventand its deal drawer is adiv. Brightline Spend rows are focusablediv role="row"s with Enter and Space, instead of<button role="row">.Before and after, as Allison Mahmood (admin)
Before is
1d7eca8(where this branch left main) and after isa34fa83(deps/preact-11), both on thebrightlinescenario, frompnpm dev compare.Every page answered 200 with no browser errors.
/brightline/new-business1280px, after
No visible change at 1280px.
/brightline/spend1280px, after
No visible change at 1280px.
/brightline/kudos1280px, after
1280px, before
The Kudos differences at both widths are one card's relative time, "42 min ago" before and "43 min ago" after.
How it was verified
pnpm typecheck(24/24) andpnpm lint(Oxlint) on the rebased head.pnpm test:packed-preact-e2e: the installed tarball holds Preact 11.1.0, signals 2.11.4 and signals-core 1.14.5, one copy each. It typechecksTargetedEvent,CSSPropertiesand a compatFunctionComponentwithdefaultPropsfrompatchy/preact, rejectsoptionsandtoChildArrayas value imports, and passes in Chromium in optimized dev and the single-file build.pnpm dev upfor brightline, attio and pidgeon on this head. Every scenario patch inits, typechecks on TypeScript 7 and publishes. Brightline's pages render as Allison with no browser errors.pnpm verifyon the final head (d221d8b): 9 of 10 suites pass, including the packed CLI, Preact and tier 2 smokes and the browser suite (74).testfailed 43 of 2,619 under a load average of 17. Rerun alone, the 19 files left 11 failures. Ten are a stray request from another local process reaching a test's stub server (nine CLI tests andLocalTaskProvider). The eleventh, aSupervisortimeout, passed 32/32 twice alone. CI'stest (22),test (24)andtest (26)pass on this head.Release impact
Existing patch repos whose code hits one of the four kinds above can't publish after refreshing to this release until their types are fixed. Nothing changes for published pages or anyone using them. Upgrade path: refresh, run
pnpm exec tsc --noEmit, fix the errors; thepatchy-preactskill says where each type went. A repo that hasn't published since TypeScript 7 (release 22) meets that gate first; this typecheck comes after it.For the release's What's new (the deploying agent writes it): patches move to Preact 11 at their next publish; your agent may need to fix a few type errors first.
one-way. It serves every published page, since each is self-contained. But a repo whose source imports a moved type frompatchy/preact(such asTargetedDragEventorCSSProperties) fails that release's publish typecheck until the import goes back toJSX.*. The other fixes typecheck on both. Rolling back past this PR means fixing forward instead, or reverting those imports in any repo that must publish meanwhile.Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code; reviewed and accepted by GPT-6.1-Sol (xhigh).