generated from john/python-template
1.6 KiB
1.6 KiB
Settings Page Contract
Purpose
Settings manages installation-local registries, safe runtime .env settings, and editable text assets from one route.
Route
| Route | Purpose |
|---|---|
/settings |
Manage Runtime Settings, Document Types, Person Roles, Tags, Prompts, and Home Page Text. |
Behavior
- The page title is Settings.
- Configuration surfaces are grouped as tabs:
- Runtime Settings
- Document Types
- Person Roles
- Tags
- Prompts
- Home Page Text
- Runtime Settings exposes an allowlisted set of non-secret fields synchronized with
Settingsmodel fields except excluded secret/unsafe fields. - Runtime Settings persists changes to
.env, validates by constructing aSettingsinstance, and reports validation failures through the shared UI error presenter. - Runtime Settings changes require application restart to take effect.
- Document Types, Person Roles, and Tags support Add/Edit/Delete with existing guardrails.
- Prompts exposes only
transcribe_document.mdfor editing and restore-from-backup. - Home Page Text edits the same Markdown content rendered on
/homepage.
Acceptance Checklist
/ui/settingsrenders all six tabs.- Registry and prompt workflows keep existing validation and error handling.
- Runtime Settings excludes secret fields and rejects invalid values.
- Saving Home Page Text persists content for the homepage view.
Implementation Anchors
src/transcription/ui/pages/settings_page.pysrc/transcription/ui/runtime_settings_store.pysrc/transcription/ui/homepage_store.pytests/ui/test_pages_registration.py