Copilot instructions
.github/instructions/studio-shortcuts.instructions.mdCopilot instructions
Quality
61/100
Scores the file, not the repository.Length
394 words
5 headings · 1 code blocksRepository
108k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.12345# Studio Shortcut Review Rules67All comments are **advisory**.89## Core Principle1011When Studio UI changes introduce or materially alter repeated user actions, consider whether keyboard shortcut coverage should be added or updated. Shortcuts should use the shared Studio shortcut system and be discoverable from the visible UI.1213## When to Flag1415- PR adds a primary repeated action, toolbar action, list/table operation, or sub-page navigation without considering shortcut coverage.16- PR adds a one-off `keydown` listener for a normal Studio action instead of using the shortcut registry and `useShortcut`.17- PR registers a shortcut but does not expose it via `ShortcutTooltip`, `ShortcutBadge`, or command-menu badge where the action is visible.18- PR uses `G then ...` for a non-navigation action.19- PR adds a broad `Mod+letter` shortcut that overlaps common browser, editor, system, copy/save/search, or devtools behaviour.20- PR adds a shortcut without checking existing registry and non-registry listeners for collisions.21- PR adds a search/filter `<Input>` without `onKeyDown={onSearchInputEscape(...)}` — see **Search Inputs** below.2223## Preferred Pattern2425- Add definitions in `apps/studio/state/shortcuts/registry.ts` or `apps/studio/state/shortcuts/registry/*`.26- Register with `useShortcut`.27- Gate availability with `enabled`.28- Surface visible actions with `ShortcutTooltip` or `ShortcutBadge`.29- Prefer scoped, mnemonic sequential chords over global modifier chords.30- Set `showInSettings: false` on contextual shortcuts (scoped to a specific page state, sheet, or panel).31- When a shortcut group should appear in the reference sheet (`Mod+/`), add the group key to `SHORTCUT_REFERENCE_GROUP_ORDER` in `apps/studio/state/shortcuts/referenceGroups.ts` and a human label to `GROUP_LABELS` in `ShortcutsReferenceSheet.tsx`.32- For sheet-scoped shortcuts (active only while a `<Sheet>` is open), mount `useShortcut` inside the sheet component gated by the `open` prop — see `apps/studio/components/interfaces/ConnectSheet/useConnectSheetShortcut.ts` as the canonical example.3334## Search Inputs3536Every `<Input>` used as a search or filter field must include the staged-Escape handler from `apps/studio/lib/keyboard.ts`:3738```tsx39import { onSearchInputEscape } from '@/lib/keyboard'4041;<Input42 value={query}43 onChange={(e) => setQuery(e.target.value)}44 onKeyDown={onSearchInputEscape(query, setQuery)}45/>46```4748Behaviour:4950- **Escape while the input has a value** → clears the value, keeps focus (so a second Escape then blurs)51- **Escape while the input is empty** → blurs the input52- Stops propagation on Escape so the keystroke does not accidentally close a parent dialog or sheet5354When pairing with `useShortcut(LIST_PAGE_FOCUS_SEARCH, ...)` to focus a search input via keyboard, always also add `onSearchInputEscape` on the same input — focus and escape-to-blur are always a pair.5556Canonical implementation context: `apps/studio/state/shortcuts/registry.ts`, `apps/studio/state/shortcuts/useShortcut.tsx`, and `apps/studio/components/ui/Shortcut*.tsx`57
Also in supabase/supabase
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| supabase/supabase.claude/CLAUDE.md · 108k | CLAUDE.md | testlint-formatstylearch+1 | 97/100 | 3 days ago | |
| supabase/supabase.claude/skills/vercel-composition-patterns/AGENTS.md · 108k | AGENTS.md | styleapiuido-not | 45/100 | 3 days ago | |
| supabase/supabase.github/copilot-instructions.md · 108k | Copilot instructions | lint-formatstylegitagent-behaviour | 56/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-composition-patterns.instructions.md · 108k | Copilot instructions | stylegitapiui+1 | 61/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-copy.instructions.md · 108k | Copilot instructions | uiagent-behaviourdocs | 25/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-e2e-tests.instructions.md · 108k | Copilot instructions | teststyletesting-strategygit+2 | 60/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-error-handling.instructions.md · 108k | Copilot instructions | gitdo-not | 57/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-shadcn-components.instructions.md · 108k | Copilot instructions | gituido-not | 55/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-telemetry.instructions.md · 108k | Copilot instructions | stylegitdo-notdocs | 65/100 | 3 days ago | |
| supabase/supabase.github/instructions/studio-testing.instructions.md · 108k | Copilot instructions | testtypestesting-strategygit+1 | 55/100 | 3 days ago | |
| supabase/supabaseapps/studio/CLAUDE.md · 108k | CLAUDE.md | testlint-formatstyletesting-strategy+1 | 81/100 | 3 days ago |
Diff against .claude/CLAUDE.md Diff against .claude/skills/vercel-composition-patterns/AGENTS.md Diff against .github/copilot-instructions.md Diff against .github/instructions/studio-composition-patterns.instructions.md Diff against .github/instructions/studio-copy.instructions.md Diff against .github/instructions/studio-e2e-tests.instructions.md Diff against .github/instructions/studio-error-handling.instructions.md Diff against .github/instructions/studio-shadcn-components.instructions.md Diff against .github/instructions/studio-telemetry.instructions.md Diff against .github/instructions/studio-testing.instructions.md Diff against apps/studio/CLAUDE.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 3 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 3 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 3 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 24 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 3 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 3 days ago | |
| thangaram611/second-brain.github/copilot-instructions.md · 0 | Copilot instructions | setupteststylearch+4 | 96/100 | 3 days ago |
