chore(settings): every catalog setting in the shipped .ini files; forget settings taken out of a file

- resources/*.ini list the 73 settings the catalog knew but the files left
  out (dashboard AI helper, backups, metrics, public status, strikes,
  property rent and reputation, chat log, contraband, logins...), with
  their title, description and default. The test
  ShippedFilesListEveryCatalogSetting keeps it that way; with
  DLU_WRITE_INI_TEMPLATES=1 it writes the missing ones.
- ConfigSync forgets a setting row when its key has left a file the
  server read: from the file, no value set on the dashboard, not a
  permission level. Before, rows of removed keys stayed forever.
- Docs: where setting rows come from and when they go, the templates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-28 15:35:43 -05:00
parent 5a9dafe6f7
commit 7f0c0c23d0
7 changed files with 291 additions and 0 deletions

View File

@@ -224,6 +224,18 @@ the Settings page by earlier versions are ignored. Programs such as `mysqldump`
Secrets (passwords, tokens, keys) from files are never copied into the database; secrets set on the web are stored in
the database and can't be read back from the page.
Where the rows come from and when they go: every server reports the keys of the files it read when it starts
(`ConfigSync::Sync`, table `server_config`). A key taken out of a file is forgotten the next time a server that reads
that file starts: its row is deleted when it came from the file (not an environment variable), has no value set on this
page, and isn't a permission level. Rows with a value set here stay until that value is removed.
The shipped `resources/*.ini` files list every setting in the catalog (`dDashboardServer/routes/SettingsCatalog.cpp`)
as `key=default` under a comment with its title and description, or name it in a comment (numbered families such as
`event_1`...`event_8` and the icon framing keys); the test `SettingsCatalogTests.ShippedFilesListEveryCatalogSetting`
fails when one is missing, and running it with `DLU_WRITE_INI_TEMPLATES=1` adds the missing ones to the files under
their section. CMake copies a file that isn't in the build folder yet and appends missing keys (without comments) to
one that is; values already in a server's files are never changed by it.
### Setting history
The **History** tab of the Settings page (same `settings` permission) lists every change made on the Settings page, and