Title: Surface recently-used commands in the Command Palette (⌘K) by DragonnZhang · Pull Request #57 · modelstudioai/openwork · GitHub
Open Graph Title: Surface recently-used commands in the Command Palette (⌘K) by DragonnZhang · Pull Request #57 · modelstudioai/openwork
X Title: Surface recently-used commands in the Command Palette (⌘K) by DragonnZhang · Pull Request #57 · modelstudioai/openwork
Description: Closes #56 What & why OpenWork's command palette (⌘K / Ctrl+K, shipped in #42) lists every registered action grouped by category but keeps no memory of what you run — you re-search even for the command you ran seconds ago. Every mature palette (VS Code ⌘⇧P, Raycast, Linear ⌘K, Claude Code Desktop's command menu) pins a "Recently used" section to the top so your frequent actions are one keystroke away. This adds it. Changes Persisted recents (apps/electron/src/renderer/components/command-palette-recents.ts): a small module storing the most-recently-run action IDs in the renderer's localStorage (newest first, de-duplicated, capped at 6) via the shared lib/local-storage.ts helper (one new key, command-palette-recents). The ordering (pushRecent: dedupe → prepend → cap) is a pure function. Palette integration (CommandPalette.tsx): record each action run from the palette; render a "Recently used" CommandGroup above the categories only when the query is empty, and hide it while searching so cmdk's relevance filtering takes over. Recents are filtered to actions that still exist, aren't excluded, and can run right now (canExecute) — never a stale or dead row. i18n: one new key commands.recent added to all 7 locales. Tests: command-palette-recents.test.ts (pure pushRecent: dedupe, move-to-front, cap, immutability) + e2e/assertions/command-palette-recents.assert.ts. Frontend-only — no qwen-code backend change, no new IPC, no main-process change. Verification bun run typecheck:all — zero delta vs main (identical error hash/count; the 11 pre-existing apps/electron errors are unrelated to this change; packages/shared and packages/ui are clean). bun test — zero delta vs main (56 pre-existing baseline failures on both main and this branch, 0 new); the new pushRecent unit suite is 6/6 pass. bun run electron:build:renderer — ✅ builds cleanly (the renderer bundle contains the palette change). CDP assertion could not run in this environment (same block as prior loop rounds): the sandbox's egress policy prevents fetching the Electron binary and the libsignal GitHub dependency (WhatsApp worker), so electron:build:main and app launch fail here. The assertion is written and self-contained for CI / reviewer validation. What the CDP assertion checks (command-palette-recents.assert.ts) Drives the real built app over CDP in the draft (no-session) state; the palette reads recents fresh from localStorage on each open: Seed localStorage['craft-command-palette-recents'] = ['app.toggleTheme'], open the palette → a "Recently used" group renders exactly one row (Toggle Theme), above the first category row. Type sidebar → the recents group hides (0 recent rows) while filtering still surfaces a Toggle Sidebar match; clearing the query brings recents back. Run a new, not-yet-recent action (Toggle Sidebar) from the palette, then reopen → the recents group now has two rows with Toggle Sidebar first, Toggle Theme second — proving the palette persists what you run and orders newest-first. Generated by Claude Code
Open Graph Description: Closes #56 What & why OpenWork's command palette (⌘K / Ctrl+K, shipped in #42) lists every registered action grouped by category but keeps no memory of what you run — you re-search even for...
X Description: Closes #56 What & why OpenWork's command palette (⌘K / Ctrl+K, shipped in #42) lists every registered action grouped by category but keeps no memory of what you run — you re-search ...
Opengraph URL: https://github.com/modelstudioai/openwork/pull/57
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:38c79e51-38fb-7945-a1e2-cc8b8d100b3f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D9C0:14F0B0:2D687B6:3DD263D:6A53D4D8 |
| html-safe-nonce | 6c9ac62aed746ba45d90203a7f4a4402f0341c81f40a95bf7881a85e7733307a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUMwOjE0RjBCMDoyRDY4N0I2OjNERDI2M0Q6NkE1M0Q0RDgiLCJ2aXNpdG9yX2lkIjoiMTgwNTY2NjM5NjkwNDA4NDY5NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9adc876b406518295c9980e388c74258e4ce593051299d316a9c0a4d65517dfc |
| hovercard-subject-tag | pull_request:3992330836 |
| 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/57/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 #56 What & why OpenWork's command palette (⌘K / Ctrl+K, shipped in #42) lists every registered action grouped by category but keeps no memory of what you run — you re-search even for... |
| 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