Title: Add a global command palette (⌘K / Ctrl+K) by DragonnZhang · Pull Request #42 · modelstudioai/openwork · GitHub
Open Graph Title: Add a global command palette (⌘K / Ctrl+K) by DragonnZhang · Pull Request #42 · modelstudioai/openwork
X Title: Add a global command palette (⌘K / Ctrl+K) by DragonnZhang · Pull Request #42 · modelstudioai/openwork
Description: Closes #41 What & why Every comparable desktop app ships a command palette — a keyboard-driven overlay to search for and run any command (⌘K in Claude Code Desktop / Linear, ⌘⇧P in VS Code / Codex desktop). OpenWork already had all the pieces — a centralized action registry with an execute(actionId) method, the cmdk command primitives, and translated action labels — but they were only surfaced in read-only reference views (the Keyboard Shortcuts dialog and the Settings → Shortcuts page). There was no way to run an action by searching for it. This adds a global command palette opened with ⌘K / Ctrl+K (and from the app menu). It: lists every registry action, grouped by category, with its hotkey on the right, filters as you type (cmdk's built-in fuzzy match over the translated label), shows a “No results found” empty state, on select, closes and calls the registry's execute() — so the action runs exactly as if its hotkey were pressed, closes on Esc / selection, integrated with the existing modal stack. Frontend-only. No backend / qwen-code change. No new i18n keys — the input placeholder reuses commands.searchCommands, the empty state reuses common.noResultsFound, labels reuse shortcuts.action.*, and group headings reuse shortcuts.category.*. Changes actions/definitions.ts — new app.commandPalette action (mod+k). components/CommandPalette.tsx — the palette. Self-contained: it registers its own open handler, owns its open state, and joins the modal stack for layered close. Mounted once in App.tsx (inside the action + modal providers). actions/action-i18n.ts — extracted the action-ID → i18n-key map (ACTION_LABEL_KEYS) plus a category-key helper into a shared module, and reuse it from Settings → Shortcuts (pages/settings/ShortcutsPage.tsx) so the two surfaces can't drift. components/AppMenu.tsx — a “Command Palette” entry for discoverability. e2e/assertions/command-palette.assert.ts — new CDP assertion (below). e2e/app.ts — give each launched app instance its own profile dir keyed on the unique debug port. Electron's single-instance lock is keyed on userData, so a shared dir made a second assertion's launch defer to the first instance and never get its own renderer target. Per-port dirs let multiple assertions run in one bun run e2e. Verification (DoD) Feature CDP assertion — ✅, and the full e2e suite is green (2/2): 🧪 Running 2 e2e assertion(s) • app boots and main window renders ... ✅ (3764ms) • command palette opens, filters, and runs an action ... ✅ (3639ms) ✅ 2/2 passed The command-palette assertion drives the real built app over CDP through the whole path: presses Ctrl/Cmd+K and asserts the palette opens with more than one action row; types theme and asserts the list narrows (every visible row contains the query, count shrinks) with Toggle Theme surviving; types a no-match query and asserts the empty state with zero rows; clears and asserts the full list is restored; then selects Toggle Theme and asserts the palette closes and the app theme actually flips (documentElement dark⇄light) — proving the palette executes the action, not merely displays it. bun run typecheck:all — introduces no new errors. packages/{core, shared, server-core, server, session-tools-core, ui} all pass; the only errors are 11 pre-existing ones in apps/electron unrelated to this change (auto-update.ts, a settings-default-thinking test tuple, and two test files importing vitest, which is in no package.json). None are in the files this PR touches. bun test — the failing set is byte-for-byte identical to main (56 pre-existing failures: BrowserCDP, BrowserPaneManager, i18n locale-parity sorted checks, startWebuiHttpServer, resource-bundle, etc.). This change adds zero new failures. Electron build — ✅. App boots — ✅ (app boots assertion). Part of the autonomous desktop-feature loop (loop-bot). Generated by Claude Code
Open Graph Description: Closes #41 What & why Every comparable desktop app ships a command palette — a keyboard-driven overlay to search for and run any command (⌘K in Claude Code Desktop / Linear, ⌘⇧P in VS Code / Co...
X Description: Closes #41 What & why Every comparable desktop app ships a command palette — a keyboard-driven overlay to search for and run any command (⌘K in Claude Code Desktop / Linear, ⌘⇧P in VS Code ...
Opengraph URL: https://github.com/modelstudioai/openwork/pull/42
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5b621786-2af4-2220-b6b7-159f119f6c35 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A5E0:FAECF:18D8758:20EBB0E:6A52C571 |
| html-safe-nonce | debcc6521596513e5f98b89d5870215febabd3000b12e0d7f0d83452c519e5b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUUwOkZBRUNGOjE4RDg3NTg6MjBFQkIwRTo2QTUyQzU3MSIsInZpc2l0b3JfaWQiOiIzODE4MzI1Mzk1MDc1NDE3NDU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f07acc74561937ed195fd5e7914d2aa0f1ccf4376153bf314ea5c57cf13cd0dc |
| hovercard-subject-tag | pull_request:3967407392 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelstudioai/openwork/pull/42/files |
| twitter:image | https://avatars.githubusercontent.com/u/52599892?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/52599892?s=400&v=4 |
| og:image:alt | Closes #41 What & why Every comparable desktop app ships a command palette — a keyboard-driven overlay to search for and run any command (⌘K in Claude Code Desktop / Linear, ⌘⇧P in VS Code / Co... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelstudioai/openwork git https://github.com/modelstudioai/openwork.git |
| octolytics-dimension-user_id | 283556804 |
| octolytics-dimension-user_login | modelstudioai |
| octolytics-dimension-repository_id | 1256697754 |
| octolytics-dimension-repository_nwo | modelstudioai/openwork |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1256697754 |
| octolytics-dimension-repository_network_root_nwo | modelstudioai/openwork |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width