registry.ts 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. // @ts-nocheck
  2. import { SHORTCUT_REFERENCE_GROUPS } from './referenceGroups'
  3. import { ADVISORS_NAV_SHORTCUT_IDS, advisorsNavRegistry } from './registry/advisors-nav'
  4. import { ADVISORS_PAGE_SHORTCUT_IDS, advisorsPageRegistry } from './registry/advisors-page'
  5. import { API_KEYS_SHORTCUT_IDS, apiKeysRegistry } from './registry/api-keys'
  6. import { AUTH_NAV_SHORTCUT_IDS, authNavRegistry } from './registry/auth-nav'
  7. import { AUTH_USERS_SHORTCUT_IDS, authUsersRegistry } from './registry/auth-users'
  8. import { DATABASE_NAV_SHORTCUT_IDS, databaseNavRegistry } from './registry/database-nav'
  9. import { FUNCTIONS_DETAIL_SHORTCUT_IDS, functionsDetailRegistry } from './registry/functions-detail'
  10. import {
  11. FUNCTIONS_DETAIL_NAV_SHORTCUT_IDS,
  12. functionsDetailNavRegistry,
  13. } from './registry/functions-detail-nav'
  14. import { FUNCTIONS_LIST_SHORTCUT_IDS, functionsListRegistry } from './registry/functions-list'
  15. import { FUNCTIONS_NAV_SHORTCUT_IDS, functionsNavRegistry } from './registry/functions-nav'
  16. import {
  17. FUNCTIONS_OVERVIEW_SHORTCUT_IDS,
  18. functionsOverviewRegistry,
  19. } from './registry/functions-overview'
  20. import { JWT_KEYS_SHORTCUT_IDS, jwtKeysRegistry } from './registry/jwt-keys'
  21. import { LIST_PAGE_SHORTCUT_IDS, listPageRegistry } from './registry/list-page'
  22. import { LOG_DRAINS_SHORTCUT_IDS, logDrainsRegistry } from './registry/log-drains'
  23. import { LOGS_PREVIEW_SHORTCUT_IDS, logsPreviewRegistry } from './registry/logs-preview'
  24. import {
  25. OBSERVABILITY_NAV_SHORTCUT_IDS,
  26. observabilityNavRegistry,
  27. } from './registry/observability-nav'
  28. import {
  29. OBSERVABILITY_PAGE_SHORTCUT_IDS,
  30. observabilityPageRegistry,
  31. } from './registry/observability-page'
  32. import { ORG_AUDIT_LOGS_SHORTCUT_IDS, orgAuditLogsRegistry } from './registry/org-audit-logs'
  33. import { ORG_INTEGRATIONS_SHORTCUT_IDS, orgIntegrationsRegistry } from './registry/org-integrations'
  34. import { ORG_OAUTH_APPS_SHORTCUT_IDS, orgOAuthAppsRegistry } from './registry/org-oauth-apps'
  35. import { ORG_PRIVATE_APPS_SHORTCUT_IDS, orgPrivateAppsRegistry } from './registry/org-private-apps'
  36. import { ORG_PROJECTS_SHORTCUT_IDS, orgProjectsRegistry } from './registry/org-projects'
  37. import { ORG_SETTINGS_NAV_SHORTCUT_IDS, orgSettingsNavRegistry } from './registry/org-settings-nav'
  38. import { ORG_TEAM_SHORTCUT_IDS, orgTeamRegistry } from './registry/org-team'
  39. import {
  40. PLATFORM_WEBHOOKS_SHORTCUT_IDS,
  41. platformWebhooksRegistry,
  42. } from './registry/platform-webhooks'
  43. import {
  44. PROJECT_SETTINGS_NAV_SHORTCUT_IDS,
  45. projectSettingsNavRegistry,
  46. } from './registry/project-settings-nav'
  47. import {
  48. REALTIME_INSPECTOR_SHORTCUT_IDS,
  49. realtimeInspectorRegistry,
  50. } from './registry/realtime-inspector'
  51. import { REALTIME_NAV_SHORTCUT_IDS, realtimeNavRegistry } from './registry/realtime-nav'
  52. import {
  53. SCHEMA_VISUALIZER_SHORTCUT_IDS,
  54. schemaVisualizerRegistry,
  55. } from './registry/schema-visualizer'
  56. import { SQL_EDITOR_SHORTCUT_IDS, sqlEditorRegistry } from './registry/sql-editor'
  57. import { STORAGE_BUCKETS_SHORTCUT_IDS, storageBucketsRegistry } from './registry/storage-buckets'
  58. import { STORAGE_EXPLORER_SHORTCUT_IDS, storageExplorerRegistry } from './registry/storage-explorer'
  59. import { STORAGE_NAV_SHORTCUT_IDS, storageNavRegistry } from './registry/storage-nav'
  60. import { TABLE_EDITOR_SHORTCUT_IDS, tableEditorRegistry } from './registry/table-editor'
  61. import { UNIFIED_LOGS_SHORTCUT_IDS, unifiedLogsRegistry } from './registry/unified-logs'
  62. import { ShortcutDefinition } from './types'
  63. /**
  64. * The canonical list of shortcut IDs. Add new shortcuts here first, then
  65. * register them in `SHORTCUT_DEFINITIONS` below.
  66. *
  67. * ID convention: `"<surface>.<action>"` in kebab-case, e.g. `"results.copy-markdown"`.
  68. * The `<surface>` groups related shortcuts (sql-editor, table-editor, results, etc).
  69. */
  70. export const SHORTCUT_IDS = {
  71. COMMAND_MENU_OPEN: 'command-menu.open',
  72. AI_ASSISTANT_TOGGLE: 'ai-assistant.toggle',
  73. AI_ASSISTANT_CANCEL_EDIT: 'ai-assistant.cancel-edit',
  74. INLINE_EDITOR_TOGGLE: 'inline-editor.toggle',
  75. RESULTS_COPY_MARKDOWN: 'results.copy-markdown',
  76. RESULTS_COPY_JSON: 'results.copy-json',
  77. RESULTS_COPY_CSV: 'results.copy-csv',
  78. RESULTS_DOWNLOAD_CSV: 'results.download-csv',
  79. DATA_TABLE_TOGGLE_FILTERS: 'data-table.toggle-filters',
  80. DATA_TABLE_RESET_FILTERS: 'data-table.reset-filters',
  81. DATA_TABLE_RESET_COLUMNS: 'data-table.reset-columns',
  82. DATA_TABLE_TOGGLE_LIVE: 'data-table.toggle-live',
  83. ACTION_BAR_SAVE: 'action-bar.save',
  84. OPERATION_QUEUE_SAVE: 'operation-queue.save',
  85. OPERATION_QUEUE_TOGGLE: 'operation-queue.toggle',
  86. OPERATION_QUEUE_UNDO: 'operation-queue.undo',
  87. NAV_HOME: 'nav.home',
  88. NAV_TABLE_EDITOR: 'nav.table-editor',
  89. NAV_SQL_EDITOR: 'nav.sql-editor',
  90. NAV_DATABASE: 'nav.database',
  91. NAV_AUTH: 'nav.auth',
  92. NAV_STORAGE: 'nav.storage',
  93. NAV_FUNCTIONS: 'nav.functions',
  94. NAV_REALTIME: 'nav.realtime',
  95. NAV_ADVISORS: 'nav.advisors',
  96. NAV_OBSERVABILITY: 'nav.observability',
  97. NAV_LOGS: 'nav.logs',
  98. NAV_INTEGRATIONS: 'nav.integrations',
  99. NAV_SETTINGS: 'nav.settings',
  100. NAV_ORG_PROJECTS: 'nav.org-projects',
  101. NAV_ORG_TEAM: 'nav.org-team',
  102. NAV_ORG_INTEGRATIONS: 'nav.org-integrations',
  103. NAV_ORG_USAGE: 'nav.org-usage',
  104. NAV_ORG_BILLING: 'nav.org-billing',
  105. NAV_ORG_SETTINGS: 'nav.org-settings',
  106. SHORTCUTS_OPEN_REFERENCE: 'shortcuts.open-reference',
  107. CONNECT_OPEN_SHEET: 'connect.open-sheet',
  108. // Org settings sub-page navigation chords
  109. ...ORG_SETTINGS_NAV_SHORTCUT_IDS,
  110. // Org OAuth Apps page shortcuts
  111. ...ORG_OAUTH_APPS_SHORTCUT_IDS,
  112. // Org Team page shortcuts
  113. ...ORG_TEAM_SHORTCUT_IDS,
  114. // Org Integrations page shortcuts
  115. ...ORG_INTEGRATIONS_SHORTCUT_IDS,
  116. // Org Projects page shortcuts
  117. ...ORG_PROJECTS_SHORTCUT_IDS,
  118. // Org Private Apps page shortcuts
  119. ...ORG_PRIVATE_APPS_SHORTCUT_IDS,
  120. // Org Audit Logs page shortcuts
  121. ...ORG_AUDIT_LOGS_SHORTCUT_IDS,
  122. // Table editor shortcuts
  123. ...TABLE_EDITOR_SHORTCUT_IDS,
  124. // Unified Logs page shortcuts
  125. ...UNIFIED_LOGS_SHORTCUT_IDS,
  126. // SQL editor shortcuts
  127. ...SQL_EDITOR_SHORTCUT_IDS,
  128. // Schema visualizer shortcuts
  129. ...SCHEMA_VISUALIZER_SHORTCUT_IDS,
  130. // Shared list-page shortcuts (database/* listing pages, etc.)
  131. ...LIST_PAGE_SHORTCUT_IDS,
  132. // Database sub-page navigation chords
  133. ...DATABASE_NAV_SHORTCUT_IDS,
  134. // Auth users page shortcuts
  135. ...AUTH_USERS_SHORTCUT_IDS,
  136. // Auth sub-page navigation chords
  137. ...AUTH_NAV_SHORTCUT_IDS,
  138. // Storage sub-page navigation chords
  139. ...STORAGE_NAV_SHORTCUT_IDS,
  140. // Storage Files (bucket list) page shortcuts
  141. ...STORAGE_BUCKETS_SHORTCUT_IDS,
  142. // Storage Explorer (file browser) shortcuts
  143. ...STORAGE_EXPLORER_SHORTCUT_IDS,
  144. // Edge Functions sub-page navigation chords
  145. ...FUNCTIONS_NAV_SHORTCUT_IDS,
  146. // Edge Functions overview (list) page shortcuts
  147. ...FUNCTIONS_LIST_SHORTCUT_IDS,
  148. // Per-function detail layout shortcuts (header actions + test submit)
  149. ...FUNCTIONS_DETAIL_SHORTCUT_IDS,
  150. // Per-function detail tab navigation (digits)
  151. ...FUNCTIONS_DETAIL_NAV_SHORTCUT_IDS,
  152. // Per-function Overview tab shortcuts (intervals, refresh, open logs)
  153. ...FUNCTIONS_OVERVIEW_SHORTCUT_IDS,
  154. // Realtime sub-page navigation chords
  155. ...REALTIME_NAV_SHORTCUT_IDS,
  156. // Realtime Inspector page shortcuts
  157. ...REALTIME_INSPECTOR_SHORTCUT_IDS,
  158. // Observability sub-page navigation chords
  159. ...OBSERVABILITY_NAV_SHORTCUT_IDS,
  160. // Observability shared page-action shortcuts
  161. ...OBSERVABILITY_PAGE_SHORTCUT_IDS,
  162. // Advisors sub-page navigation chords
  163. ...ADVISORS_NAV_SHORTCUT_IDS,
  164. // Advisors lint page shortcuts (tabs, refresh, close detail)
  165. ...ADVISORS_PAGE_SHORTCUT_IDS,
  166. // LogsPreviewer shortcuts (Function Logs, Function Invocations, Logs Explorer)
  167. ...LOGS_PREVIEW_SHORTCUT_IDS,
  168. // Platform Webhooks page shortcuts (org and project level)
  169. ...PLATFORM_WEBHOOKS_SHORTCUT_IDS,
  170. // Project Settings sub-page navigation chords and page actions
  171. ...PROJECT_SETTINGS_NAV_SHORTCUT_IDS,
  172. ...API_KEYS_SHORTCUT_IDS,
  173. ...JWT_KEYS_SHORTCUT_IDS,
  174. ...LOG_DRAINS_SHORTCUT_IDS,
  175. } as const
  176. /**
  177. * Union of all valid shortcut IDs. Use this as the `id` parameter type on any
  178. * hook or util that takes a shortcut reference.
  179. */
  180. export type ShortcutId = (typeof SHORTCUT_IDS)[keyof typeof SHORTCUT_IDS]
  181. /**
  182. * The shortcut registry — every shortcut the app knows about, keyed by
  183. * `ShortcutId`. The `Record` type ensures this map stays exhaustive: adding a
  184. * new entry to `SHORTCUT_IDS` without a matching definition here is a type error.
  185. *
  186. * See `ShortcutDefinition` for the shape of each entry.
  187. *
  188. * @example
  189. * // Add a new shortcut:
  190. * // 1. Add to SHORTCUT_IDS:
  191. * // SQL_EDITOR_RUN: 'sql-editor.run'
  192. * // 2. Add to SHORTCUT_DEFINITIONS:
  193. * // [SHORTCUT_IDS.SQL_EDITOR_RUN]: {
  194. * // id: SHORTCUT_IDS.SQL_EDITOR_RUN,
  195. * // label: 'Run query',
  196. * // sequence: ['Mod+Enter'],
  197. * // }
  198. * // 3. Use in a component:
  199. * // useShortcut(SHORTCUT_IDS.SQL_EDITOR_RUN, runQuery)
  200. */
  201. export const SHORTCUT_DEFINITIONS: Record<ShortcutId, ShortcutDefinition> = {
  202. [SHORTCUT_IDS.COMMAND_MENU_OPEN]: {
  203. id: SHORTCUT_IDS.COMMAND_MENU_OPEN,
  204. label: 'Open command menu',
  205. sequence: ['Mod+K'],
  206. },
  207. [SHORTCUT_IDS.AI_ASSISTANT_TOGGLE]: {
  208. id: SHORTCUT_IDS.AI_ASSISTANT_TOGGLE,
  209. label: 'Toggle AI Assistant panel',
  210. sequence: ['Mod+I'],
  211. referenceGroup: SHORTCUT_REFERENCE_GROUPS.GLOBAL_ACTIONS,
  212. },
  213. [SHORTCUT_IDS.INLINE_EDITOR_TOGGLE]: {
  214. id: SHORTCUT_IDS.INLINE_EDITOR_TOGGLE,
  215. label: 'Toggle inline SQL editor',
  216. sequence: ['Mod+E'],
  217. referenceGroup: SHORTCUT_REFERENCE_GROUPS.GLOBAL_ACTIONS,
  218. },
  219. [SHORTCUT_IDS.RESULTS_COPY_MARKDOWN]: {
  220. id: SHORTCUT_IDS.RESULTS_COPY_MARKDOWN,
  221. label: 'Copy results as Markdown',
  222. sequence: ['Mod+Shift+M'],
  223. },
  224. [SHORTCUT_IDS.RESULTS_COPY_JSON]: {
  225. id: SHORTCUT_IDS.RESULTS_COPY_JSON,
  226. label: 'Copy results as JSON',
  227. sequence: ['Mod+Shift+J'],
  228. },
  229. [SHORTCUT_IDS.RESULTS_COPY_CSV]: {
  230. id: SHORTCUT_IDS.RESULTS_COPY_CSV,
  231. label: 'Copy results as CSV',
  232. sequence: ['Mod+Shift+C'],
  233. },
  234. [SHORTCUT_IDS.RESULTS_DOWNLOAD_CSV]: {
  235. id: SHORTCUT_IDS.RESULTS_DOWNLOAD_CSV,
  236. label: 'Download results as CSV',
  237. sequence: ['Mod+Shift+D'],
  238. },
  239. [SHORTCUT_IDS.AI_ASSISTANT_CANCEL_EDIT]: {
  240. id: SHORTCUT_IDS.AI_ASSISTANT_CANCEL_EDIT,
  241. label: 'Cancel AI Assistant edit',
  242. sequence: ['Mod+Escape'],
  243. showInSettings: false,
  244. },
  245. [SHORTCUT_IDS.DATA_TABLE_TOGGLE_FILTERS]: {
  246. id: SHORTCUT_IDS.DATA_TABLE_TOGGLE_FILTERS,
  247. label: 'Toggle filter sidebar',
  248. sequence: ['Mod+B'],
  249. showInSettings: false,
  250. },
  251. [SHORTCUT_IDS.DATA_TABLE_RESET_FILTERS]: {
  252. id: SHORTCUT_IDS.DATA_TABLE_RESET_FILTERS,
  253. label: 'Reset filters',
  254. sequence: ['Mod+Escape'],
  255. showInSettings: false,
  256. },
  257. [SHORTCUT_IDS.DATA_TABLE_RESET_COLUMNS]: {
  258. id: SHORTCUT_IDS.DATA_TABLE_RESET_COLUMNS,
  259. label: 'Reset columns',
  260. sequence: ['Mod+U'],
  261. showInSettings: false,
  262. },
  263. [SHORTCUT_IDS.DATA_TABLE_TOGGLE_LIVE]: {
  264. id: SHORTCUT_IDS.DATA_TABLE_TOGGLE_LIVE,
  265. label: 'Toggle live mode',
  266. sequence: ['Mod+J'],
  267. showInSettings: false,
  268. },
  269. [SHORTCUT_IDS.ACTION_BAR_SAVE]: {
  270. id: SHORTCUT_IDS.ACTION_BAR_SAVE,
  271. label: 'Save form',
  272. sequence: ['Mod+Enter'],
  273. showInSettings: false,
  274. },
  275. [SHORTCUT_IDS.OPERATION_QUEUE_SAVE]: {
  276. id: SHORTCUT_IDS.OPERATION_QUEUE_SAVE,
  277. label: 'Save pending table edits',
  278. sequence: ['Mod+S'],
  279. showInSettings: false,
  280. },
  281. [SHORTCUT_IDS.OPERATION_QUEUE_TOGGLE]: {
  282. id: SHORTCUT_IDS.OPERATION_QUEUE_TOGGLE,
  283. label: 'Toggle operation queue panel',
  284. sequence: ['Mod+.'],
  285. showInSettings: false,
  286. },
  287. [SHORTCUT_IDS.OPERATION_QUEUE_UNDO]: {
  288. id: SHORTCUT_IDS.OPERATION_QUEUE_UNDO,
  289. label: 'Undo latest table edit',
  290. sequence: ['Mod+Z'],
  291. showInSettings: false,
  292. },
  293. [SHORTCUT_IDS.NAV_HOME]: {
  294. id: SHORTCUT_IDS.NAV_HOME,
  295. label: 'Go to Project Overview',
  296. sequence: ['G', 'H'],
  297. showInSettings: false,
  298. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  299. },
  300. [SHORTCUT_IDS.NAV_TABLE_EDITOR]: {
  301. id: SHORTCUT_IDS.NAV_TABLE_EDITOR,
  302. label: 'Go to Table Editor',
  303. sequence: ['G', 'T'],
  304. showInSettings: false,
  305. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  306. },
  307. [SHORTCUT_IDS.NAV_SQL_EDITOR]: {
  308. id: SHORTCUT_IDS.NAV_SQL_EDITOR,
  309. label: 'Go to SQL Editor',
  310. sequence: ['G', 'S'],
  311. showInSettings: false,
  312. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  313. },
  314. [SHORTCUT_IDS.NAV_DATABASE]: {
  315. id: SHORTCUT_IDS.NAV_DATABASE,
  316. label: 'Go to Database',
  317. sequence: ['G', 'D'],
  318. showInSettings: false,
  319. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  320. },
  321. [SHORTCUT_IDS.NAV_AUTH]: {
  322. id: SHORTCUT_IDS.NAV_AUTH,
  323. label: 'Go to Authentication',
  324. sequence: ['G', 'A'],
  325. showInSettings: false,
  326. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  327. },
  328. [SHORTCUT_IDS.NAV_STORAGE]: {
  329. id: SHORTCUT_IDS.NAV_STORAGE,
  330. label: 'Go to Storage',
  331. sequence: ['G', 'B'],
  332. showInSettings: false,
  333. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  334. },
  335. [SHORTCUT_IDS.NAV_FUNCTIONS]: {
  336. id: SHORTCUT_IDS.NAV_FUNCTIONS,
  337. label: 'Go to Edge Functions',
  338. sequence: ['G', 'F'],
  339. showInSettings: false,
  340. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  341. },
  342. [SHORTCUT_IDS.NAV_REALTIME]: {
  343. id: SHORTCUT_IDS.NAV_REALTIME,
  344. label: 'Go to Realtime',
  345. sequence: ['G', 'R'],
  346. showInSettings: false,
  347. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  348. },
  349. [SHORTCUT_IDS.NAV_ADVISORS]: {
  350. id: SHORTCUT_IDS.NAV_ADVISORS,
  351. label: 'Go to Advisors',
  352. sequence: ['G', 'V'],
  353. showInSettings: false,
  354. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  355. },
  356. [SHORTCUT_IDS.NAV_OBSERVABILITY]: {
  357. id: SHORTCUT_IDS.NAV_OBSERVABILITY,
  358. label: 'Go to Observability',
  359. sequence: ['G', 'U'],
  360. showInSettings: false,
  361. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  362. },
  363. [SHORTCUT_IDS.NAV_LOGS]: {
  364. id: SHORTCUT_IDS.NAV_LOGS,
  365. label: 'Go to Logs',
  366. sequence: ['G', 'L'],
  367. showInSettings: false,
  368. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  369. },
  370. [SHORTCUT_IDS.NAV_INTEGRATIONS]: {
  371. id: SHORTCUT_IDS.NAV_INTEGRATIONS,
  372. label: 'Go to Integrations',
  373. sequence: ['G', 'I'],
  374. showInSettings: false,
  375. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  376. },
  377. [SHORTCUT_IDS.NAV_SETTINGS]: {
  378. id: SHORTCUT_IDS.NAV_SETTINGS,
  379. label: 'Go to Project Settings',
  380. sequence: ['G', ','],
  381. showInSettings: false,
  382. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  383. },
  384. [SHORTCUT_IDS.NAV_ORG_PROJECTS]: {
  385. id: SHORTCUT_IDS.NAV_ORG_PROJECTS,
  386. label: 'Go to Projects',
  387. sequence: ['G', 'P'],
  388. showInSettings: false,
  389. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  390. },
  391. [SHORTCUT_IDS.NAV_ORG_TEAM]: {
  392. id: SHORTCUT_IDS.NAV_ORG_TEAM,
  393. label: 'Go to Team',
  394. sequence: ['G', 'M'],
  395. showInSettings: false,
  396. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  397. },
  398. [SHORTCUT_IDS.NAV_ORG_INTEGRATIONS]: {
  399. id: SHORTCUT_IDS.NAV_ORG_INTEGRATIONS,
  400. label: 'Go to Organization Integrations',
  401. sequence: ['G', 'I'],
  402. showInSettings: false,
  403. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  404. },
  405. [SHORTCUT_IDS.NAV_ORG_USAGE]: {
  406. id: SHORTCUT_IDS.NAV_ORG_USAGE,
  407. label: 'Go to Usage',
  408. sequence: ['G', 'U'],
  409. showInSettings: false,
  410. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  411. },
  412. [SHORTCUT_IDS.NAV_ORG_BILLING]: {
  413. id: SHORTCUT_IDS.NAV_ORG_BILLING,
  414. label: 'Go to Billing',
  415. sequence: ['G', 'B'],
  416. showInSettings: false,
  417. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  418. },
  419. [SHORTCUT_IDS.NAV_ORG_SETTINGS]: {
  420. id: SHORTCUT_IDS.NAV_ORG_SETTINGS,
  421. label: 'Go to Organization Settings',
  422. sequence: ['G', ','],
  423. showInSettings: false,
  424. referenceGroup: SHORTCUT_REFERENCE_GROUPS.NAVIGATION_GLOBAL,
  425. },
  426. [SHORTCUT_IDS.SHORTCUTS_OPEN_REFERENCE]: {
  427. id: SHORTCUT_IDS.SHORTCUTS_OPEN_REFERENCE,
  428. label: 'Show all keyboard shortcuts',
  429. // '?' isn't yet in @tanstack/hotkeys' PunctuationKey union (TanStack/hotkeys#19),
  430. // but matches correctly at runtime — event.key === '?' regardless of layout.
  431. // @ts-expect-error — remove this once upstream adds '?' to PunctuationKey.
  432. sequence: ['Shift+?'],
  433. showInSettings: false,
  434. options: { ignoreInputs: true },
  435. },
  436. [SHORTCUT_IDS.CONNECT_OPEN_SHEET]: {
  437. id: SHORTCUT_IDS.CONNECT_OPEN_SHEET,
  438. label: 'Open Connect sheet',
  439. sequence: ['O', 'C'],
  440. showInSettings: false,
  441. referenceGroup: SHORTCUT_REFERENCE_GROUPS.GLOBAL_ACTIONS,
  442. options: { ignoreInputs: true },
  443. },
  444. // Org settings sub-page navigation chord registration
  445. ...orgSettingsNavRegistry,
  446. // Org OAuth Apps page shortcut registration
  447. ...orgOAuthAppsRegistry,
  448. // Org Team page shortcut registration
  449. ...orgTeamRegistry,
  450. // Org Integrations page shortcut registration
  451. ...orgIntegrationsRegistry,
  452. // Org Projects page shortcut registration
  453. ...orgProjectsRegistry,
  454. // Org Private Apps page shortcut registration
  455. ...orgPrivateAppsRegistry,
  456. // Org Audit Logs page shortcut registration
  457. ...orgAuditLogsRegistry,
  458. // Table editor shortcut registration
  459. ...tableEditorRegistry,
  460. // Unified Logs page shortcut registration
  461. ...unifiedLogsRegistry,
  462. // SQL editor shortcut registration
  463. ...sqlEditorRegistry,
  464. // Schema visualizer shortcut registration
  465. ...schemaVisualizerRegistry,
  466. // Shared list-page shortcut registration
  467. ...listPageRegistry,
  468. // Database sub-page navigation chord registration
  469. ...databaseNavRegistry,
  470. // Auth users page shortcut registration
  471. ...authUsersRegistry,
  472. // Auth sub-page navigation chord registration
  473. ...authNavRegistry,
  474. // Storage sub-page navigation chord registration
  475. ...storageNavRegistry,
  476. // Storage Files (bucket list) page shortcut registration
  477. ...storageBucketsRegistry,
  478. // Storage Explorer (file browser) shortcut registration
  479. ...storageExplorerRegistry,
  480. // Edge Functions sub-page navigation chord registration
  481. ...functionsNavRegistry,
  482. // Edge Functions overview (list) page shortcut registration
  483. ...functionsListRegistry,
  484. // Per-function detail layout shortcut registration
  485. ...functionsDetailRegistry,
  486. // Per-function detail tab navigation registration
  487. ...functionsDetailNavRegistry,
  488. // Per-function Overview tab shortcut registration
  489. ...functionsOverviewRegistry,
  490. // Realtime sub-page navigation chord registration
  491. ...realtimeNavRegistry,
  492. // Realtime Inspector page shortcut registration
  493. ...realtimeInspectorRegistry,
  494. // Observability sub-page navigation chord registration
  495. ...observabilityNavRegistry,
  496. // Observability shared page-action shortcut registration
  497. ...observabilityPageRegistry,
  498. // Advisors sub-page navigation chord registration
  499. ...advisorsNavRegistry,
  500. // Advisors lint page shortcut registration
  501. ...advisorsPageRegistry,
  502. // LogsPreviewer shortcut registration
  503. ...logsPreviewRegistry,
  504. // Platform Webhooks page shortcut registration
  505. ...platformWebhooksRegistry,
  506. // Project Settings sub-page navigation and page action shortcut registration
  507. ...projectSettingsNavRegistry,
  508. ...apiKeysRegistry,
  509. ...jwtKeysRegistry,
  510. ...logDrainsRegistry,
  511. }