Skip to content

fff file picker refuses to index home dir, breaking web UI project picker #37961

Closed as not planned

Description

@fifthsegment

Problem

The opencode web UI 'Open project' modal calls /find/file?directory=<home>&query=&type=directory to populate the project picker. fff (the file finder) refuses to initialize when the basePath is the user's home directory:

Failed to init file picker: Can not run certain FFF features in a file system root or home directories. Consider smaller per-project directories.

This means the project picker search returns [] and users cannot find/open projects that live under their home directory (the common case). The modal only shows 'Recent projects' (2 entries from the project table), not the full list of available projects.

Root cause

FileFinder.create() supports enableHomeDirScanning: true and enableFsRootScanning: true options (see dmtrKovalenko/fff#588), but opencode calls it with the defaults (false). There is no env var or config option to override this:

  • No OPENCODE_ENABLE_HOME_SCAN or similar env var
  • No config field in opencode.json for fff options
  • OPENCODE_DISABLE_FFF=1 falls back to a readdir-based finder, but it (a) returns an array of strings instead of objects (UI expects {path, type, score}), and (b) returns [] for empty queries, so the modal still shows nothing.

Environment

  • opencode 1.17.11 (Bun binary)
  • WSL2 Debian, WorkingDirectory=/home/abdullah/repos (symlink to /mnt/c/Repos)
  • Projects stored under ~/repos, which equals $HOME/repos

Proposed fix

Expose enableHomeDirScanning / enableFsRootScanning via:

  1. Env vars (e.g. OPENCODE_FFF_ENABLE_HOME_SCAN=1), or
  2. A config field in opencode.json (e.g. "fff": {"enableHomeDirScanning": true}), or
  3. Auto-enable when the service's WorkingDirectory is inside $HOME (common for web deployments).

Workaround

None that works cleanly. Setting HOME to a dummy dir breaks the /path endpoint's home field (UI searches the wrong directory). Setting HOME to the repos dir makes fff refuse (basePath == homedir).

Activity

  1. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

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

  2. EricZhou05 commented on Aug 11, 2026

    @EricZhou05

    Fixed in #41158.

  3. github-actions commented on Oct 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions