Add ability to edit safe .env.example options to Settings
Quality Gate / gate (push) Failing after 47s

This commit is contained in:
Jim Lancaster
2026-08-24 16:14:49 -05:00
parent 96af7b2dc0
commit c0112c2714
6 changed files with 630 additions and 4 deletions
+4
View File
@@ -44,6 +44,10 @@ Objective: improve research value with person-centric outputs.
## V6.2 - Access Control and Multi-User Readiness
[ *More thoughts on user accounts:*
* *Create a generic "view only" user that does not have the rights to alter any of the data*
* *Limit user accounts access to data by Tag. I have distant family members that I would want to share the transcribed data with, but they would only be interested in a subset of it. For example my Cochran cousins would have no interest in Lancaster documents, so limit the Cochra Clan cousins to view-only access to documents tagged "cochran clan"* ]
Objective: prepare for managed collaboration beyond single-user operation.
### Scope
+9 -3
View File
@@ -2,35 +2,41 @@
## Purpose
Settings manages installation-local registries and editable text assets from one route.
Settings manages installation-local registries, safe runtime .env settings, and editable text assets from one route.
## Route
| Route | Purpose |
| --- | --- |
| `/settings` | Manage Document Types, Person Roles, Tags, Prompts, and Home Page Text. |
| `/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 `Settings` model fields except excluded secret/unsafe fields.
- Runtime Settings persists changes to `.env`, validates by constructing a `Settings` instance, 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.md` for editing and restore-from-backup.
- Home Page Text edits the same Markdown content rendered on `/homepage`.
## Acceptance Checklist
- `/ui/settings` renders all five tabs.
- `/ui/settings` renders 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.py`
- `src/transcription/ui/runtime_settings_store.py`
- `src/transcription/ui/homepage_store.py`
- `tests/ui/test_pages_registration.py`