Expose settings defaults directly in dashboard help text so operators can see baseline values while editing settings. - Add default-value wording across global and project settings descriptions and locale strings. - Document the dashboard/default-reference alignment and add a changeset for the published CLI package. - Add coverage that every visible settings field includes its default in helper text and update existing assertions. Files changed: .changeset/fn-7505-settings-default-descriptions.md | 7 + docs/dashboard-guide.md | 3 + docs/settings-reference.md | 3 + .../__tests__/SettingsModal.general.test.tsx | 2 +- .../settings/sections/AgentPermissionsSection.tsx | 4 +- .../settings/sections/AppearanceSection.tsx | 4 +- .../settings/sections/BackupsSection.tsx | 13 +- .../settings/sections/CommandsSection.tsx | 4 +- .../settings/sections/ExperimentalSection.tsx | 2 +- .../settings/sections/GeneralSection.tsx | 26 +- .../settings/sections/GlobalGeneralSection.tsx | 25 +- .../settings/sections/GlobalModelsSection.tsx | 24 +- .../settings/sections/McpServersCard.tsx | 1 + .../components/settings/sections/MemorySection.tsx | 12 +- .../components/settings/sections/MergeSection.tsx | 37 +- .../settings/sections/ModelPricingSection.tsx | 2 +- .../settings/sections/NodeRoutingSection.tsx | 3 +- .../settings/sections/NodeSyncSection.tsx | 6 +- .../settings/sections/NotificationsSection.tsx | 14 +- .../settings/sections/ProjectModelsSection.tsx | 11 +- .../settings/sections/PromptsSection.tsx | 2 +- .../components/settings/sections/RemoteSection.tsx | 7 +- .../settings/sections/ResearchGlobalSection.tsx | 15 +- .../settings/sections/ResearchProjectSection.tsx | 16 +- .../settings/sections/ScheduledEvalsSection.tsx | 7 +- .../settings/sections/SchedulingSection.tsx | 20 +- .../settings/sections/WorktreesSection.tsx | 14 +- .../sections/__tests__/AppearanceSection.test.tsx | 4 +- .../MergeSection.legacy-automerge-cleanup.test.tsx | 2 +- .../settings-default-descriptions.test.tsx | 573 +++++++++++++++++++++ packages/i18n/locales/en/app.json | 261 ++++++---- 31 files changed, 914 insertions(+), 210 deletions(-) Fusion-Task-Id: FN-7505 Fusion-Task-Lineage: 7688caf2-2a95-4401-8b27-9da4b46ecfcd Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
55 lines
4.0 KiB
TypeScript
55 lines
4.0 KiB
TypeScript
import type { ReactNode } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import type { SectionBaseProps } from "./context";
|
|
export interface NodeSyncSectionProps extends SectionBaseProps {
|
|
scopeBanner: ReactNode;
|
|
}
|
|
export function NodeSyncSection({ scopeBanner, form, setForm }: NodeSyncSectionProps) {
|
|
const { t } = useTranslation("app");
|
|
return (<>
|
|
{scopeBanner}
|
|
<h4 className="settings-section-heading">{t("settings.nodeSync.nodeSync", "Node Sync")}</h4>
|
|
<div className="form-group">
|
|
<label htmlFor="settingsSyncEnabled" className="checkbox-label">
|
|
<input id="settingsSyncEnabled" type="checkbox" checked={form.settingsSyncEnabled || false} onChange={(e) => setForm((f) => ({ ...f, settingsSyncEnabled: e.target.checked }))}/>{t("settings.nodeSync.enableAutomaticSettingsSync", " Enable automatic settings sync ")}</label>
|
|
<small>{t("settings.nodeSync.automaticallySynchronizeSettingsBetweenThisNodeAndConnected", "Automatically synchronize settings between this node and connected remote nodes. Default: disabled.")}</small>
|
|
</div>
|
|
{form.settingsSyncEnabled && (<>
|
|
<div className="form-group">
|
|
<label htmlFor="settingsSyncAuth" className="checkbox-label">
|
|
<input id="settingsSyncAuth" type="checkbox" checked={form.settingsSyncAuth || false} onChange={(e) => setForm((f) => ({ ...f, settingsSyncAuth: e.target.checked }))}/>{t("settings.nodeSync.syncModelAuthCredentials", " Sync model auth credentials ")}</label>
|
|
<small>{t("settings.nodeSync.includeAPIKeysAndOAuthTokensInSync", "Include API keys and OAuth tokens in sync operations. Default: disabled.")}</small>
|
|
</div>
|
|
<div className="form-group">
|
|
<label htmlFor="settingsSyncInterval">{t("settings.nodeSync.syncInterval", "Sync interval")}</label>
|
|
<select id="settingsSyncInterval" className="select" value={form.settingsSyncInterval || 900000} onChange={(e) => setForm((f) => ({ ...f, settingsSyncInterval: parseInt(e.target.value, 10) }))}>
|
|
<option value={300000}>{t("settings.nodeSync.every5Minutes", "Every 5 minutes")}</option>
|
|
<option value={900000}>{t("settings.nodeSync.every15Minutes", "Every 15 minutes")}</option>
|
|
<option value={1800000}>{t("settings.nodeSync.every30Minutes", "Every 30 minutes")}</option>
|
|
<option value={3600000}>{t("settings.nodeSync.every1Hour", "Every 1 hour")}</option>
|
|
</select>
|
|
<small>{t("settings.nodeSync.syncIntervalHint", "Default: every 15 minutes.")}</small>
|
|
</div>
|
|
<div className="form-group">
|
|
<label htmlFor="settingsSyncConflictResolution">{t("settings.nodeSync.conflictResolution", "Conflict resolution")}</label>
|
|
<select id="settingsSyncConflictResolution" className="select" value={form.settingsSyncConflictResolution || "last-write-wins"} onChange={(e) => setForm((f) => ({
|
|
...f,
|
|
settingsSyncConflictResolution: e.target.value as "last-write-wins" | "always-ask" | "keep-local" | "keep-remote",
|
|
}))}>
|
|
<option value="last-write-wins">{t("settings.nodeSync.lastWriteWins", "Last write wins")}</option>
|
|
<option value="always-ask">{t("settings.nodeSync.alwaysAsk", "Always ask")}</option>
|
|
<option value="keep-local">{t("settings.nodeSync.keepLocal", "Keep local")}</option>
|
|
<option value="keep-remote">{t("settings.nodeSync.keepRemote", "Keep remote")}</option>
|
|
</select>
|
|
<small>{t("settings.nodeSync.conflictResolutionHint", "Default: last write wins.")}</small>
|
|
</div>
|
|
</>)}
|
|
{/* KTD-8: workflow settings are not yet part of the cross-node sync
|
|
channel. Non-dismissible, informational only, no action affordance. */}
|
|
<p className="settings-sync-workflow-note text-muted" role="note">
|
|
{t("settings.nodeSync.workflowSettingsNotSynced", "Workflow settings are not synced across nodes yet.")}
|
|
</p>
|
|
</>);
|
|
}
|
|
export default NodeSyncSection;
|