feat: admin UX overhaul — status filters, retry/cancel, mobile cards, i18n, shelf pre-populate
- Admin layout: SVG icons, active highlight, divider between nav sections - Scrape page: status filter pills with counts, text + status combined search - Audio page: status filter pills, cancel jobs, retry failed jobs, mobile cards for cache tab - Translation page: status filter pills (incl. cancelled), cancel + retry jobs, mobile cancel/retry cards, i18n for all labels - AI Jobs page: fix concurrent cancel (Set instead of single slot), per-job cancel errors inline, full mobile card layout, i18n title/heading - Text-gen page: tagline editable input + copy, warnings copy, i18n title/heading - Book page: chapter cover Save button, audio monitor link, currentShelf pre-populated from server - pocketbase.ts: add getBookShelf(), shelf field on UserLibraryEntry - New API route: POST /api/admin/translation/bulk (proxy for translation retry) - i18n: 15 new admin_translation_*, admin_ai_jobs_*, admin_text_gen_* keys across all 5 locales
This commit is contained in:
41
AGENTS.md
41
AGENTS.md
@@ -109,6 +109,7 @@ doppler run --project libnovel --config prd_homelab -- docker compose -f homelab
|
||||
|
||||
- Prod runner has `profiles: [runner]` — `docker compose up -d` will NOT accidentally start it
|
||||
- When deploying, always sync `docker-compose.yml` to the server before running `up -d`
|
||||
- **Caddyfile is NOT in git** — lives at `/opt/libnovel/Caddyfile` on prod server only. Edit directly on the server and restart the `caddy` container.
|
||||
|
||||
---
|
||||
|
||||
@@ -117,11 +118,43 @@ doppler run --project libnovel --config prd_homelab -- docker compose -f homelab
|
||||
| Tool | Purpose |
|
||||
|---|---|
|
||||
| GlitchTip | Error tracking (UI + backend + runner) |
|
||||
| Grafana Faro | RUM / Web Vitals (collector at `faro.libnovel.cc/collect`) |
|
||||
| OpenTelemetry | Distributed tracing (OTLP → collector → Tempo) |
|
||||
| Grafana | Dashboards at `/admin/grafana` |
|
||||
| Grafana Faro | RUM / Web Vitals (collector at `faro.libnovel.cc/collect`) → Alloy (port 12347) |
|
||||
| OpenTelemetry | Distributed tracing (OTLP → cloudflared → OTel collector → Tempo) |
|
||||
| Grafana | Dashboards at `https://grafana.libnovel.cc` |
|
||||
|
||||
Grafana dashboards: `homelab/otel/grafana/provisioning/dashboards/`
|
||||
### Grafana dashboards: `homelab/otel/grafana/provisioning/dashboards/`
|
||||
|
||||
Key dashboards:
|
||||
- `backend.json` — Backend logs (Loki: `{service_name="backend"}`, plain text)
|
||||
- `runner.json` — Runner logs (Loki: `{service_name="runner"}`) + Asynq Prometheus metrics
|
||||
- `web-vitals.json` — Web Vitals (Loki: `{service_name="unknown_service"} kind=measurement` + pattern parser)
|
||||
- `catalogue.json` — Scrape progress (Loki: `{service_name="runner"} | json | body="..."`)
|
||||
|
||||
### Data pipeline (2026-04-07 working state)
|
||||
|
||||
**Browser → Grafana Faro:**
|
||||
Browser sends RUM data → `https://faro.libnovel.cc/collect` → **Alloy** `faro.receiver` (port 12347) → Loki (logs/exceptions) + OTel collector → **Tempo** (traces)
|
||||
|
||||
**Backend/Runner → OTel:**
|
||||
Backend/Runner Go SDK → `https://otel.libnovel.cc` (cloudflared tunnel) → **OTel collector** (port 4318) → Tempo (traces) + Loki (logs via `otlphttp/loki` exporter)
|
||||
Runner also sends to **Alloy** `otelcol.receiver.otlp` (port 4318) → `otelcol.exporter.loki` → Loki
|
||||
|
||||
### Loki log format per service
|
||||
|
||||
- `service_name="backend"`: Plain text (e.g. `backend: asynq task dispatch enabled`)
|
||||
- `service_name="runner"`: JSON with `body`, `attributes{slug,chapters,page}`, `severity`
|
||||
- `service_name="unknown_service"`: Faro RUM text format (e.g. `kind=measurement lcp=5428.0 ...`)
|
||||
|
||||
### OTel Collector ports (homelab)
|
||||
|
||||
- gRPC: `4317` — receives from cloudflared (`otel.libnovel.cc`)
|
||||
- HTTP: `4318` — receives from cloudflared + Alloy
|
||||
- Metrics: `8888`
|
||||
|
||||
### Known issues / pending fixes
|
||||
|
||||
- Web Vitals use `service_name="unknown_service"` (Faro SDK doesn't set service.name in browser) — works with `unknown_service` label
|
||||
- Runner logs go to both Alloy→Loki AND OTel collector→Loki (dual pipeline — intentional for resilience)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user