feat(app): add project search to command palette#11855
feat(app): add project search to command palette#11855mguttmann wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
c1d1fea to
481624b
Compare
|
seems good, the only concern i would have is the clutterness of the command pallete. with this, it would become less focused as we are now searching for everything, while the original goal of pallette is actions for current project (hence the placeholder 'search for commands and files') |
perhaps limiting sessions/projects to say max 5 would address this. i do not see limiting in your description nor in the code. for ex. say you have 10 projects that have 'opencode' in the name or 10 sessions that have 'opencode' in the name, the pallete would only show 5 at most for each type when searching 'opencode' |
|
Thanks for the feedback @alexyaroshuk! I appreciate the concern about clutter. However, I'd push back a bit on a hard limit of 5 per category — the main question would be: which 5? How do we rank them?
The core problem a limit creates: if what you're looking for is result #7 or #11, you simply can't find it. That defeats the purpose of having search in the first place — especially for users like the one in #9088 who has 200+ projects and needs exactly this kind of unrestricted search to navigate efficiently. The palette already handles this well IMO — results are grouped by category, so it's visually clear what's what, and if your query is specific enough (2-3 characters), you'll typically see only a handful of matches anyway. The "clutter" only appears with very short/generic queries, where showing more results is actually helpful. That said, I'm open to discussing this further — what do you think about keeping it unlimited but maybe deprioritizing projects/sessions so they appear below commands and files in the result list? That way the "current project" focus stays intact while still allowing full search. |
good points, maybe one way is to have an option for this in the settings. show/hide prohjects / settings in cmd pallete. That way, user can customize. |
|
Hey, I really like the settings toggle idea — it's a great compromise that gives users full control without forcing a one-size-fits-all approach. I've implemented it: there are now two toggles in Settings → General → Desktop:
Both default to enabled, so the feature works out of the box for users who want it. But anyone who prefers a more focused palette can simply disable one or both — no clutter, no forced limit. I also fixed the group ordering so that Projects always appear above Sessions in the results (before, fuzzysort could reorder groups based on match quality, which was confusing). The fixed order is now: Projects → Sessions → Commands → Files. This way everyone gets exactly the palette experience they want. Let me know what you think! |
b0872f2 to
2ecb7aa
Compare
|
I don’t like the hard limit of 5. Either a category is visible or it isn’t. Projects names are short, most users have only a handful, and they won’t hit any limit anyway. The users who do have many projects are exactly the ones who want to see all of them. Sessions are different. They tend to be more numerous, have longer names, and could generate clutter more easily. The Ctrl+P palette in OpenCode reminds me of PyCharm’s Search Everywhere feature (invoked with Double Shift). In PyCharm this is a single unified palette that:
PyCharm also exposes the same palette through dedicated shortcuts that open it with a specific category already selected:
OpenCode could follow the same principle: show everything by default, let users filter by category, and optionally allow shortcuts that open the same palette with a category pre-selected. |
|
Thanks for the thoughtful comparison with PyCharm's Search Everywhere, @stenci — really good points. Fully agree on the no-hard-limit approach. That's exactly what we went with: two settings toggles (show projects / show sessions in the palette), both enabled by default. Either a category is visible or it isn't, no arbitrary cutoff. The category filter tabs and dedicated shortcuts per category are interesting ideas. Technically not hard to add, but I'd want to be careful about overloading the palette — right now it's clean and fast, and I'd hate to clutter it with extra UI chrome that most users won't need. The settings toggles already cover the "I don't want to see X" use case without adding visual noise. That said, if more people feel strongly about inline category filters or per-category shortcuts, I'm open to revisiting it. For now I'd rather keep it focused and iterate based on feedback. |
|
Thanks for the detailed writeup and the mockups, @stenci — really appreciate the effort! I think you nailed it with your summary: this PR is about adding two new result types to the existing palette, not redesigning it. The current grouped approach with optional settings toggles works well for that scope. The PyCharm-style intermixed results with category filters is an interesting direction for the future. I personally don't use PyCharm, so I can't speak to how it feels in practice, but I can see the appeal of "best match always on top regardless of category." That said, I'm honestly pretty happy with how the current solution works — the fixed group ordering (Projects → Sessions → Commands → Files) keeps things predictable, and the settings toggles give users full control. If there's demand for a more advanced palette in the future, that would make a great standalone PR. For now I think we're in a good place here. |
|
I have noticed that last release does include sessions in the palette. |
2ecb7aa to
f98e8d3
Compare
|
Good eye! Yes, session search was added upstream in the latest release — this PR originally included both project and session search. I've rebased and narrowed the scope: this PR now only adds project search, which is still missing from So no duplication — this PR is complementary to what's already in dev. 🙂 Regarding your intermixed-results idea — I agree that would be the ideal long-term UX. For now this follows the existing grouped pattern to keep the diff minimal, but that's a great evolution path for the palette overall. |
72f605c to
0d81e95
Compare
Adds project search to Cmd+P palette (sessions were already added upstream). Projects appear above other categories when searching. Includes a settings toggle to enable/disable project search. i18n: all 15 languages with native translations.
0d81e95 to
78e6b27
Compare





Summary
Extends the Cmd+P / Ctrl+P command palette to include project search alongside the existing commands, files, and sessions.
Closes #11843
What changed
palette.group.projectsadded to all 15 language files with native translations.palette.projects(default:true) to toggle project visibility in the palette.Files changed
packages/app/src/components/dialog-select-file.tsx— AddedprojectItem,projectList,projectLookup,projectsmemo, project handling inhandleSelect, project Avatar renderingpackages/app/src/components/settings-general.tsx— Added toggle UI for "Show projects in command palette"packages/app/src/context/settings.tsx— Addedpalette.projectssetting (boolean, defaulttrue)packages/app/src/i18n/*.tsfiles — Addedpalette.group.projects,settings.palette.projects,settings.palette.projects.descriptionImplementation notes
layout.projects.list()(reactive)server.projects.touch()is called before project navigation to update last-used trackingdev