[PR #10364] feat(app): add open project button to directory dialog #13417

Open
opened 2026-02-16 18:18:16 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10364

State: open
Merged: No


Summary

This PR adds a feature to the "Open Project" dialog that allows users to explicitly open a directory path if it's not found in the search results.

image

Motivation

The current project search functionality has limitations where it only indexes files up to a specific nested level. This makes it impossible to find and open projects that are deeply nested or outside the scanned depth, effectively making them inaccessible via the UI search.

This change provides a fallback mechanism: if a user explicitly types a valid path (Unix or Windows style), they can open it directly even if the search indexer hasn't found it.

Changes

  • Adds logic to detect if the search query looks like a path (contains /, \ or starts with ~).
  • Displays an "Open [path]" button when no search results are found but a valid path is entered.
  • Updates List component to support custom empty messages.
  • Ensures the project is added to the sidebar when a new session is started.

Verification

  • Verified that typing a path like ~/Dev/my-project or C:\Dev\my-project displays an "Open" button when no results are found.
  • Verified that clicking the button opens the project.
  • Verified type safety with bun typecheck.

Partially fixes https://github.com/anomalyco/opencode/issues/7577
Partially fixes https://github.com/anomalyco/opencode/issues/7111

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10364 **State:** open **Merged:** No --- ## Summary This PR adds a feature to the "Open Project" dialog that allows users to explicitly open a directory path if it's not found in the search results. <img width="2864" height="1450" alt="image" src="https://github.com/user-attachments/assets/17c620f2-6f36-49a6-ad1a-d6f2375a755c" /> ## Motivation The current project search functionality has limitations where it only indexes files up to a specific nested level. This makes it impossible to find and open projects that are deeply nested or outside the scanned depth, effectively making them inaccessible via the UI search. This change provides a fallback mechanism: if a user explicitly types a valid path (Unix or Windows style), they can open it directly even if the search indexer hasn't found it. ## Changes - Adds logic to detect if the search query looks like a path (contains `/`, `\` or starts with `~`). - Displays an "Open [path]" button when no search results are found but a valid path is entered. - Updates `List` component to support custom empty messages. - Ensures the project is added to the sidebar when a new session is started. ## Verification - Verified that typing a path like `~/Dev/my-project` or `C:\Dev\my-project` displays an "Open" button when no results are found. - Verified that clicking the button opens the project. - Verified type safety with `bun typecheck`. Partially fixes https://github.com/anomalyco/opencode/issues/7577 Partially fixes https://github.com/anomalyco/opencode/issues/7111
yindo added the pull-request label 2026-02-16 18:18:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13417