feat: Add project switching to Ctrl+P command palette #8366

Open
opened 2026-02-16 18:09:47 -05:00 by yindo · 4 comments
Owner

Originally created by @mguttmann on GitHub (Feb 2, 2026).

Originally assigned to: @thdxr on GitHub.

Summary

Add project names as searchable items in the Ctrl+P command palette, so users can quickly switch between projects by typing part of the name.

Motivation

Currently, Ctrl+P only searches commands and files within the current project. For users with many projects (10, 50, or even hundreds), there's no fast way to switch between them — you have to visually scan the sidebar icons, which only show a single initial letter.

This was requested by a community member who works with hundreds of open projects and finds the sidebar hard to navigate at that scale. Adding projects to the command palette gives a keyboard-driven way to find and switch projects instantly.

Proposed Behavior

  • Ctrl+P search results include project names alongside existing file/command results
  • The name shown is whatever is displayed in the sidebar (auto-generated from directory path, or custom renamed name)
  • Selecting a project switches to it (same as clicking it in the sidebar)
  • For users with only a few projects, this change is non-invasive — project entries simply appear in the list alongside everything else
  • For users with many projects, this becomes essential for fast navigation

Example

User types: "backend"
Results:
  📁 my-backend-api          (project)
  📄 backend/routes.ts       (file)
  📄 backend/config.ts       (file)

Context

Complements the dynamic sidebar sorting feature (#11758 / #11759) — sorting helps keep active projects visible, while this feature helps find any project instantly by name.

Inspired by PyCharm's Ctrl+Shift+O which provides an MRU project list with fuzzy filtering.

Originally created by @mguttmann on GitHub (Feb 2, 2026). Originally assigned to: @thdxr on GitHub. ## Summary Add project names as searchable items in the Ctrl+P command palette, so users can quickly switch between projects by typing part of the name. ## Motivation Currently, Ctrl+P only searches commands and files **within the current project**. For users with many projects (10, 50, or even hundreds), there's no fast way to switch between them — you have to visually scan the sidebar icons, which only show a single initial letter. This was requested by a community member who works with hundreds of open projects and finds the sidebar hard to navigate at that scale. Adding projects to the command palette gives a keyboard-driven way to find and switch projects instantly. ## Proposed Behavior - Ctrl+P search results include **project names** alongside existing file/command results - The name shown is whatever is displayed in the sidebar (auto-generated from directory path, or custom renamed name) - Selecting a project switches to it (same as clicking it in the sidebar) - For users with only a few projects, this change is non-invasive — project entries simply appear in the list alongside everything else - For users with many projects, this becomes essential for fast navigation ## Example ``` User types: "backend" Results: 📁 my-backend-api (project) 📄 backend/routes.ts (file) 📄 backend/config.ts (file) ``` ## Context Complements the dynamic sidebar sorting feature (#11758 / #11759) — sorting helps keep active projects visible, while this feature helps find any project instantly by name. Inspired by PyCharm's Ctrl+Shift+O which provides an MRU project list with fuzzy filtering.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 2, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11837: feat(desktop): Add keyboard shortcuts to switch projects (Cmd+1, Cmd+2, etc.)
  • #9600: Add number shortcuts to switch projects in desktop app
  • #9088: Sidebar project list does not scale for large project counts

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 2, 2026): This issue might be a duplicate of existing issues. Please check: - #11837: feat(desktop): Add keyboard shortcuts to switch projects (Cmd+1, Cmd+2, etc.) - #9600: Add number shortcuts to switch projects in desktop app - #9088: Sidebar project list does not scale for large project counts Feel free to ignore if none of these address your specific case.
Author
Owner

@mguttmann commented on GitHub (Feb 2, 2026):

Image
@mguttmann commented on GitHub (Feb 2, 2026): <img width="616" height="469" alt="Image" src="https://github.com/user-attachments/assets/acdc0670-cc83-4b45-810c-2355280f1800" />
Author
Owner

@mguttmann commented on GitHub (Feb 2, 2026):

Thanks for flagging the potential duplicates, bot — but these are actually different use cases:

  • #11837 / #9600 are about Cmd+1-9 keyboard shortcuts to switch between projects by position. That's useful for a small, fixed set of projects but doesn't help when you have dozens or hundreds.
  • #9088 is about the sidebar UX not scaling for large project counts (single-letter icons being ambiguous). Valid problem, but about the sidebar display — not about search.

This issue is specifically about fuzzy search in the Cmd+P command palette — type a few characters of a project or session name and jump directly to it. That's the approach that actually scales to hundreds of projects.

Already implemented in PR #11855 — projects and sessions now show up as searchable entries alongside commands and files.

That said, #11855 would also partially address #9088's pain point since users can now quickly find any project by name instead of relying on sidebar icons.

@mguttmann commented on GitHub (Feb 2, 2026): Thanks for flagging the potential duplicates, bot — but these are actually different use cases: - **#11837 / #9600** are about **Cmd+1-9 keyboard shortcuts** to switch between projects by position. That's useful for a small, fixed set of projects but doesn't help when you have dozens or hundreds. - **#9088** is about the **sidebar UX not scaling** for large project counts (single-letter icons being ambiguous). Valid problem, but about the sidebar display — not about search. This issue is specifically about **fuzzy search** in the Cmd+P command palette — type a few characters of a project or session name and jump directly to it. That's the approach that actually scales to hundreds of projects. Already implemented in PR #11855 — projects and sessions now show up as searchable entries alongside commands and files. That said, #11855 would also partially address #9088's pain point since users can now quickly find any project by name instead of relying on sidebar icons.
Author
Owner

@mguttmann commented on GitHub (Feb 3, 2026):

Image
@mguttmann commented on GitHub (Feb 3, 2026): <img width="941" height="594" alt="Image" src="https://github.com/user-attachments/assets/ff383773-ed87-4990-a9c9-87f7517bc570" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8366