Skip to content

feat(serving): viewers can turn off single-key shortcuts, from a patch's sheet or the account menu - #1301

Merged
allisonmahmood merged 1 commit into
mainfrom
feat/shortcut-setting-shell-1275
Nov 11, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
feat/shortcut-setting-shell-1275

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

What changed

Speech input can type a letter that fires a patch's single-key shortcut. #1224 lets each person turn those off. #1276 stores the choice and #1279 taught patchy/hotkeys to obey it, but nothing passed the choice to a patch yet. Now Patchy's shell does:

  • it names a viewer's patch frame with their setting;
  • the shortcuts sheet's row opens Patchy's own dialog to change it;
  • the account menu gets the same switch;
  • a version built before the setting tells a viewer who turned shortcuts off that its shortcuts still work.

This is the top of the stack main ← #1297 ← #1255 ← #1256 ← #1279 ← #1276 ← this, and the six land together. #1302, CI's move to desktop Chromium, waits on #1402 and lands later. It's restacked onto main after the UI overhaul (#1332–#1354) and the switcher (#1298, #1304), and ported to both. The restack comment says what changed beyond conflict resolution.

Closes #1275
Closes #1224

Look at

1. The frame is named in the shell's static markup, not by a script that creates it. A parser-created iframe gets its name attribute before its browsing context exists. So the server renders name="patchy:shortcuts=on|off" on the existing static iframe, after main's data-waiting, and only for a company or local shell rendered for its viewer (shell.ts, Pages.ts). A public shell is everyone's document, a member's included since #1339, so it never carries one, and renderPatchWrapper throws if asked to. Probed before choosing, in Chromium and Firefox:

Probe, a sandboxed frame whose src a deferred script sets Chromium Firefox
Static markup with name: first load, a reload after the value changed, back after it changed off, on, on off, on, on
A <template> cloned by script, as the ticket's creator would same same

In desktop Chromium, where the frame runs in its own process, the patch reads window.name === "patchy:shortcuts=off" on first load and after a new version's Reload re-creates the frame. Static markup keeps three things:

  • No inline script and no CSP change. The shell still admits only the switcher relay's hash.
  • Both mixed-release pairings work. The markup is main's plus one attribute (and data-shortcuts-note), so an older broker mounts it unchanged, and this broker mounts an older unnamed shell as before. render.test.ts pins that the frame differs from the unnamed one only by its name.
  • Every re-creation renders again. A new-version reload is a fresh server render.

2. Patchy's dialog (packages/serving/src/shortcuts.ts), from the mock's direction C. A running patch's shell keeps its own pinned style subset on main (servedStyles; the overhaul left patch shells alone). So the dialog stays a shell-scrim over one note-info note-float, with glyph-sm, the primary button and a quiet Cancel. The setting's On or Off is a served tag after the question. The old pill isn't in that subset, and main's pin test would refuse it, so it's gone.

Desktop Phone
The sheet's row The sheet with its Single-key shortcuts row reading Off, and dashed keycaps The sheet as a bottom sheet on a phone, its row reading Off
Patchy's dialog Patchy's dialog: Turn off single-key shortcuts in every patch except public ones?, an ON tag, Turn off and Cancel The dialog centred on a phone
A failed save The dialog turned amber, saying Couldn't save. Nothing changed., with Try again The failed save on a phone

The sheet is the SDK's, drawn in the patch's own frame by #1279, and main hasn't touched it.

The copy and the failure pattern are as reviewed:

  • The title says what the switch covers: "Turn off single-key shortcuts in every patch except public ones?", or "Turn on …". The buttons are Turn off, Turn on and Cancel.
  • A refused save, a 200 without { value } and an empty 200 all turn the note note-warn, with the alert line "Couldn't save. Nothing changed." and Try again.

The abuse rules, each a step of the browser spec:

  • One dialog at a time.
  • A question needs navigator.userActivation.isActive in the shell.
  • However the dialog closes, it arms a flag: Turn off or Turn on, Cancel, Escape, or the browser closing it, mid-save or not. The flag holds new dialogs off until a 250 ms poll reads the old activation as lapsed. So a request on the press that answered the last dialog gets the value with no dialog, and only a fresh press opens another.
  • Only an isTrusted click saves.
  • Dismissing never waits. Cancel or Escape mid-save closes the dialog at once and returns focus to the frame. The save keeps the one-dialog slot until the route answers, and the operation then resolves with what the route stored, or with the setting as it was if the save failed or timed out after 35 s.
  • While tier 2's tools are starting, a question gets the setting as it is.
  • New with the switcher: while Patchy's switcher is open, a question also gets the setting as it is, as the starting cover waits for it. If the switcher is open over the dialog when it closes, the dialog leaves focus with the switcher, which hands it back.

3. The account menu's switch, a no-script form in main's personal menu: name, Your agents, the switch, Sign out. It posts the value it switches to, with return set to the page. On the overhaul's component set, the item is the switch: a menu-item with role="switch" and aria-checked, the keyboard icon, and core's switch drawn at its end in the item's state. Core's fields and menus chunks gained the two selectors that draw it. The account menu is 248px wide, up from 220, so the label stays on one line beside the switch.

Before Off After the press: the receipt, and On
The account menu with name, email, Your agents and Sign out The account menu with the Single-key shortcuts switch off The receipt Turned on single-key shortcuts, and the switch on
The phone menu before The phone menu with the switch off The phone menu after the press, the switch on

"Before" is this branch's page with the switch's form removed in the browser, which is exactly main's account menu. ViewerApi.ts reads the form before the session, so a signed-out post that names return goes back to that page, whose own door signs in there.

4. D1's note. The note shows to a viewer whose setting is Off, on a version from 0.33.0 on that doesn't claim shortcutSetting, unless its recorded imports leave out patchy/hotkeys.

  • Only a repo build claims shortcutSetting: 1 (MANIFEST_CAPABILITIES in @patchy/api). A single HTML file may carry an older SDK bundled inline, so it claims nothing.
  • Recorded imports refine D1's release rule. A repo build without patchy/hotkeys in sdkImports gets no note. A single file records no imports, so the release rule decides: from 0.33.0 on, the note shows.
  • The note reuses the new-version bar in the shared bottom stack: "This patch's single-key shortcuts still work until it's updated." with a quiet Dismiss, kept per patch in the shell's localStorage.
Desktop Phone
The note bar at the bottom over the 0.38 bundle: This patch's single-key shortcuts still work until it's updated. Dismiss The note as a bottom sheet on a phone

5. The flow, desktop then phone. The sheet's row leads to Patchy's dialog, Turn off brings the sheet back on its row reading Off, then the account menu turns them back on.

flow-desktop.mp4
flow-phone.mp4

How it was verified

  • Unit (vitest), with the rest of the stack's touched files: 35 files, 330 tests, plus core's style rules, gallery and served-style pin (358 with render.test.ts):

    • render.test.ts: the frame's name after data-waiting in static markup, and that it is the only difference from an unnamed frame. A public shell refuses a viewer's setting. ignoresShortcutSetting's cases.
    • html.test.ts: the account menu's switch, its value, its return, and escaping.
    • ViewerApi.test.ts: a signed-out form post goes back to its page.
    • devServer.test.ts: each dev person's own setting, and the route, which writes the file before it changes what shells read.
    • executeConfig.test.ts: a repo build's manifest records shortcutSetting.
    • served-styles.test.ts: the served styles' digest moved on purpose, for the one rule that keeps the dialog's tag whole.
  • The browser tier (test/browser-tier1/shortcut-setting.spec.ts): thirteen tests on published patches through the real shell and broker, as reviewed. That includes the committed 0.38 bundle (hotkeys-0.38.html), whose shortcuts still fire under this shell with Off stored, with no row and with the note.

    Engine Result
    Desktop Chromium, channel: "chromium", frame isolated, from a local config 13 passed
    Chromium headless shell, as CI runs it 13 passed

    hotkeys.spec.ts and focus.spec.ts pass in both as well. Company patches put the setting's row first in the sheet's Tab order. The unnamed-frame test opens a public patch.

  • The whole tier 1 suite at this stack's top (06476fe), as pnpm verify runs it in CI's headless shell: 168 of 168. At the previous push, with ci: the browser tier runs desktop Chromium, where a patch's frame has its own process #1302's desktop project as well, it also passed 168 of 168.

  • The rollback rehearsal, against the live release 41 (7f93b91): 7f93b91 → 06476fe → 7f93b91 → 06476fe, all four steps passed in 116 s. It covers feat(companies): Patchy stores each person's single-key shortcut setting #1276's migration, and the live release serving a repo build that this head's CLI wrote with shortcutSetting.

  • pnpm verify at this head: format, lint, typecheck, synth, postgres-concurrency, cli-smoke, install, tier2-smoke and browser pass. test and test (bun) had 15 timeouts while the machine's load average was near 30. All 11 files rerun alone pass (216 tests), as does Bun's PatchesApi (63). The previous push's pnpm verify passed every step. The served shell's page state is exempt from the page-markup rules in .oxlintrc.json, and shortcuts.ts joins stream-status.ts and downloads.ts there for the same reason.

  • Hit every surface.

    • Wire contract: docs/API.md is regenerated and current.
    • CLI: README, the patchy-hotkeys project skill and the capability catalogue. No command, flag or exit code changed.
    • Dev loop: docs/DEVELOPMENT.md and the patchy-dev-loop skill.
    • Vocabulary: the Companies and patchy glossaries, and docs/product.md.
    • Served pages: the ui-consistency spec names the menu's switch, the dialog and note in the shell's exception, and shortcuts.ts in the lint exemption.
    • Reverse states: the switch turns it back on from both places.
    • Not applicable: migrations (feat(companies): Patchy stores each person's single-key shortcut setting #1276's), company resources and the repo layout.
  • Not run on this head: Firefox and WebKit. Firefox passed 12 of 13 before the port, the tier 2 test being Chromium-only. WebKit can't launch here, and CI has no WebKit.

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

