Files
fusion/packages/dashboard/app/components/settings/sections/GlobalGeneralSection.search.ts
gsxdsm d4d13e2fa5 FN-9111: Add global Quick Add Enter-save preference
Add an operator-level setting that controls whether plain Enter saves a Quick Add task while preserving Cmd/Ctrl+Enter submission.

- add the global quickAddSubmitOnEnter setting, defaults, settings UI, and app context
- update Quick Add keyboard handling with multiline and duplicate/in-flight safeguards
- add focused settings and keyboard regression coverage, localization, documentation, and a release changeset

Files changed:
 .changeset/fn-9111-quick-add-enter.md              |   7 ++
 docs/dashboard-guide.md                            |   2 +
 docs/settings-reference.md                         |   1 +
 .../core/src/__tests__/settings-defaults.test.ts   |  10 ++
 packages/core/src/config/settings-schema.ts        |   5 +
 packages/core/src/types/settings/settings-scope.ts |   5 +
 packages/dashboard/app/App.tsx                     |   4 +
 .../dashboard/app/components/QuickEntryBox.tsx     |  24 ++++-
 .../QuickEntryBox.submit-on-enter.test.tsx         | 118 +++++++++++++++++++++
 .../__tests__/SettingsModal.general.test.tsx       |  18 ++++
 .../app/components/settings/save-split.ts          |   1 +
 .../sections/GlobalGeneralSection.search.ts        |   9 ++
 .../settings/sections/GlobalGeneralSection.tsx     |  10 ++
 .../settings-default-descriptions.test.tsx         |   1 +
 .../__tests__/useQuickAddSubmitOnEnter.test.tsx    |  24 +++++
 packages/dashboard/app/hooks/useAppSettings.ts     |   4 +
 .../app/hooks/useQuickAddSubmitOnEnter.ts          |  21 ++++
 packages/i18n/locales/en/app.json                  |   2 +
 packages/i18n/locales/es/app.json                  |   4 +-
 packages/i18n/locales/fr/app.json                  |   4 +-
 packages/i18n/locales/ko/app.json                  |   4 +-
 packages/i18n/locales/pt-BR/app.json               |   4 +-
 packages/i18n/locales/zh-CN/app.json               |   4 +-
 packages/i18n/locales/zh-TW/app.json               |   4 +-
 packages/i18n/src/resources.d.ts                   |   4 +-
 25 files changed, 284 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-9111

Fusion-Task-Lineage: 246153a8-5127-48df-838c-d9b60920cd91

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 21:24:25 -07:00

127 lines
7.2 KiB
TypeScript

