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:
@@ -37,6 +37,7 @@ export const DEFAULT_GLOBAL_SETTINGS = {
|
||||
favoriteModels: undefined,
|
||||
openrouterModelSync: true,
|
||||
updateCheckEnabled: true,
|
||||
fnBinaryCheckEnabled: true,
|
||||
updateCheckFrequency: "daily",
|
||||
showGitHubStarButton: true,
|
||||
modelOnboardingComplete: undefined,
|
||||
|
||||
@@ -1319,6 +1319,13 @@ export interface GlobalSettings {
|
||||
* shows update notices in the CLI and dashboard. The actual cadence is
|
||||
* governed by `updateCheckFrequency`. Disabled = no automatic checks at all. */
|
||||
updateCheckEnabled?: boolean;
|
||||
/** When true (default), the dashboard probes PATH for a globally-installed
|
||||
* `fn`/`fusion` CLI binary so it can advertise install/upgrade actions in
|
||||
* the UI. The probe spawns `<bin> --version`, which executes whichever
|
||||
* `runfusion.ai` is on PATH. Set to false to skip the probe entirely —
|
||||
* useful when the local dev process is the source of truth and shelling
|
||||
* out to an outdated globally-installed binary is unwanted. */
|
||||
fnBinaryCheckEnabled?: boolean;
|
||||
/** When false, hides the "Star on GitHub" button in the Settings modal
|
||||
* header. Defaults to true (visible). The button is also hidden once the
|
||||
* user has clicked it (tracked client-side in localStorage). */
|
||||
|
||||
Reference in New Issue
Block a user