feat(webapp): maintenance operations panel and My data exports
What
Two web app sections for routes that were API-only so far.
Ever Platform page: Maintenance operations (operator)
Shown with the Connection section (same condition: the status probe answers the operator with connect: true).
- Reads
GET /api/v1/ever-connect/managed: opt-in, kinds allowed (only the kinds this installation supports), weekly windows in UTC, whether a backup directory is set, and the recent operations. - Edits and saves with
PUT /api/v1/ever-connect/managed: opt-in, kinds, windows (days + from/to, up to 14), and the backup directory on SQLite (write-only: enter a new one to replace it, or tick Remove, which sends an empty value; the current path is never shown). - Client-side checks before saving: each window needs a day and two different
HH:MMtimes; the directory must be an absolute path (at most 1024 characters). Save stays disabled until something changed and everything is valid. A warning shows when opted in with no kind or no window (nothing would run). - Errors:
invalid_managedshows the API's reason; other codes map to fixed text like the existing sections; a read error offers Try again. - A 404 (an installation declared
cloud, which Ever operates) renders nothing. - Recent operations: when, kind, result, and the reason it did not run or the backup size; the latest 10 with Show all.
Account settings: My data exports (every signed-in user)
- Lists
GET /api/v1/ever-connect/me/exports(made, available until), with an empty state. - Download fetches
GET /api/v1/ever-connect/me/exports/<id>and saves it astraduora-export-<day>-<id>.json(file-saver, as the translation export does). An export that expired meanwhile (404) is dropped from the list with a message. - Hidden while the connection module is not loaded. The status probe
GET /api/v1/ever-platform/statusanswers the operator only (404 for everyone else), so it cannot tell a regular user's page what is loaded; the list route itself is the probe instead (it exists only while the module is loaded, so a 404 hides the section). A request with no answer at all (status 0) also hides it; any other error shows Try again.
Strings
The web app keeps its strings in the templates and in per-component message maps (no i18n attributes or extracted catalog are in use), so the new strings follow that pattern.
Docs
docs/ever-platform/connection.md and outbound-calls.md describe both sections instead of the bare routes; changelog entry under next.
Tests
maintenance.component.spec.ts: shows the view; saves opt-in/kinds/windows (days as numbers) with no directory; sends a new directory and an empty one to remove it; refuses windows with no day, equal or invalid times, and relative directories (no request); window limit; warnings; no directory field without SQLite; API refusal reason; history (10 + Show all, sizes, reasons); hidden on 404; Try again after an error.my-data-exports.component.spec.ts: list, empty state, hidden on 404, Try again, JSON download (file name, type, content), expired export dropped, file name sanitising.ever-platform-page.component.spec.ts: the maintenance section appears with the connection only, for the operator only.
Run in CI (CircleCI and the in-cluster webapp-unit); not run locally.
🤖 Generated with Claude Code
Summary by cubic
Adds web app interfaces for two Ever Platform routes that were previously API-only: an operator-only Maintenance operations panel and a My data exports section for all signed-in users.
New Features
- Maintenance operations appears with the Connection section on the Ever Platform page. It reads
GET /ever-connect/managedand saves withPUT: the opt-in, the allowed kinds, the weekly UTC windows (up to 14), and the write-only backup directory on SQLite (set, replace, or remove via an empty value; the current path is never shown). Windows and the directory are checked before saving, the API's refusal reason is shown, and recent operations list when, what, the result, and why it did not run or how big the backup was. Warnings explain when nothing would run: opted in with no kind or no window, or backups allowed without a backup directory. A 404 renders nothing (an installation Ever operates). The form is locked while a save runs, since its answer replaces the form. - My data exports in account settings lists
GET /ever-connect/me/exportsand downloads each export as a JSON file namedtraduora-export-<day>-<id>.json. The list is its own probe for the connection module: a 404, an HTML answer (the app's index.html for an unknown path), or any body other than a list hides the section; other read errors offer a retry. An export that expired meanwhile is dropped from the list with a message.
Docs and changelog now describe both sections, and unit tests cover both components and the page-level section visibility.