Files
bookhoard/docs/admin/dashboard.md
T
John O'Keefe 607e5a1708 docs(admin): settings page — every knob, what it does, and its range
The ninth page and the core of the owner's admin-docs brief: all 29
registry settings plus Base URL, documented setting-by-setting to the
admin tier — key, type, default, valid range, live-vs-restart, and
prose for what it does and what it means when that's confusing
(extractor-version as the gradual backfill lever vs. force rescan;
password rules apply at next set, never retroactively; tombstone TTL
as offline-device protection; rate limits as throttling behavior;
worker pool sizing honesty for small servers). Grouped exactly like
the page renders them, with the three save paths explained up front.
Ranges/defaults/flags from SettingDefaults; exclusion of the three
dedicated-UI keys from the tunables verified in the page handler.
Backfills the Settings links into dashboard.md and users.md now that
the target exists. Glossary gains Save Settings, Save Scan Settings,
both Tunable bucket headings, and Default Timezone.
2026-11-02 14:16:04 -05:00

73 lines
2.9 KiB
Markdown

<!-- Ground truth: templates/admin.templ (stats grid, File Watcher card,
Quick Actions, Scanning panel), internal/router/frontend.go (/admin
handler), internal/router/admin_library.go (getAdminStats),
web/src/admin.ts (scanAllLibraries one-job-per-library, watch status
fetch, progress rows), internal/handlers/scanner.go (watch status,
coalescing 409). Re-verify against these when the page changes. -->
# Admin Dashboard
The dashboard at `/admin` is the admin landing page: a four-number health
check, the file-watcher status, and the place where library-wide scans are
launched and watched.
## The stats grid
Four counts, straight from the database, refreshed on every page load:
| Card | What the number counts |
| --- | --- |
| **Libraries** | Every library — book, comic, audiobook, and podcast libraries alike |
| **Books** | Every item across all of them: books, comics, audiobooks, and podcast episodes |
| **Users** | Every account on the instance |
| **Devices** | Every registered sync device (Android, KOReader, Kobo) |
These are instance-wide totals — they don't filter by what any individual
user can see.
## File Watcher
The **File Watcher** card shows how many libraries are currently under
live watch for file changes. The watcher exists when **Auto-Scan** is
enabled on the Settings page; the number updates on page load.
- Watching **0** libraries usually means auto-scan is off — turn it on in
[Settings](settings.md) → Scanning, and the watcher arms on the next
server start.
- Watched libraries get shallow scans as files change, plus a periodic
poll on the scan interval — see [Scanning](scanning.md) for exactly what
those do.
## Quick Actions
### Force Rescan All Libraries
The big one. This is a **force rescan of every library**: each file is
re-read and re-extracted with the scanner's current parsing, and hash
identifiers are recomputed — nothing unchanged is skipped. Use it as the
backfill tool after mass edits or scanner improvements; don't use it as a
routine refresh (that's what the watcher and [per-library
scans](scanning.md) are for, which skip unchanged files).
Mechanically it starts **one scan job per library** and reports per
library: started, or skipped because that library already had a scan
running (only one scan per library can run at a time).
### Manage Libraries
A shortcut to [Libraries](libraries.md), where folders, access, and
per-library scans live.
## The Scanning panel
Whenever scans are running, a **Scanning Libraries** panel appears with a
live progress row per library (progress bar, current file counts, and a
per-library cancel button), plus:
- **Cancel all scans** — stops every queued or running scan job
- The close button — hides the panel; scans keep running without it
The panel appears for any scan — the dashboard's own force rescan, or one
started from the Libraries page. Progress updates live while the page is
open; the jobs themselves run on the server either way.