Files
fusion/packages/dashboard/app/components/settings/sections/DatabaseBackupsSection.search.ts
gsxdsm 1a63b6dba6 fix(ci): index embedded Postgres cap and mock portability API in CC controls (#2317)
## Summary
- Index `embeddedPostgresMaxConnections` in Settings search
(backups-global).
- Export `withProjectId` + `api` from `CommandCenterControls` legacy
mock so FN-8284 portability card can mount under the controls suite.

## Test plan
- [x] CommandCenterControls + settings-search-index tests green locally
- [ ] Full Suite all 4 shards green on main after merge

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added the embedded PostgreSQL maximum connections setting to Settings
search, with relevant labels, help text, and keywords.

* **Tests**
* Improved test coverage setup for controls that use project-specific
API paths.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-18 13:20:11 -07:00

67 lines
3.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Search entries for the global Database Backups section.
*
* FNXC:SettingsSearch 2026-07-15-17:35:
* One entry per settings control 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 backup-stats panel and "Backup Now" button are deliberately absent — they report and trigger, they do not configure.
*/
import type { SettingsSearchEntry } from "../search/types";
export const databaseBackupsSearchEntries: SettingsSearchEntry[] = [
{
sectionId: "backups-global",
key: "autoBackupEnabled",
labelKey: "settings.backups.enableAutomaticDatabaseBackups",
labelFallback: " Enable automatic database backups ",
helpKey: "settings.backups.whenEnabledTheDatabaseIsBackedUpAutomatically",
helpFallback:
"When enabled, the database is backed up automatically on a schedule. Default: disabled.",
keywords: ["sqlite", "snapshot", "restore"],
},
{
sectionId: "backups-global",
key: "autoBackupSchedule",
labelKey: "settings.backups.backupScheduleCron",
labelFallback: "Backup Schedule (Cron)",
helpKey: "settings.backups.cronExpressionForBackupTimingDefault02",
helpFallback:
" Cron expression for backup timing. Default: 0 2 * * * (daily at 2 AM). Examples: 0 * * * * (hourly), 0 0 * * 0 (weekly), */15 * * * * (every 15 min) ",
keywords: ["timing", "frequency"],
},
{
sectionId: "backups-global",
key: "autoBackupRetention",
labelKey: "settings.backups.retentionCount",
labelFallback: "Retention Count",
helpKey: "settings.backups.numberOfBackupFilesToKeepOldestAre",
helpFallback:
"Number of backup files to keep (oldest are deleted first). Range: 1-100. Default: 7.",
keywords: ["how many", "prune", "rotation"],
},
{
sectionId: "backups-global",
key: "autoBackupDir",
labelKey: "settings.backups.backupDirectory",
labelFallback: "Backup Directory",
helpKey: "settings.backups.directoryForBackupFilesRelativeToProjectRoot",
helpFallback:
"Directory for backup files, relative to project root. Default: .fusion/backups.",
keywords: ["location", "folder", "destination"],
},
/*
FNXC:EmbeddedPostgres 2026-07-18-13:05:
feat(postgres) adds embeddedPostgresMaxConnections under Advanced database settings.
Index it so Settings search can find the connection cap beside the other backup controls.
*/
{
sectionId: "backups-global",
key: "embeddedPostgresMaxConnections",
labelKey: "settings.database.embeddedConnectionCap",
labelFallback: "Embedded PostgreSQL connection cap",
helpKey: "settings.database.embeddedConnectionCapHelp",
helpFallback:
"Maximum server connections for Fusion's embedded PostgreSQL. Applies after restarting Fusion. Range: 32–2,000. Default: 500. External PostgreSQL uses its provider's connection limit.",
keywords: ["postgres", "postgresql", "connections", "embedded", "cap", "database"],
},
];