Repository navigation
feat(pi-fff): expose enableHomeDirScanning / enableFsRootScanning (#588) - #589
Merged
Merged
Conversation
Pipe the two FileFinder.create opt-ins through pi flags and env vars so pi-fff can be used when launched from $HOME or /. Without these, FFF refuses to init and the extension is unusable from those directories. - --fff-enable-home-scan / FFF_ENABLE_HOME_SCAN - --fff-enable-root-scan / FFF_ENABLE_ROOT_SCAN Closes #588
| const env = process.env[envName]; | ||
| return env === "1" || env === "true"; | ||
| } | ||
| const enableHomeDirScanning = resolveBoolOpt( |
Owner
There was a problem hiding this comment.
@gustav-fff let's make the home search allowed by default, and expose the flag only for the fs root scanning.
Collaborator
Author
There was a problem hiding this comment.
[triage-bot] DIRECTED: pushed d1fac1a. Forced enableHomeDirScanning: true and removed the --fff-enable-home-scan flag / FFF_ENABLE_HOME_SCAN env. Only --fff-enable-root-scan (and FFF_ENABLE_ROOT_SCAN) remains as opt-in. README + tests updated; 19 pass / 0 fail.
Honk-Honk 🪿
Per maintainer feedback on PR #589: launching pi from $HOME is a normal flow; force enableHomeDirScanning=true and remove the --fff-enable-home-scan flag/env. Root scanning remains opt-in via --fff-enable-root-scan.
dmtrKovalenko
approved these changes
Jun 10, 2026
| delete process.env.FFF_ENABLE_ROOT_SCAN; | ||
| }); | ||
|
|
||
| describe("pi-fff scanning opt-in flags", () => { |
Collaborator
Author
There was a problem hiding this comment.
[triage-bot] DIRECTED: removed the scanning opt-in flags describe block in 8d2cb60. 17 pass / 0 fail.
Honk-Honk 🪿
wpenistone
pushed a commit
to wpenistone/fffork
that referenced
this pull request
Sep 28, 2026
…mtrKovalenko#589) * feat(pi-fff): expose enableHomeDirScanning / enableFsRootScanning (dmtrKovalenko#588) Pipe the two FileFinder.create opt-ins through pi flags and env vars so pi-fff can be used when launched from $HOME or /. Without these, FFF refuses to init and the extension is unusable from those directories. - --fff-enable-home-scan / FFF_ENABLE_HOME_SCAN - --fff-enable-root-scan / FFF_ENABLE_ROOT_SCAN Closes dmtrKovalenko#588 * feat(pi-fff): enable home dir scanning by default, drop opt-in flag Per maintainer feedback on PR dmtrKovalenko#589: launching pi from $HOME is a normal flow; force enableHomeDirScanning=true and remove the --fff-enable-home-scan flag/env. Root scanning remains opt-in via --fff-enable-root-scan. * test(pi-fff): drop scanning opt-in flag tests --------- Co-authored-by: gustav-fff <286169375+gustav-fff@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #588
Root cause
packages/pi-fff/src/index.ts:331callsFileFinder.create({ basePath: cwd, frecencyDbPath, historyDbPath, aiMode: true })and never forwardsenableHomeDirScanning/enableFsRootScanning. Both default tofalsein@ff-labs/fff-node(packages/fff-node/src/finder.ts:128-129), so launching pi from~or/makesFileFinder.createfail with the home/root guard error and the extension is unusable from those directories.Fix
Add two pi flags and matching env vars and pipe both booleans into
FileFinder.create:--fff-enable-home-scan/FFF_ENABLE_HOME_SCAN=1--fff-enable-root-scan/FFF_ENABLE_ROOT_SCAN=1Precedence matches the existing
fff-frecency-db/fff-history-dbpattern: flag > env > default (false). Off by default — opt-in only, same shape asfff-nodeitself.Steps to reproduce
Expected: pi loads,
fffind/ffgrepwork.Actual (pre-fix): notification
FFF init failed: Can not run certain FFF features in a file system root or home directories. Consider smaller per-project directories.Tools unusable.Post-fix:
fffind/ffgrepwork; without the opt-in, behavior is unchanged (still refuses to init in~or/).How verified
Added two unit tests asserting
FFF_ENABLE_HOME_SCAN=1andFFF_ENABLE_ROOT_SCAN=truepropagate astruetoFileFinder.create, and updated the existing session-start test to assert both fields default tofalse.Automated triage via Gustav. Honk-Honk 🪿