The release that carries this carries the whole stack. Nothing needs action. A viewer's shortcuts stay on until they turn them off, and patches published before it behave as they did until rebuilt.

Suggested patchChanges line for the release, beside #1279's:

patchy/hotkeys: a viewer can now turn single-key shortcuts off. Then a page-wide hotkey whose every step types a character, such as A, G H or ?, fires nothing, while chords, named keys and hotkeys within an element still fire. Label those commands so the sheet keeps them as buttons, and write a key that belongs to one part of the page within it. window.name carries the setting and is Patchy's: don't set it.

Landing note: #1276's migration is 0038_single_key_shortcuts, above #1217's 0037_feedback. If another migration lands first, it renumbers.

  • What does a revert leave behind?
    • shortcutSetting: 1 in the manifests of repo builds published meanwhile. The release before reads stored manifests without refusing extra keys, and in the rehearsal it served a version that carried the field.
    • People's stored settings, from feat(companies): Patchy stores each person's single-key shortcut setting #1276.
    • Dismissed-note keys in browsers' localStorage.
    • A CLI of this release refuses to publish to an older instance before sending anything, as any mismatched release does.
  • Does the release before it still work with that? Yes. Its shell names no frame, so every shortcut is on, the sheet hides its row, and no note shows.

Built by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, through T3 Code.

@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:core Touches the core area area:docs Touches the docs area area:ui Portal and first-party browser pages, shared rendering and styles size:xl Over 1,000 changed lines; review in multiple passes labels Nov 7, 2026
@allisonmahmood
allisonmahmood force-pushed the feat/shortcut-setting-store-1273 branch from 0554f0d to f773e03 Compare November 11, 2026 12:43
@allisonmahmood
allisonmahmood force-pushed the feat/shortcut-setting-shell-1275 branch 2 times, most recently from 1d6860c to 7fbf4e9 Compare November 11, 2026 12:59
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Restacked onto main at 44acb65 and ported to the UI overhaul and the switcher. The six commits are squashed into one. git range-diff of the old squashed diff (on 0554f0d) against the new commit (on #1276's new head) shows what changed beyond conflict resolution.

Changed in behaviour or look:

  • The account menu's switch. Before, it was a menu-item button ending in an On/Off pill. Now it's a menu-item with role="switch" and aria-checked, the new keyboard icon (ui/icons.ts), and core's switch drawn at its end. Two selectors were added to core: [aria-checked="true"] > .switch in styles/fields.ts, and .menu-item > .switch { margin-left: auto } in styles/menus.ts. The account menu is 248px wide (styles/app-shell.ts, was 220) so the label stays on one line. The switch sits in main's personal menu after Your agents, before Sign out.
  • The dialog's state: pill/pill-done became the served tag. main keeps a running patch's shell on servedStyles, a pinned subset with no pill. One rule was added to it, .note-float .note-title > .tag { flex: none; margin-left: auto; }, so the tag's word isn't squeezed. Its digest in served-styles.test.ts moved on purpose. The dialog, failed save and note are otherwise the same servedStyles classes as before.
  • The switcher interplay: this didn't exist when the PR was reviewed.
    • While the switcher is open, shortcuts.setting answers the setting as it is, with no dialog, as during the starting cover.
    • A dialog closing while the switcher is open over it leaves focus with the switcher, as the cover does.
  • Lint: main added patchy/no-hand-drawn-components. shortcuts.ts joins stream-status.ts and downloads.ts in .oxlintrc.json's exemption for the served shell's page state, which draws on servedStyles. The ui-consistency spec names it there.

Changed only to fit main:

  • shell.ts: the name renders after data-waiting. The public-shell rule is now "a public shell is everyone's document", since fix(serving): members get the switcher on their company's public patches #1339 renders it for members too.
  • Pages.ts: the setting is passed only when !isPublic && viewer. Before, it keyed off the admission, and a member's public shell now has a viewer. The address notice's page uses main's renderAddressNotice spread.
  • render.test.ts: the company-shell fixture gains companyId, the frame regex allows data-waiting, and the inline-script check strips the relay.
  • html.test.ts: the expected markup is the new switch.
  • Gallery.ts and auth/src/page.test.ts: their AppShell viewers gain singleKeyShortcuts.
  • instance.ts: addGuest is dropped for main's guest(patchId, true).
  • MachinesPage.test.ts: main's version stands. It checks <main> only, and the switch's return lives in the sidebar.
  • Docs: docs/product.md, the ui-consistency spec, sdkCapabilities.ts and the patchy glossary are rewritten into main's new text, saying the same things. The spec's dialog bullet says tag where it said pill.

Unchanged from the reviewed version:

  • the frame name in static markup;
  • private, no-store company shells;
  • the abuse contract: one dialog, a press, isTrusted, and a fresh press after any close, confirm included;
  • dismissing mid-save;
  • D1's rules and the single-file fallback;
  • patchy dev writing to disk first;
  • hotkeys-0.38.html and its test;
  • ViewerApi.ts, devServer.ts, devState.ts, executeConfig.ts and the API schemas.

Evidence:

  • shortcut-setting.spec.ts: 13 of 13 in desktop Chromium (frame isolated) and in the headless shell.
  • The whole tier 1 suite at the top, both projects: 168 of 168.
  • The rollback rehearsal 7f93b91 → 1d6860c → 7f93b91 → 1d6860c passed.
  • Format, lint and typecheck pass.
  • The screenshots and clips in the body are of the ported UI.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review of the restack (GPT 6.1 Sol, xhigh), at #1276 f773e03 and #1301 7fbf4e9: nothing blocking, no should-fix or nit findings. It compared the accepted heads with the restacked ranges and read the new diffs against their bases.

  • Switcher: the switcher interplay keeps the abuse contract: one dialog, a press required, isTrusted only, and a fresh press after any close. Probed in Chromium and Firefox.
  • Public shells and caching: public shells, members' copies included, carry no marker, and per-viewer shells stay private, no-store.
  • Account switch: the switch works without script.
  • Styles: the servedStyles rule and digest move are safe for older markup and rollback, and the lint exemption is justified.
  • Preservation: nothing the earlier reviews pinned was lost.

The chain is being rebased once more onto main with 0037_feedback, so the migration becomes 0038_single_key_shortcuts.

@allisonmahmood

Copy link
Copy Markdown
Owner Author

Re-chained onto main at c44e63f, which has #1217 and #1218, without #1302. It replayed with no conflicts: git range-diff shows the commit =. #1276 carries the API merge and the migration's new id, 0038_single_key_shortcuts. Nothing in this PR names the id. The body now names the six-PR stack, the new id, and checks run at this head.

Checks at 06476fe:

  • shortcut-setting.spec.ts: 13 of 13 in desktop Chromium and in the headless shell. hotkeys.spec.ts and focus.spec.ts pass in both too.
  • The whole tier 1 suite in CI's headless shell: 168 of 168.
  • The rollback rehearsal 7f93b91 → 06476fe → 7f93b91 → 06476fe passed.
  • pnpm verify: every step passes but test and test (bun). They had 15 timeouts while the machine's load average was near 30, and all 11 failing files rerun alone pass.

@allisonmahmood

allisonmahmood commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked 06476fe54aae64e52128c44709271f036fa2da59 (base a7fc9365, the head of #1276; the six-PR chain sits on main at c44e63f) on brightline, by Claude Opus 5.5 in Claude Code (T3 Code).

This run covered the whole chain end to end on today's main, with the most attention on #1301's port to the overhaul and the switcher. I used a throwaway brightline environment at the head and drove it with Playwright in desktop Chromium (channel: "chromium", new headless). CDP's Target.getTargets listed the patch frame as its own iframe target, so the frame really was isolated. I reran checks 1–4, 6 and 9 and the extra probes under 10 in the headless shell as well, with the same results. The rest ran in desktop Chromium only. I published four patches of my own beside the scenario's:

  • deals-keys, a tier 1 repo build using patchy/hotkeys with A, G H, Mod+K, Escape, a J within a list, HotkeySheet and an Export button. Its patch code also keeps the shell's raw port, as a hostile patch could.
  • deals-old, a copy standing in for an older build: shortcutSetting stripped from its stored manifest and its release set to 0.38.0.
  • deals-public, a copy shared public.
  • deals-038, the committed hotkeys-0.38.html as a single file.

No key test clicked into the frame first: since #1298, the frame takes focus as it loads.

Done means

  • 1. With the setting Off: passed.
    • The frame is named patchy:shortcuts=off.
    • Pressed right after load: A, G H and ? fire nothing and open no sheet. Ctrl+K and Escape fire, J fires within the list, and Ctrl+/ opens the sheet.
    • The sheet's row reads "Single-key shortcuts: Off". A, G/H and ? are dashed keycaps with ", key off" in hidden text. Clicking "Assign to me" ran it.
  • 2. The sheet's row and Patchy's dialog: passed, 14 of 14 at 1280 px, at 390 px and in the headless shell.
    • The row hides the sheet and opens the dialog, with focus on Turn on.
    • Cancel stores nothing, and the sheet comes back on its row.
    • A failed save: a network error and then a 503 each show "Couldn't save. Nothing changed." with Try again, and nothing is stored.
    • Confirm: Try again stores On, and the sheet comes back on "Single-key shortcuts: On". A and G H then fire with no reload, and a reload names the frame on.
    • Dismissing mid-save, with the save held at the route:
      • Cancel closed the dialog in 61 ms (33 ms on the phone) and put focus on iframe#patch. When the save went through, the sheet came back on the stored Off.
      • Escape with a refused save closed it in 3 ms, and the sheet came back on Off.
      • The sheet stayed away while the save was held.
  • 3. The abuse contract, from patch code holding the port: passed in both builds.
    • Patch code can't reach parent.document (SecurityError).
    • No press: an ask from an in-page timer, with nothing touching the page for 7.5 s, got the value and no dialog.
    • One dialog at a time: a second ask while a dialog was up got the value at once, and only one dialog showed.
    • A script's click: click() and a dispatched MouseEvent on Turn off in the shell saved nothing.
    • A fresh press after any close:
      • A scripted retry after Cancel got the value and no dialog. So did one after a click confirm.
      • So did a double-Escape forced close mid-save. An ask during that save got the old value, the first ask's answer was what the route stored, and the retry got the same.
      • A real click before the old press lapsed opened nothing. After about 6.5 s untouched, a fresh click opened the dialog.
    • The previous verdict's note is fixed: I confirmed with Enter while patch code asked again the moment it heard the answer. It got the new value and no second dialog, and a second Enter flipped nothing back.
  • 4. The switcher (new since the port): passed, 12 of 12 in desktop Chromium (twice) and in the headless shell.
    • With ⌘⇧K/Ctrl+Shift+K open, a shortcuts.setting ask got the value and no dialog.
    • I held a save, opened the switcher over Patchy's dialog, then let the save answer. The dialog closed underneath, focus stayed in the switcher's field and typing still went there. Escape then put focus on iframe#patch, and Ctrl+K reached the patch.
    • Over an idle dialog, Escape closed only the switcher and focus went back into the dialog, whose Cancel then answered the setting as it was.
    • The switcher on its own: opened from the patch with the keyboard in its field. Typing filtered it, Escape gave the patch its keys back, and Enter went to Kudos. I saw no flaky: switcher cases fail in desktop Chromium on CI, keys and focus not where the page reads them #1402-style flakiness.
  • 5. The account menu's switch: passed.
    • It's a menu-item button with role="switch" and aria-checked.
    • Both ways, four ways: with script and without, at 1280 px and at 390 px. Each time it came back to /patches?tab=pages with the receipt ("Turned off/on single-key shortcuts"), and the stored value flipped.
    • Keyboard: Tab reached it, Space turned it off and Enter turned it back on, each a 303 to the page.
    • The 248px menu: it measured 248px at both widths and looks right in main's new look. On desktop it overhangs the 240px sidebar by about 20px, as What's new's menu already does.
    • The route, with curl:
      • A form post got 303, location: /patches?tab=pages, private, no-store and the receipt cookie.
      • A JSON ask got 200 {"value":"on"}.
      • A foreign Origin got 403, and so did no Origin.
      • value=flip got 400.
      • An off-site or protocol-relative return went to /.
      • Signed out, a form naming return got 303 back to that page, and the shell's JSON ask got 401.
    • A retired patch's notice page: its account form carries return set to that page (Pages.ts).
  • 6. Guests and public pages: passed in both builds.
    • A guest's setting is their own: Taylor (Cedar Works), a guest on deals-keys, turned theirs off through the dialog. Only Taylor's row changed. Taylor's reload and their tier 2 Kudos shell were both named off, while Jordan's frame stayed on. Taylor's own dashboard carries the switch, reading Off.

    • D2, with Jordan stored Off, as a member and signed out:

      • deals-public's frame is unnamed;
      • A and G H fire;
      • ? opens a sheet with no row;
      • a raw ask gets invalid_request and no dialog.
    • Headers:

      Shell cache-control patchy:shortcuts= marker
      Public, signed out public, max-age=60 none
      Public, a member (Jordan, Priya) private, no-store none; differs from signed out only by main's switcher script and data-switcher
      Company and guest (tier 1 and tier 2) private, no-store, no ETag off/on per viewer; a conditional request still gets 200

      The company shell's CSP is still script-src 'self' plus the switcher relay's hash, with no inline script.

  • 7. D1: passed, 18 of 18.
    • The note shows to Jordan (Off) on:
      • the older stand-in;
      • the committed 0.38 single file, whose A, G H and Mod+K still fire under Off, and whose ? opens a sheet with no row;
      • the kickoff brief, a single file without hotkeys: D1's accepted noise;
      • a single file set to 0.33.0.
    • No note on:
      • the new repo build;
      • Kudos, whose imports leave out patchy/hotkeys, with and without its capability;
      • the stand-in set to 0.32.0;
      • a single file set to 0.32.9;
      • anything for Priya, whose setting is On.
    • Dismiss: Tab from the frame reaches Dismiss, and Enter removes the note and puts focus on the frame. It stays dismissed on reload, for that patch only.
    • Beside a new version: with the note up, a new version's bar stacks under it. After Reload, the frame is still named off, and the new version, which claims the capability, shows no note.
  • 8. patchy dev: passed.
    • The owner, colleague and guest URLs each opened in a fresh browser with no cookies (none were set afterwards either), each named on.
    • The owner's row opened the dialog, and Turn off saved through the dev origin's route (200 {"value":"off"}). A then fired nothing. After a reload the owner's frame was off, and the colleague's and guest's were still on.
    • The dev route, with curl:
      • a guest's JSON post on their own origin got 200;
      • a post to the owner's route from the colleague's origin got 403, and so did one with no Origin;
      • a bad value got 400;
      • a form post got 303 back to the dev page.
    • shortcuts.json holds each person's own value.
  • 9. fix(sdk): a drag in or out of the shortcuts sheet's card no longer closes it #1255: passed in both builds.
    • With the mouse: pressing in the card and releasing over the scrim leaves the sheet open, and so does the reverse. A click on the scrim closes it.
    • With touch, as CDP touch events: a drag either way leaves it open, and a tap on the scrim closes it.
  • 10. docs(sdk): builder agents check their dev page in their own browser #1297's text: passed, on a patchy dev page in desktop Chromium.
    • iframe#patch is the shell's only frame: sandbox="allow-scripts allow-modals", origin null, and contentDocument is null to the shell's script.
    • The shell's focus is on iframe#patch as the patch loads, and a real A reached the patch with no click. The same held on hosted patches, signed in and signed out.
    • A keydown dispatched in the shell page never reached the frame. One dispatched inside the frame ran Mod+K but typed nothing into a focused field.
    • After the patch offered a file, click() and a dispatched click on the shell's Download did nothing, and a real click downloaded deals.csv.
    • On a hosted patch, clicking a download card's text took keys out of the patch, and its Download or Not now handed them back. The new-version bar's Not now did the same, as the patchy-hotkeys line says.
    • Under that paragraph, HotkeySheet keeps Tab and Shift+Tab inside it. A bare showModal() dialog in the patch lets Tab leave the frame, and Escape then misses it, as docs(sdk): a hand-built shortcuts sheet keeps focus inside it #1256's text says.
Screenshots
Sheet while Off Dialog, desktop Failed save, phone Switcher over Patchy's dialog
The sheet with its Off row and dashed keycaps Patchy's dialog, Turn on single-key shortcuts in every patch except public ones? The failed save with Try again on a phone The switcher open over the shortcuts dialog mid-save
Account menu, On Receipt, Off, no script Account menu, phone D1 note with a new version Download card
Account menu with the switch on Receipt Turned off single-key shortcuts with the switch off, script disabled The phone account menu with the switch off The D1 note stacked above the new-version bar The download card on a patchy dev page

Golden journeys

  • Use a tool live: passed. On Kudos (tier 2), Jordan, with shortcuts Off and a frame named off, took back a reaction. Priya's open page went from 3 to 2 without a reload, and back to 3.
  • Share and unshare: passed. deals-public answered 200 public, max-age=60 signed out. After share … company it answered the 401 door (private, no-store, x-patchy-sign-in-url), and share … public brought back the 200.
  • Publish a page: passed. Single files published and opened for other members. retire showed the notice page, and restore gave 200 again.
  • Find and open a tool: passed. The switcher found Kudos, and it opened in its frame.
  • Sign in: passed with personas only. A signed-out company page answers 401 with the door.

Rollback answers: they match the diff.

Not run

  • The PR's own shortcut-setting.spec.ts in desktop Chromium: I ran the checks above instead, on a shared machine with one instance. CI's browser job (headless shell) passed at this head.
  • A question while tier 2's starting cover is up: covered only by the PR's spec.
  • Firefox and WebKit: this run was desktop Chromium and the headless shell only.
  • A real release-38 repo build: my stand-in was a head repo build with shortcutSetting removed from its stored manifest and its release set to 0.38.0. The old bundle itself was checked through the committed 0.38 single file.
  • Clerk sign-in: personas only. clerk-live passed in CI.
  • The switcher on plain main: nothing in this chain misbehaved, so there was nothing to compare.

Notes

@allisonmahmood

Copy link
Copy Markdown
Owner Author

The acceptance nit is fixed in 7ea83a9. shortcuts.setting's argument check used an empty Schema.Struct({}), which in Effect 4 takes any non-null value, so a question with arguments got the setting instead of a refusal. It now decodes Schema.Record(Schema.String, Schema.Never), which takes {} and nothing else. The SDK (#1279) sends {}.

A new browser case asks with an object, a number and a list. Each gets invalid_request and no dialog. It failed against the old decoder. The whole shortcut-setting.spec.ts passes 14 of 14 in the headless shell and in desktop Chromium.

@allisonmahmood
allisonmahmood force-pushed the feat/shortcut-setting-store-1273 branch from a7fc936 to 2aa48ec Compare November 11, 2026 18:41
Base automatically changed from feat/shortcut-setting-store-1273 to main November 11, 2026 18:53
…h's sheet or the account menu

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood force-pushed the feat/shortcut-setting-shell-1275 branch from 7ea83a9 to a7aeeea Compare November 11, 2026 18:54
@allisonmahmood
allisonmahmood merged commit b9dc456 into main Nov 11, 2026
25 checks passed
@allisonmahmood
allisonmahmood deleted the feat/shortcut-setting-shell-1275 branch November 11, 2026 19:06
allisonmahmood added a commit that referenced this pull request Nov 12, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:core Touches the core area area:docs Touches the docs area area:server Touches the server area area:ui Portal and first-party browser pages, shared rendering and styles size:xl Over 1,000 changed lines; review in multiple passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The shell turns on the single-key shortcut setting, with its dialog and the account menu switch Viewers can turn off single-key shortcuts in patches

1 participant