Commit Graph

6 Commits

Author SHA1 Message Date
dc44452834 feat: add doc type and saved view counters to dashboard
All checks were successful
Deploy / deploy (push) Successful in 34s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 08:51:20 +02:00
12e0e7d202 feat: show tag counts alongside doc counts on dashboard
All checks were successful
Deploy / deploy (push) Successful in 21s
Fetch /api/tags/ in parallel with /api/documents/ for each instance.
Dashboard now displays "X docs, Y tags" per master/replica.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 21:18:25 +01:00
f76aba0f48 fix: update TemplateResponse to Starlette 0.41 signature
All checks were successful
Deploy / deploy (push) Successful in 16s
Starlette 0.41.x removed the old TemplateResponse(name, context) API.
Switch to the new TemplateResponse(request, name, context) signature,
which is the only supported form in Starlette >= 0.41.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 22:36:24 +01:00
cdc9407ff3 Implement master promotion feature
All checks were successful
Deploy / deploy (push) Successful in 33s
Allows promoting any replica to master with zero document re-downloads.
The sync_map rebuild uses existing DB data only — pure in-memory join.

Changes:
- app/sync/promote.py: preflight() checks (doc count, sync lock, ack
  warnings) and promote() transaction (pause scheduler, rebuild all
  sync_maps, create old-master replica, swap settings, resume scheduler)
- app/api/master.py: GET /api/master/promote/{id}/preflight (dry run)
  and POST /api/master/promote/{id} (execute)
- app/models.py: add promoted_from_master bool field to Replica
- app/database.py: idempotent ALTER TABLE migration for new column
- app/main.py: register master router
- app/templates/replica_detail.html: "Promote to Master" button +
  dialog with pre-flight summary, 3-card stats, ack checkboxes, spinner
- app/ui/routes.py: flash query param on dashboard route
- app/templates/dashboard.html: blue info banner for post-promotion flash

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 21:17:01 +01:00
cbcf88ca96 fix: resync clears last_sync_ts; add live doc counts to dashboard
All checks were successful
Deploy / deploy (push) Successful in 14s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:10:12 +01:00
b99dbf694d feat: implement pngx-controller with Gitea CI/CD deployment
All checks were successful
Deploy / deploy (push) Successful in 30s
- Full FastAPI sync engine: master→replica document sync via paperless REST API
- Web UI: dashboard, replicas, logs, settings (Jinja2 + HTMX + Pico CSS)
- APScheduler background sync, SSE live log stream, Prometheus metrics
- Fernet encryption for API tokens at rest
- pngx.env credential file: written on save, pre-fills forms on load
- Dockerfile with layer-cached uv build, Python healthcheck
- docker-compose with host networking for Tailscale access
- Gitea Actions workflow: version bump, secret injection, docker compose deploy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 17:59:25 +01:00