[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79GHGS5C5CWMTNPMGFZ603K":3,"skill-same:01M79GHGS5C5CWMTNPMGFZ603K":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79GHGS5C5CWMTNPMGFZ603K","saasaloy-command",null,"Runbook for the command module, the Cmd\u002FCtrl+K command palette, the G-then-letter navigation keys, the ? shortcut sheet and the key registry behind them in the admin and app SPAs. Use when adding a command or a keyboard shortcut to a screen, picking a key, reading a binding conflict error, changing the palette or the sheet, or debugging a key that does not fire.","mimukit\u002Fsaasaloy","mimukit","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11677026?v=4","01M79GFSERAQQ77QPQMC1N0Y6M","Mukitul Islam Mukit","01M79GFSFA4WMGEEBHA68N59WV",4,"MIT","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fmodules\u002Fcommand\u002Fskills\u002Fsaasaloy-command\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: saasaloy-command\ndescription: Runbook for the command module, the Cmd\u002FCtrl+K command palette, the G-then-letter navigation keys, the ? shortcut sheet and the key registry behind them in the admin and app SPAs. Use when adding a command or a keyboard shortcut to a screen, picking a key, reading a binding conflict error, changing the palette or the sheet, or debugging a key that does not fire.\n---\n\n# command: the command palette and the keyboard shortcuts\n\n`command` is a **feature module** (`saasaloy:feature`). It depends on `shell`, which `add` resolves and installs first. It takes neither providers nor drivers: it wraps no external service.\n\nA project gets one keyboard model for every signed-in SPA on the shell. Cmd+K (Ctrl+K off macOS) opens a palette of every command the current screen and the app declare. `G` then a letter moves between screens, single keys act on the page, and `?` opens a sheet that lists every binding. A screen declares its commands once, through `useCommands` from the shell, and the palette row, the key binding and the sheet line all come from that one declaration.\n\n## What it installs\n\n| File | Lands at |\n| --- | --- |\n| `files\u002Fui\u002Flib\u002Fcommand\u002Fregistry.ts` | `packages\u002Fui\u002Fsrc\u002Flib\u002Fcommand\u002Fregistry.ts`: the pure rules. It merges the registrations, parses shortcuts, finds conflicts, and builds the palette groups, the sheet sections and the pending-sequence hints (`pendingShortcuts`) |\n| `files\u002Fui\u002Flib\u002Fcommand\u002Fengine.ts` | `packages\u002Fui\u002Fsrc\u002Flib\u002Fcommand\u002Fengine.ts`: the only file that imports `@tanstack\u002Freact-hotkeys`. It also reports the sequences in progress (`usePendingSequences`) |\n| `files\u002Fui\u002Flib\u002Fcommand\u002Ffilter.ts` | `packages\u002Fui\u002Fsrc\u002Flib\u002Fcommand\u002Ffilter.ts`: the palette filter on `@leeoniya\u002Fufuzzy` |\n| `files\u002Fui\u002Fblocks\u002Fcommand\u002Fkeycaps.tsx` | `packages\u002Fui\u002Fsrc\u002Fblocks\u002Fcommand\u002Fkeycaps.tsx`: a shortcut drawn as shell `Kbd` caps |\n| `files\u002Fui\u002Fblocks\u002Fcommand\u002Fcommand-palette.tsx` | `packages\u002Fui\u002Fsrc\u002Fblocks\u002Fcommand\u002Fcommand-palette.tsx`: the palette |\n| `files\u002Fui\u002Fblocks\u002Fcommand\u002Fshortcut-help.tsx` | `packages\u002Fui\u002Fsrc\u002Fblocks\u002Fcommand\u002Fshortcut-help.tsx`: the `?` sheet |\n| `files\u002Fui\u002Fcontainers\u002Fcommand\u002Fcommand-root.tsx` | `packages\u002Fui\u002Fsrc\u002Fcontainers\u002Fcommand\u002Fcommand-root.tsx`: the provider, the two bindings that open the views, the key hints it puts in the shell's `ShortcutHintsContext`, the header trigger, and `commandExtension()` |\n\nIt also adds two exact-pinned dependencies to `packages\u002Fui\u002Fpackage.json`: `@tanstack\u002Freact-hotkeys` and `@leeoniya\u002Fufuzzy`. Run `pnpm install` after `add`.\n\n## Wire-up\n\nYou do nothing by hand. The `admin` and `app` descriptors each carry a `plugin-array` patch gated on `command`, so `saasaloy add command` writes this line into `apps\u002Fadmin\u002Fsrc\u002Fcomponents\u002Fshell-extensions.ts` and `apps\u002Fapp\u002Fsrc\u002Fcomponents\u002Fshell-extensions.ts`, with the import above it:\n\n```ts\nimport { commandExtension } from \"@repo\u002Fui\u002Fcontainers\u002Fcommand\u002Fcommand-root\";\n\nexport const shellExtensions = defineShellExtensions({\n  extensions: [commandExtension()],\n});\n```\n\nInstall order does not matter. When `admin` or `app` lands after `command`, the backfill writes the patch in that run (ADR 0054). `ShellLayout` wraps the layout in the extension's provider and renders the header trigger at the right of the header, after the page path.\n\nA new SPA on the shell gets the same model in two steps. Copy `src\u002Fcomponents\u002Fshell-extensions.ts` from `admin`, pass the list to `ShellLayout` as `extensions`, and add `commandExtension()` to it. Then declare the app's own commands from a child of `ShellLayout`, as `AdminCommands` in `apps\u002Fadmin\u002Fsrc\u002Fcomponents\u002Fapp-shell.tsx` does. A `useCommands` call in the component that renders `ShellLayout` runs above the provider and registers nothing.\n\n## Add a command\n\nDeclare it where the state it acts on lives, with `useCommands` from `@repo\u002Fui\u002Flib\u002Fshell\u002Fcommands`:\n\n```tsx\nimport { useCommands } from \"@repo\u002Fui\u002Flib\u002Fshell\u002Fcommands\";\n\nuseCommands(\n  [\n    {\n      id: \"admin.show-admins\",\n      title: \"Show admins\",\n      group: \"page\",\n      keywords: [\"role\", \"filter\"],\n      when: () => roleFilter !== \"admin\",\n      run: () => {\n        setRoleFilter(\"admin\");\n      },\n    },\n  ],\n  { scope: \"route\", label: \"Users\" }\n);\n```\n\nThe fields:\n\n- `id` is `\u003Cmodule>.\u003Cverb>`: the module that declares it, a dot, then what it does in kebab case. `admin.go-to-users`, `admin.sign-out`, `shell.toggle-sidebar`, `command.open-palette`. The id is unique across the app. A repeated id is reported the way a conflict is: it throws in development, and in production it warns once and the first command keeps the id.\n- `title` is the palette row and the sheet line. Start with a verb: \"Go to Users\", \"Show admins\", \"Sign out\".\n- `group` is `page`, `navigation`, `actions` or `preferences`. The palette lists the groups in that order, and the page group takes the registration's `label` as its heading. Inside a group, the shell's commands come first, then this module's, then every other owner's in declaration order (`PALETTE_OWNER_ORDER` in `lib\u002Fcommand\u002Fregistry.ts`, read from the id prefix).\n- `keywords` are extra words the filter matches. The filter is fuzzy, so \"usr\" finds \"Users\" without a keyword.\n- `icon` is a module-level lucide component, drawn at 16 px in the muted tone.\n- `shortcut` is optional. Most commands are palette-only. See the key map below before you add one.\n- `when` hides the row and makes the key pass through while it returns `false`. It is read when the palette opens and when the key is pressed, so it may close over fresh state.\n- `active` marks the current choice of a set, such as the theme in use. The palette reads it when it renders and shows \"Current\" in place of the keycap.\n- `run` receives `{ source: \"palette\" | \"shortcut\" }`. The palette closes before `run` is called.\n\nA navigation command per nav row comes from `NAV_AREAS`: give the item a `shortcut` in `src\u002Fcomponents\u002Fnav.ts` and `commands.ts` turns it into \"Go to …\" with that key. Never derive the letter from the label.\n\n## Scopes\n\nThe `scope` says how long a registration lives. The palette lists `global` and `route` commands. The `data-table` keys are bindings only, and the sheet lists them under Data table.\n\n| Scope | What it holds | Lives while |\n|---|---|---|\n| `global` | the app's own commands: navigation, theme, sign out, the sidebar, and this module's two | the shell is mounted |\n| `route` | the current page's commands, first in the palette under `label` | the page is mounted |\n| `data-table` | `J`, `K`, `Enter` and `Escape` from `DataTable` | a `DataTable` is mounted |\n\nEvery mounted scope overlaps the others: a page's table, the page and the shell are on screen together. So a key may appear once among every registration that is mounted at the same time.\n\n## Default key map\n\n| Key | Command | Where |\n|---|---|---|\n| `Mod+K` | open and close the palette (`command.open-palette`) | everywhere, also inside a text field |\n| `?` | open the shortcut sheet (`command.show-shortcuts`) | everywhere outside a text field; `?` typed into an empty palette search does the same |\n| `Mod+B` | toggle the sidebar (`shell.toggle-sidebar`) | everywhere |\n| `G` then a letter | go to a nav row: `G O` Overview and `G U` Users in admin, `G H` Home in app | outside a text field |\n| `J` \u002F `K` | next \u002F previous table row | while a `DataTable` is mounted |\n| `Enter` | open the highlighted row | while a row is highlighted |\n| `Escape` | drop the row highlight, and close the detail panel when the page passes `onDismiss` to `DataTable` | while a row is highlighted or selected |\n\n`Mod` is Cmd on macOS and Ctrl elsewhere, and the keycaps follow the platform: `⌘ K` on a Mac, `Ctrl K` on Windows and Linux. Every key is logical, so it follows the typed character: `?` works on every keyboard layout. A single key or a sequence never fires inside a text field. A chord that holds Mod, Ctrl or Alt does. While a dialog or an alert dialog is open, every binding is off, Mod+K included. While the palette or the sheet is open, only Mod+K and `?` act, to switch or close them. Sign out, the theme choices and the page filters are palette-only.\n\n## Sequence hints\n\nA sequence such as `G U` allows 2500 ms between its steps (`SEQUENCE_TIMEOUT_MS` in `engine.ts`), so a person has time to read the hints. The shell sidebar shows them; see \"Key hints in the sidebar\" in the `saasaloy-shell` skill.\n\n- `usePendingSequences()` in `engine.ts` reads the engine's own state through `useHotkeyRegistrations()`: every sequence binding with `matchedStepCount > 0`, by its binding id. There is no second key listener.\n- The provider waits 300 ms (`HINT_DELAY_MS` in `command-root.tsx`) with the same set in progress before it publishes the hints, so a person who types `G U` without stopping sees none.\n- `pendingShortcuts(bound, ids, platform)` in `registry.ts` turns the ids into `{ shortcut, title, rest }`, where `rest` holds the keycaps still to press. It is pure and tested in `registry.test.ts`.\n- The hints close when the sequence completes, on a key that matches no next step (Escape included), at the timeout, on a pointer press anywhere, and when the window loses focus. The last two call `resetSequenceProgress()`, so the next letter typed does not jump to a screen. The click itself still lands.\n\nA nav row's `shortcut` must equal its command's `shortcut`, or its hint lands in the \"Also\" panel rather than on the row. The admin and app `commands.ts` files derive both from the same `NAV_AREAS` field, so they match by construction.\n\n**This version needs the matching `shell`.** `command-root.tsx` imports `ShortcutHintsContext` from the shell's `lib\u002Fshell\u002Fcommands.ts`, so `command` updated alone against an older `shell` fails `pnpm typecheck`. Run `saasaloy update` with no module name, which moves every installed module together. The update note `command\u002F0001-shortcut-hints-need-shell` says the same.\n\n## Reserved keys\n\nThese keys carry one meaning in every app. Use a reserved key only for that meaning, or pick a key that is not in this table.\n\n| Key | Meaning |\n|---|---|\n| `C` | create a record of the page's kind, usually by opening the create dialog |\n| `E` | edit the selected record |\n| `Mod+Backspace` | delete the selected record, always behind the shell `AlertDialog` confirm |\n| `\u002F` | focus the page's filter or search field |\n| `G` then a letter | go to a screen; the letter is set on the `NAV_AREAS` row |\n\n`J`, `K`, `Enter` and `Escape` belong to the data table while one is mounted, so a page with a table cannot bind them. They act only while no control outside the table holds the focus.\n\n## Conflicts\n\nTwo bindings conflict when they are the same chord or sequence, or when one is a prefix of the other (`G` against `G U`), in overlapping scopes. `Ctrl` counts as `Mod` in this check, because Mod is Control on Windows and Linux, so `Ctrl+B` conflicts with `Mod+B`. A command whose `when` is false still owns its key. In development a conflict throws, and the error names both command ids, the first of which keeps the key. In production it warns once in the console, the first-declared binding keeps the key, and the second command stays in the palette with no key.\n\nIn your project the development-mode throw is the check: open the app with `pnpm dev` after you add a key, and a conflict stops the page with both command ids. The saasaloy repo guards the shipped defaults with its own tests, which run the app's commands, this module's two keys, `Mod+B` and the four table keys through `findConflicts`; those tests stay in the saasaloy repo and never reach a project.\n\n## The palette and the sheet\n\nThe palette follows the approved mockup in plan 0084, Phase 1: 576 px wide, 12vh from the top (8 px below 640 px), a 48 px search row, a list capped at `min(480px, 60vh)`, 34 px rows and a 40 px footer of key hints. Matched letters are semibold and underlined. Keycaps inside both popups take a 1 px `input` hairline with no fill. The sheet groups the bindings under General, one heading per page that binds keys, Navigation, and Data table, in two columns from 640 px.\n\nThe trigger sits in the header: a 240 px \"Search commands…\" field with the palette's keycaps from 640 px up, and a 32 px search icon button below.\n\n## Swapping the engine\n\n`@tanstack\u002Freact-hotkeys` is pre-1.0, so `engine.ts` is the only file that imports it, and `pnpm deps:update` treats a `0.y` to `0.z` bump as a major you opt into. To move to another key library, rewrite `engine.ts` against the same `EngineBinding` shape and change the dependency patch in this module's descriptor. Nothing else changes.\n\n## What `remove` leaves behind\n\n`saasaloy remove command` deletes the files above and takes `commandExtension()` and its import back out of each app's `shell-extensions.ts`. It leaves the two dependencies in `packages\u002Fui\u002Fpackage.json` with a warning; delete them by hand and run `pnpm install`. The commands each screen declares stay, and do nothing with no provider mounted. `Mod+B` falls back to the sidebar's own listener.\n\n## Next\n\nRun `saasaloy-app` to register commands for the customer screens.\n","# command: the command palette and the keyboard shortcuts\n\n`command` is a **feature module** (`saasaloy:feature`). It depends on `shell`, which `add` resolves and installs first. It takes neither providers nor drivers: it wraps no external service.\n\nA project gets one keyboard model for every signed-in SPA on the shell. Cmd+K (Ctrl+K off macOS) opens a palette of every command the current screen and the app declare. `G` then a letter moves between screens, single keys act on the page, and `?` opens a sheet that lists every binding. A screen declares its commands once, through `useCommands` from the shell, and the palette row, the key binding and the sheet line all come from that one declaration.\n\n## What it installs\n\n| File | Lands at |\n| --- | --- |\n| `files\u002Fui\u002Flib\u002Fcommand\u002Fregistry.ts` | `packages\u002Fui\u002Fsrc\u002Flib\u002Fcommand\u002Fregistry.ts`: the pure rules. It merges the registrations, parses shortcuts, finds conflicts, and builds the palette groups, the sheet sections and the pending-sequence hints (`pendingShortcuts`) |\n| `files\u002Fui\u002Flib\u002Fcommand\u002Fengine.ts` | `packages\u002Fui\u002Fsrc\u002Flib\u002Fcommand\u002Fengine.ts`: the only file that imports `@tanstack\u002Freact-hotkeys`. It also reports the sequences in progress (`usePendingSequences`) |\n| `files\u002Fui\u002Flib\u002Fcommand\u002Ffilter.ts` | `packages\u002Fui\u002Fsrc\u002Flib\u002Fcommand\u002Ffilter.ts`: the palette filter on `@leeoniya\u002Fufuzzy` |\n| `files\u002Fui\u002Fblocks\u002Fcommand\u002Fkeycaps.tsx` | `packages\u002Fui\u002Fsrc\u002Fblocks\u002Fcommand\u002Fkeycaps.tsx`: a shortcut drawn as shell `Kbd` caps |\n| `files\u002Fui\u002Fblocks\u002Fcommand\u002Fcommand-palette.tsx` | `packages\u002Fui\u002Fsrc\u002Fblocks\u002Fcommand\u002Fcommand-palette.tsx`: the palette |\n| `files\u002Fui\u002Fblocks\u002Fcommand\u002Fshortcut-help.tsx` | `packages\u002Fui\u002Fsrc\u002Fblocks\u002Fcommand\u002Fshortcut-help.tsx`: the `?` sheet |\n| `files\u002Fui\u002Fcontainers\u002Fcommand\u002Fcommand-root.tsx` | `packages\u002Fui\u002Fsrc\u002Fcontainers\u002Fcommand\u002Fcommand-root.tsx`: the provider, the two bindings that open the views, the key hints it puts in the shell's `ShortcutHintsContext`, the header trigger, and `commandExtension()` |\n\nIt also adds two exact-pinned dependencies to `packages\u002Fui\u002Fpackage.json`: `@tanstack\u002Freact-hotkeys` and `@leeoniya\u002Fufuzzy`. Run `pnpm install` after `add`.\n\n## Wire-up\n\nYou do nothing by hand. The `admin` and `app` descriptors each carry a `plugin-array` patch gated on `command`, so `saasaloy add command` writes this line into `apps\u002Fadmin\u002Fsrc\u002Fcomponents\u002Fshell-extensions.ts` and `apps\u002Fapp\u002Fsrc\u002Fcomponents\u002Fshell-extensions.ts`, with the import above it:\n\n```ts\nimport { commandExtension } from \"@repo\u002Fui\u002Fcontainers\u002Fcommand\u002Fcommand-root\";\n\nexport const shellExtensions = defineShellExtensions({\n  extensions: [commandExtension()],\n});\n```\n\nInstall order does not matter. When `admin` or `app` lands after `command`, the backfill writes the patch in that run (ADR 0054). `ShellLayout` wraps the layout in the extension's provider and renders the header trigger at the right of the header, after the page path.\n\nA new SPA on the shell gets the same model in two steps. Copy `src\u002Fcomponents\u002Fshell-extensions.ts` from `admin`, pass the list to `ShellLayout` as `extensions`, and add `commandExtension()` to it. Then declare the app's own commands from a child of `ShellLayout`, as `AdminCommands` in `apps\u002Fadmin\u002Fsrc\u002Fcomponents\u002Fapp-shell.tsx` does. A `useCommands` call in the component that renders `ShellLayout` runs above the provider and registers nothing.\n\n## Add a command\n\nDeclare it where the state it acts on lives, with `useCommands` from `@repo\u002Fui\u002Flib\u002Fshell\u002Fcommands`:\n\n```tsx\nimport { useCommands } from \"@repo\u002Fui\u002Flib\u002Fshell\u002Fcommands\";\n\nuseCommands(\n  [\n    {\n      id: \"admin.show-admins\",\n      title: \"Show admins\",\n      group: \"page\",\n      keywords: [\"role\", \"filter\"],\n      when: () => roleFilter !== \"admin\",\n      run: () => {\n        setRoleFilter(\"admin\");\n      },\n    },\n  ],\n  { scope: \"route\", label: \"Users\" }\n);\n```\n\nThe fields:\n\n- `id` is `\u003Cmodule>.\u003Cverb>`: the module that declares it, a dot, then what it does in kebab case. `admin.go-to-users`, `admin.sign-out`, `shell.toggle-sidebar`, `command.open-palette`. The id is unique across the app. A repeated id is reported the way a conflict is: it throws in development, and in production it warns once and the first command keeps the id.\n- `title` is the palette row and the sheet line. Start with a verb: \"Go to Users\", \"Show admins\", \"Sign out\".\n- `group` is `page`, `navigation`, `actions` or `preferences`. The palette lists the groups in that order, and the page group takes the registration's `label` as its heading. Inside a group, the shell's commands come first, then this module's, then every other owner's in declaration order (`PALETTE_OWNER_ORDER` in `lib\u002Fcommand\u002Fregistry.ts`, read from the id prefix).\n- `keywords` are extra words the filter matches. The filter is fuzzy, so \"usr\" finds \"Users\" without a keyword.\n- `icon` is a module-level lucide component, drawn at 16 px in the muted tone.\n- `shortcut` is optional. Most commands are palette-only. See the key map below before you add one.\n- `when` hides the row and makes the key pass through while it returns `false`. It is read when the palette opens and when the key is pressed, so it may close over fresh state.\n- `active` marks the current choice of a set, such as the theme in use. The palette reads it when it renders and shows \"Current\" in place of the keycap.\n- `run` receives `{ source: \"palette\" | \"shortcut\" }`. The palette closes before `run` is called.\n\nA navigation command per nav row comes from `NAV_AREAS`: give the item a `shortcut` in `src\u002Fcomponents\u002Fnav.ts` and `commands.ts` turns it into \"Go to …\" with that key. Never derive the letter from the label.\n\n## Scopes\n\nThe `scope` says how long a registration lives. The palette lists `global` and `route` commands. The `data-table` keys are bindings only, and the sheet lists them under Data table.\n\n| Scope | What it holds | Lives while |\n|---|---|---|\n| `global` | the app's own commands: navigation, theme, sign out, the sidebar, and this module's two | the shell is mounted |\n| `route` | the current page's commands, first in the palette under `label` | the page is mounted |\n| `data-table` | `J`, `K`, `Enter` and `Escape` from `DataTable` | a `DataTable` is mounted |\n\nEvery mounted scope overlaps the others: a page's table, the page and the shell are on screen together. So a key may appear once among every registration that is mounted at the same time.\n\n## Default key map\n\n| Key | Command | Where |\n|---|---|---|\n| `Mod+K` | open and close the palette (`command.open-palette`) | everywhere, also inside a text field |\n| `?` | open the shortcut sheet (`command.show-shortcuts`) | everywhere outside a text field; `?` typed into an empty palette search does the same |\n| `Mod+B` | toggle the sidebar (`shell.toggle-sidebar`) | everywhere |\n| `G` then a letter | go to a nav row: `G O` Overview and `G U` Users in admin, `G H` Home in app | outside a text field |\n| `J` \u002F `K` | next \u002F previous table row | while a `DataTable` is mounted |\n| `Enter` | open the highlighted row | while a row is highlighted |\n| `Escape` | drop the row highlight, and close the detail panel when the page passes `onDismiss` to `DataTable` | while a row is highlighted or selected |\n\n`Mod` is Cmd on macOS and Ctrl elsewhere, and the keycaps follow the platform: `⌘ K` on a Mac, `Ctrl K` on Windows and Linux. Every key is logical, so it follows the typed character: `?` works on every keyboard layout. A single key or a sequence never fires inside a text field. A chord that holds Mod, Ctrl or Alt does. While a dialog or an alert dialog is open, every binding is off, Mod+K included. While the palette or the sheet is open, only Mod+K and `?` act, to switch or close them. Sign out, the theme choices and the page filters are palette-only.\n\n## Sequence hints\n\nA sequence such as `G U` allows 2500 ms between its steps (`SEQUENCE_TIMEOUT_MS` in `engine.ts`), so a person has time to read the hints. The shell sidebar shows them; see \"Key hints in the sidebar\" in the `saasaloy-shell` skill.\n\n- `usePendingSequences()` in `engine.ts` reads the engine's own state through `useHotkeyRegistrations()`: every sequence binding with `matchedStepCount > 0`, by its binding id. There is no second key listener.\n- The provider waits 300 ms (`HINT_DELAY_MS` in `command-root.tsx`) with the same set in progress before it publishes the hints, so a person who types `G U` without stopping sees none.\n- `pendingShortcuts(bound, ids, platform)` in `registry.ts` turns the ids into `{ shortcut, title, rest }`, where `rest` holds the keycaps still to press. It is pure and tested in `registry.test.ts`.\n- The hints close when the sequence completes, on a key that matches no next step (Escape included), at the timeout, on a pointer press anywhere, and when the window loses focus. The last two call `resetSequenceProgress()`, so the next letter typed does not jump to a screen. The click itself still lands.\n\nA nav row's `shortcut` must equal its command's `shortcut`, or its hint lands in the \"Also\" panel rather than on the row. The admin and app `commands.ts` files derive both from the same `NAV_AREAS` field, so they match by construction.\n\n**This version needs the matching `shell`.** `command-root.tsx` imports `ShortcutHintsContext` from the shell's `lib\u002Fshell\u002Fcommands.ts`, so `command` updated alone against an older `shell` fails `pnpm typecheck`. Run `saasaloy update` with no module name, which moves every installed module together. The update note `command\u002F0001-shortcut-hints-need-shell` says the same.\n\n## Reserved keys\n\nThese keys carry one meaning in every app. Use a reserved key only for that meaning, or pick a key that is not in this table.\n\n| Key | Meaning |\n|---|---|\n| `C` | create a record of the page's kind, usually by opening the create dialog |\n| `E` | edit the selected record |\n| `Mod+Backspace` | delete the selected record, always behind the shell `AlertDialog` confirm |\n| `\u002F` | focus the page's filter or search field |\n| `G` then a letter | go to a screen; the letter is set on the `NAV_AREAS` row |\n\n`J`, `K`, `Enter` and `Escape` belong to the data table while one is mounted, so a page with a table cannot bind them. They act only while no control outside the table holds the focus.\n\n## Conflicts\n\nTwo bindings conflict when they are the same chord or sequence, or when one is a prefix of the other (`G` against `G U`), in overlapping scopes. `Ctrl` counts as `Mod` in this check, because Mod is Control on Windows and Linux, so `Ctrl+B` conflicts with `Mod+B`. A command whose `when` is false still owns its key. In development a conflict throws, and the error names both command ids, the first of which keeps the key. In production it warns once in the console, the first-declared binding keeps the key, and the second command stays in the palette with no key.\n\nIn your project the development-mode throw is the check: open the app with `pnpm dev` after you add a key, and a conflict stops the page with both command ids. The saasaloy repo guards the shipped defaults with its own tests, which run the app's commands, this module's two keys, `Mod+B` and the four table keys through `findConflicts`; those tests stay in the saasaloy repo and never reach a project.\n\n## The palette and the sheet\n\nThe palette follows the approved mockup in plan 0084, Phase 1: 576 px wide, 12vh from the top (8 px below 640 px), a 48 px search row, a list capped at `min(480px, 60vh)`, 34 px rows and a 40 px footer of key hints. Matched letters are semibold and underlined. Keycaps inside both popups take a 1 px `input` hairline with no fill. The sheet groups the bindings under General, one heading per page that binds keys, Navigation, and Data table, in two columns from 640 px.\n\nThe trigger sits in the header: a 240 px \"Search commands…\" field with the palette's keycaps from 640 px up, and a 32 px search icon button below.\n\n## Swapping the engine\n\n`@tanstack\u002Freact-hotkeys` is pre-1.0, so `engine.ts` is the only file that imports it, and `pnpm deps:update` treats a `0.y` to `0.z` bump as a major you opt into. To move to another key library, rewrite `engine.ts` against the same `EngineBinding` shape and change the dependency patch in this module's descriptor. Nothing else changes.\n\n## What `remove` leaves behind\n\n`saasaloy remove command` deletes the files above and takes `commandExtension()` and its import back out of each app's `shell-extensions.ts`. It leaves the two dependencies in `packages\u002Fui\u002Fpackage.json` with a warning; delete them by hand and run `pnpm install`. The commands each screen declares stay, and do nothing with no provider mounted. `Mod+B` falls back to the sidebar's own listener.\n\n## Next\n\nRun `saasaloy-app` to register commands for the customer screens.\n",{"name":5,"description":7},"main","5ecf3d110b216ef678e06a1630f6b63a8e730bb5","modules\u002Fcommand\u002Fskills\u002Fsaasaloy-command",0,"https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy","https:\u002F\u002Fsaasaloy.com","https:\u002F\u002Fgithub.com\u002Fmimukit","https:\u002F\u002Fmimukit.com","Senior Software Engineer · 9+ yrs Fullstack (TS\u002FNode\u002FReact) · AI integrations, distributed systems · Building @saasaloy & @codealoy · Bangladesh 🇧🇩 \u002F Remote","2026-11-13 20:39:28",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mimukit\u002Fsaasaloy --skill saasaloy-command",{"tool":40,"command":41},"bunx","bunx skills add mimukit\u002Fsaasaloy --skill saasaloy-command",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mimukit\u002Fsaasaloy --skill saasaloy-command","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fmodules\u002Fcommand\u002Fskills\u002Fsaasaloy-command\u002FSKILL.md",true,[],[49,56,63,70,77,83],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7BE75C34XHSPVJNQC8FY4Q0","saasaloy-subscription","Runbook for the subscription capability — provider-agnostic subscriptions in packages\u002Fsubscription, with a plan file, a projection table, a billable-subject file, plan entitlements and per-provider modules. Use when adding a plan, adding a plan feature or a numeric limit, gating an API route with requireFeature or requireWithinLimit, reading the 402 it returns, working out why a subject resolves to the free plan, wiring a checkout or portal route, reading a SubscriptionError, choosing or switching SUBSCRIPTION_PROVIDER, registering a webhook in the vendor's dashboard, writing a third subscription provider, or upgrading a project that still has `billing` installed.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fmodules\u002Fsubscription\u002Fskills\u002Fsaasaloy-subscription\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7BE68MJ8H47JZKTBDFYR6JD","saasaloy-notification","Runbook for the notification module, in-app notifications for apps\u002Fapp. It owns the notifications and notification_opt_outs tables, notify() in apps\u002Fapi\u002Fsrc\u002Flib\u002Fnotify.ts, the \u002Fnotifications api routes, the bell in the app header, the sidebar badge, the \u002Fnotifications page with Inbox and Preferences tabs, the notification config section, and the daily prune. Use when sending a notification from an api route, adding or changing a category, changing retention, debugging a badge or bell count that does not move, or removing the module.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fmodules\u002Fnotification\u002Fskills\u002Fsaasaloy-notification\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7BE53PDQV0YDPG8RNVGTPEQ","saasaloy-cms","Runbook for the cms module, the in-house CMS behind apps\u002Fadmin. Covers code-defined collections, the Tiptap editor, drafts, revisions and redirects, the publish-time renderer, the public blog on apps\u002Fweb and its 60-second cache. Use when adding a collection or a field, rendering a stored body, reusing the editor, renderer or media field from another module, moving the blog to another path, re-rendering live posts after a renderer upgrade or a STORAGE_PUBLIC_URL change, or working out why a published post is not live yet.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fmodules\u002Fcms\u002Fskills\u002Fsaasaloy-cms\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79GQ03M63V5EKSST92B3S5X","saasaloy-beta","The beta module's own procedure.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Ftest\u002Ffixtures\u002Fregistry-clean\u002Fbeta\u002Fsaasaloy-beta\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79GPXV3K8YF3M4VA0KGVE0B","helper","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Ftest\u002Ffixtures\u002Fregistry-broken\u002Fbad-skill\u002Fhelper\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79GPR8EVS1YX0W8X33Q9YD8","saasaloy-update","Runbook for an AI agent that updates this project to a newer Saasaloy CLI and newer module versions with saasaloy update. Use when the owner says \"update saasaloy\", \"upgrade the CLI\", \"pull the latest modules\", \"update the base template\", \"work the merge plan\", \"clear the update notes\", when saasaloy update or saasaloy outdated --check exits 3 or 2, when a merge plan or .saasaloy\u002Fmerge-plan.md is handed to you, or when an adopted project takes its first update. Covers the CLI upgrade, the preview, --out, the file merges, the update notes and \"Notes that may apply\", --resolved and --done, a file deleted locally and --restore, a three-way or two-way base, an update that skips releases, --from, the verify commands, and the exit codes.","https:\u002F\u002Fgithub.com\u002Fmimukit\u002Fsaasaloy\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Ftemplates\u002Fbase\u002F_agents\u002Fskills\u002Fsaasaloy-update\u002FSKILL.md",[],[]]