anomalyco / anomalyco/opencode
Directory picker shows only hidden directories when opened
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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