FN-7261: add global modal dismissal setting
Add a global dashboard preference that keeps modal backdrop dismissal off by default while allowing operators to opt in. - Add dismissModalsOnOutsideClick to global settings defaults, schema, docs, and save handling. - Provide the modal dismissal preference through App and gate shared overlay mouse/touch dismissal on it. - Expose the preference in Global General settings and update modal dismissal tests. - Add a changeset for the published CLI package. Files changed: .changeset/fn-7261-global-modal-outside-dismiss.md | 7 ++++ docs/settings-reference.md | 1 + .../core/src/__tests__/settings-defaults.test.ts | 9 +++++ packages/core/src/settings-schema.ts | 5 +++ packages/core/src/types.ts | 5 +++ packages/dashboard/app/App.tsx | 16 +++++---- .../app/components/AgentErrorDetailsModal.tsx | 4 ++- .../__tests__/AgentErrorDetailsModal.test.tsx | 28 +++++++++++++++- .../__tests__/SettingsModal.general.test.tsx | 23 ++++++++++++- .../app/components/settings/save-split.ts | 1 + .../settings/sections/GlobalGeneralSection.tsx | 5 +++ .../app/hooks/__tests__/useOverlayDismiss.test.tsx | 38 ++++++++++++++++++---- packages/dashboard/app/hooks/useAppSettings.ts | 5 +++ packages/dashboard/app/hooks/useOverlayDismiss.ts | 36 +++++++++++++++++--- 14 files changed, 163 insertions(+), 20 deletions(-) Fusion-Task-Id: FN-7261 Fusion-Task-Lineage: 4fd5195f-c759-46b4-b567-0d5a9d5b92e3 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -52,6 +52,7 @@ Defaults from `DEFAULT_GLOBAL_SETTINGS`; key scope from `GLOBAL_SETTINGS_KEYS`.
|
||||
| `shadcnCustomColors` | `Record<string, string>` | `undefined` | Optional shadcn design-token override map for `"shadcn-custom"` only. Keys are CSS token names such as `--accent`, `--bg`, `--surface`, `--card`, `--border`, `--text`, `--text-muted`, workflow status tokens, and `--color-success`/`--color-warning`/`--color-error`; values must be sanitized `#RGB` or `#RRGGBB` hex colors. Missing or invalid entries fall back to the `shadcn-custom` base defaults and are not applied to other themes. |
|
||||
| `language` | `"en" \| "zh-CN" \| "zh-TW" \| "fr" \| "es" \| "ko"` | `undefined` | UI language for the dashboard and TUI. When unset, the dashboard detects from localStorage → browser language and the CLI from `--lang` flag → environment locale, falling back to `en`. Validated at the store write boundary (`validateLocale`); invalid values are dropped. Reset to auto-detect via the dashboard's "Auto" language option or `fn settings set language auto` (clears the persisted key). |
|
||||
| `dashboardFontScalePct` | `number` | `100` | Dashboard font scale percentage used by Appearance settings. Valid range: `85` to `125`; applied pre-hydration via document root font-size so board typography (column headers/counts, task cards, and quick-entry text) scales with the setting from first paint. |
|
||||
| `dismissModalsOnOutsideClick` | `boolean` | `false` | Global dashboard preference for closing fixed modal overlays by clicking/tapping the backdrop. Off by default to prevent accidental modal dismissal; explicit close, cancel, and Escape paths remain available. |
|
||||
| `defaultProvider` | `string` | `undefined` | Default AI provider. |
|
||||
| `defaultModelId` | `string` | `undefined` | Default AI model ID. |
|
||||
| `modelPricingOverrides` | `Record<string, ModelPricing>` | `undefined` | Optional global Command Center pricing overrides keyed by lowercased `provider:model` or bare `:model`. Values store USD per 1M input, output, cache-read, and cache-write tokens plus optional `source`; they override the built-in pricing table for cost estimates only and are editable from Settings → Global Models → View pricing table. |
|
||||
|
||||
Reference in New Issue
Block a user