/**
* Search entries for the Global General section.
*
* FNXC:SettingsSearch 2026-07-15-17:35:
* One entry per descriptor row the section renders, co-located so a setting and its index entry change in the same edit. Labels and help mirror the section's `t()` calls verbatim: the index matches on the copy operators actually read, so a paraphrase here would make search miss the words on screen.
* The section's bespoke rows are deliberately absent — CliBinaryPanel, the thinking-log pair, the `fn` binary check, and the update-check toggle are not descriptor rows, so they carry no `data-settings-key` anchor for a result to scroll to.
*
* FNXC:SettingsSearch 2026-07-15-20:30:
* The global GitLab rows and the global tracking-repo select moved to SourceControlGlobalSection.search.ts with their controls; neither was indexed from here before (both were bespoke), so this is a move of the section's contents, not of its entries.
*/
import type { SettingsSearchEntry } from "../search/types";
export const globalGeneralSearchEntries: SettingsSearchEntry[] = [
{
sectionId: "global-general",
key: "dismissModalsOnOutsideClick",
labelKey: "settings.globalGeneral.dismissModalsByClickingOutside",
labelFallback: " Dismiss modals by clicking outside ",
helpKey: "settings.globalGeneral.dismissModalsByClickingOutsideHint",
helpFallback:
" When enabled, clicking or tapping a modal backdrop closes the modal. Default: disabled, to prevent accidental dismissal. ",
keywords: ["dialog", "backdrop", "accidental close"],
},
{
sectionId: "global-general",
key: "skipConfirmationDialogs",
labelKey: "settings.globalGeneral.skipConfirmationDialogs",
labelFallback: " Skip confirmation dialogs for critical actions ",
helpKey: "settings.globalGeneral.skipConfirmationDialogsHint",
helpFallback:
" When enabled, destructive actions such as deleting a task or resetting progress run immediately without a prompt. Default: disabled",
keywords: ["confirm", "critical action", "delete", "reset", "destructive"],
},
{
sectionId: "global-general",
key: "quickAddSubmitOnEnter",
labelKey: "settings.globalGeneral.quickAddSubmitOnEnter",
labelFallback: " Press Enter to save a task in Quick Add ",
helpKey: "settings.globalGeneral.quickAddSubmitOnEnterHint",
helpFallback: " Default: enabled. When disabled, Enter inserts a newline and Cmd/Ctrl+Enter saves. ",
keywords: ["enter", "keyboard", "quick add", "newline", "submit"],
},
{
sectionId: "global-general",
key: "persistAgentToolOutput",
labelKey: "settings.globalGeneral.saveToolOutputInAgentLogs",
labelFallback: " Save tool output in agent logs ",
helpKey: "settings.globalGeneral.whenDisabledToolRowsAreStillLoggedBut",
helpFallback:
" When disabled, tool rows are still logged but detailed tool payloads are omitted. Very large tool payloads may still be clipped even when this stays enabled. Default: disabled. ",
keywords: ["persist", "transcript", "disk usage"],
},
{
sectionId: "global-general",
key: "agentToolOutputMaxChars",
labelKey: "settings.globalGeneral.agentToolOutputLimit",
labelFallback: " Agent tool-output limit ",
helpKey: "settings.globalGeneral.agentToolOutputLimitHint",
helpFallback:
" Maximum characters returned from each engine-injected tool result. When unset, inherits the 16,000-character engine default. Leave empty to use the default. ",
keywords: ["tokens", "context", "truncate", "tool output", "agent"],
},
{
sectionId: "global-general",
key: "agentToolOutputMaxCharsNoLimit",
labelKey: "settings.globalGeneral.noLimitOnAgentToolOutput",
labelFallback: " No limit on agent tool output ",
helpKey: "settings.globalGeneral.noLimitOnAgentToolOutputHint",
helpFallback:
" Disable the shared tool-output clamp. A single tool result can consume the agent context window. Default: disabled; when unset, the budget inherits the 16,000-character engine default. ",
keywords: ["unlimited", "tokens", "context", "truncate", "tool output"],
},
{
sectionId: "global-general",
key: "proactiveTaskChatEnabled",
labelKey: "settings.globalGeneral.enableProactiveTaskChat",
labelFallback: " Enable proactive task-chat updates ",
helpKey: "settings.globalGeneral.enableProactiveTaskChatHint",
helpFallback: " When enabled, Task chat reports step progress, failures, reviews, and rollbacks in real time. Default: disabled. ",
keywords: ["task chat", "progress", "status", "rollback", "failure"],
},
{
sectionId: "global-general",
key: "updateCheckFrequency",
labelKey: "settings.globalGeneral.frequency",
labelFallback: "Frequency",
helpKey: "settings.globalGeneral.controlsHowOftenTheDashboardReFetchesThe",
helpFallback:
" Controls how often the dashboard re-fetches the npm registry. Use the version + refresh control in the header to trigger an immediate check at any time. Default: daily. ",
/*
FNXC:SettingsSearch 2026-07-15-17:35:
The label is the bare word "Frequency" — it only reads as the update cadence because of the "Updates" heading above it, which the index does not see. The feature's own vocabulary is keyworded so a search for "update check" reaches this control.
*/
keywords: ["update check", "cadence", "how often", "version check"],
},
{
sectionId: "global-general",
key: "updateChannel",
labelKey: "settings.globalGeneral.releaseChannel",
labelFallback: "Release channel",
helpKey: "settings.globalGeneral.releaseChannelHelp",
helpFallback:
" Stable follows official releases. Beta follows pre-releases cut from main (versions like 0.73.0-beta.2) and also picks up each stable release once it overtakes the beta. Switching back to Stable never downgrades; you stay on the installed beta until the next stable release passes it. Default: stable. ",
keywords: ["beta", "channel", "release track", "prerelease", "early access"],
},
{
sectionId: "global-general",
key: "autoUpdateAndRestart",
labelKey: "settings.globalGeneral.autoUpdateAndRestart",
labelFallback: " Auto-update and restart ",
helpKey: "settings.globalGeneral.autoUpdateAndRestartHelp",
helpFallback:
" When enabled, Fusion installs available updates on the selected release channel by itself and then restarts to apply them — the same install + restart the \"Update now\" button performs, without asking. Requires a supervising parent (the default for `fn dashboard`); hosts started with --no-supervise skip the install. Default: disabled. ",
keywords: ["auto update", "automatic update", "self update", "unattended", "restart"],
},
{
sectionId: "global-general",
key: "autoReloadOnVersionChange",
labelKey: "settings.globalGeneral.autoReloadDashboardOnVersionChange",
labelFallback: " Auto-reload dashboard on version change ",
helpKey: "settings.globalGeneral.whenEnabledDefaultTheDashboardAutomaticallyReloadsWhen",
helpFallback:
" When enabled (default), the dashboard automatically reloads when it detects a new build version — either from server rebuilds or service worker updates. Disable this to stay on the current version until you manually refresh. Default: enabled. ",
keywords: ["refresh", "service worker", "hot reload"],
},
];