anomalyco / anomalyco/opencode

Directory picker shows only hidden directories when opened

Open Beginner friendly
#49,730 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Bug Description

When the web or serve interface is launched, the directory picker for adding a project only shows hidden directories (e.g. .github, .config) instead of all available folders.

Root Cause

In packages/app/src/components/directory-picker-domain.ts, when the directory picker opens with an empty query, it calls sdk.api.file.find() which uses the search index (built by ripgrep/fff). If find() returns any results (even hidden directories), the fallback to sdk.api.file.list() — which returns ALL real directories — is never triggered.

Fix

Skip the search index entirely when the query is empty and go directly to directories() which uses sdk.api.file.list() to show all actual directories in the current path.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/app/src/components/directory-picker-domain.ts and inspect the directory picker path used when it opens with an empty query. Ensure that case uses directories() and sdk.api.file.list() rather than the search index; done means the picker shows all real directories, including non-hidden folders, when launched.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.