feat(FN-XXXX): add fnBinaryCheckEnabled global setting

Defaults to true so existing behaviour (dashboard probes PATH for `fn` /
`fusion` and surfaces install / version-mismatch states) is unchanged.
When the user toggles it off in Settings → General → CLI Binary:

- `GET /system/fn-binary/status` short-circuits before `detectFnBinary()`
  and returns `state: "skipped"`. No `<bin> --version` subprocess is
  spawned at all, so an outdated globally-installed CLI cannot run as a
  side effect of opening the dashboard.
- The install banner is hidden when `state` is `"skipped"`.
- `POST /system/fn-binary/install` rejects with HTTP 409 since install
  is the user action that the status check informs.
- The Settings UI gains a checkbox under the existing CLI binary panel.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-01 22:53:22 -07:00
parent 5a41ce42e9
commit 24b3ded03f
8 changed files with 92 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Add a global `fnBinaryCheckEnabled` setting that lets users opt out of the dashboard's `fn`/`fusion` CLI binary probe. Default remains true (probe runs as before). When set to false, `GET /system/fn-binary/status` returns `state: "skipped"` without spawning a subprocess, the install banner stays hidden, and `POST /system/fn-binary/install` rejects with HTTP 409. Useful when the running dev process is the source of truth and shelling out to whichever globally-installed `runfusion.ai` happens to be on PATH is unwanted.