Skip to content

chore(templates): shell-nav opens its command palette with Core's useHotkeys - #12026

Merged
josephfarina merged 2 commits into
mainfrom
josephfarina/cleanup-shell-nav
Nov 16, 2026
Merged

josephfarina merged 2 commits into
mainfrom
josephfarina/cleanup-shell-nav

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

What

The shell-nav page template registers its Cmd/Ctrl+K command palette shortcut with Core's useHotkeys (allowed inside inputs, as before) instead of a hand-written window keydown listener.

Why

Cleaner template code: the page uses the Core piece that already does this job instead of a hand-written version. No design or behavior change.

Evidence

  • Pixel-identical at 390 and 1280 px, with script on and off (full-page screenshots before and after, zero changed pixels).
  • Behavior unchanged in a browser check.
  • Build replay over real build requests: no start, alternatives list or block list changes.
  • Typecheck (strict, no unused locals), lint and prettier pass.

Scope

  • One change, in one page template.
  • Public text contains no internal context.

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 16, 2026 8:38am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@astracat-bot

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 16, 2026, 8:56 AM UTC

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 368a9c9

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.12 MB packed (−36 B); no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

Current run: CI concluded cancelled; parts of this report may be missing.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: moving the template to useHotkeys is the right direction, but mod+k narrows the shortcut while the changeset says pages behave the same.

  • mod+k (page.tsx:187) means ⌘ only on macOS and Ctrl only elsewhere, so Ctrl+K on macOS and Meta+K on Windows and Linux no longer open the palette, which contradicts "Pages look and behave the same" in .changeset/cleanup-shell-nav.md and "No design or behavior change" in the description.

To fix it, register both meta+k and ctrl+k entries to keep the old combos, or keep mod+k and describe the narrowed shortcut in the changeset and description, which then needs a maintainer decision because no current record sets this shortcut. The closed page is pixel-identical at 1280 and 390 px.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Changeset: the template registers its Cmd/Ctrl+K shortcut with Core's useHotkeys instead of a hand-written listener: verified (page.tsx:24, page.tsx:186-188).
  • Changeset: pages look the same: verified; the closed page is pixel-identical at 1280 and 390 px in Chromium.
  • Changeset: pages behave the same: false; Ctrl+K on macOS, Meta+K on Windows and Linux, and Ctrl+Alt+K no longer open the palette.
  • Description: the shortcut still works inside inputs: verified (allowInInputs: true, page.tsx:187).
  • Description: no design or behavior change: false, as above.
  • Description: pixel-identical at 390 and 1280 px with script on and off: verified with script on; script off not checked.
  • Description: behavior unchanged in a browser check: false; a Chromium check of the base and this branch shows the combos above stop working.
  • Description: build replay shows no start, alternatives or block-list change: consistent; the template imports the same packages as before, and the replay itself was not rerun.
  • Description: typecheck, lint and prettier pass: the Lint workflow passed on this head; the main CI workflow was cancelled for lack of CI capacity before its typecheck ran.
  • Description: one change in one page template: verified, plus its changeset.
  • Description: public text contains no internal context: verified.
  • .changeset/cleanup-shell-nav.md: finding, the "behave the same" claim.
  • packages/cli/assets/templates/pages/shell-nav/page.tsx: finding, mod+k narrows the shortcut; otherwise clear (template rubric A, imports resolve, rendering unchanged).

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because the CI workflow was cancelled when CI was full; re-run it.

Registering meta+k and ctrl+k keeps ⌘K and Ctrl+K opening the command palette on every platform, including from the search field, and the page renders the same. One non-blocking edge: Ctrl+Alt+K (AltGr+K) and ⌘+Ctrl+K no longer open the palette because useHotkeys matches modifiers exactly, which needs no change.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules since the last review (0): none.
  • Changeset: the template registers its Cmd+K and Ctrl+K shortcuts with Core's useHotkeys instead of a hand-written key listener: verified (page.tsx:24, page.tsx:188-191).
  • Changeset: pages look the same: verified; the closed page is pixel-identical at 1280 and 390 px in Chromium.
  • Changeset: pages behave the same: verified for every ⌘K and Ctrl+K press, with or without Shift, inside or outside the search field, with the platform reported as macOS or Linux; only Ctrl+Alt+K and ⌘+Ctrl+K now stay closed (non-blocking).
  • Description: the shortcut still works inside inputs: verified (allowInInputs: true, page.tsx:189-190, and a browser check from the focused search field).
  • Description: the page uses the Core piece that already does this job: verified; no page-level listener remains.
  • Description: no design or behavior change: verified, with the same edge as above.
  • Description: pixel-identical at 390 and 1280 px with script on and off: verified with script on; script off not captured, and the rendered markup is unchanged.
  • Description: behavior unchanged in a browser check: verified for the shortcut in a Chromium check of the base and this branch.
  • Description: build replay shows no start, alternatives or block-list change: consistent; the template imports the same packages as before, and the replay itself was not rerun.
  • Description: typecheck, lint and prettier pass: verified; a strict check with unused-local and unused-parameter errors on reports nothing in page.tsx, the Lint workflow passed, and prettier passes on both files.
  • Description: one change in one page template: verified, plus its changeset.
  • Description: public text contains no internal context: verified.
  • .changeset/cleanup-shell-nav.md: clear.
  • packages/cli/assets/templates/pages/shell-nav/page.tsx: clear (template rubric A); non-blocking notes on the edge chords and the unchanged View-menu hints (lines 111 and 118).

Automated review (maintainer link)

@josephfarina
josephfarina merged commit 115f418 into main Nov 16, 2026
125 of 131 checks passed
@github-actions
github-actions Bot deleted the josephfarina/cleanup-shell-nav branch November 17, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 368a9c9c Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant