Files
bookhoard/docs/admin/archived-items.md
T
John O'Keefe 3e55ddd88a docs(admin): libraries page — the definition surface, with backlinks
Fifth admin page and the section's hub. Documents library creation
(name/description/type — type fixed at creation, verified in the edit
modal), the card's Force Rescan + Manage controls, and the full panel:
folders (add via Browse or manual path, shallow per-folder scan,
removal-unregisters-only semantics verified in DeleteLibraryFolder —
files and items untouched, archive lifecycle governs the rest; podcast
roots refuse hand scans), User Access visibility checkboxes (default-
allow, DB-enforced), the processing-issues link, and Delete Library's
exact destructive scope (records + reading data gone, files on disk
untouched). Ends with the at-a-glance scan table linking scanning.md.
Adds the Libraries backlinks to the processing-issues and archived
pages. Glossary gains Create Library, Manage, Edit Details, Delete
Library, View Archived, Purge Archived Now, Browse, User Access.
2026-11-02 14:11:25 -05:00

54 lines
2.8 KiB
Markdown

<!-- Ground truth: templates/admin_archived.templ (page copy, Merge/
Restore/Delete row actions, Purge All Archived, retention sentence),
internal/config/config.go (ARCHIVE_RETENTION_DAYS, default 90, 0 =
manual purge only), internal/handlers/media.go (MergeArchivedMediaItem
— reading progress/annotations/collections merge, per-user collisions
keep the active copy), templates/admin_library.templ (entry banner).
Re-verify against these when the page changes. -->
# Archived Items
Archived items are books whose files went missing from disk. Bookhoard
doesn't delete them on the first absence: a library-wide scan that can't
find a file marks the item missing, and only when the file is still absent
for **two consecutive scans** does the item move to the archive. Until
then — or after — the reader's history is preserved, so a file that comes
back (or a move the scanner detects automatically) restores the item with
its reading data intact.
You reach this page from the [Libraries](libraries.md) page, which shows
an **Archived items** banner with the count whenever anything is archived.
## What the page shows
A table of every archived item: book title and author, the file path that
went missing, its library, and a status column. When the list is empty you
get the good news instead: "Nothing is archived or missing. All clear."
## Retention
By default archived items are **permanently deleted after 90 days**
(configured with the `ARCHIVE_RETENTION_DAYS` environment variable; set it
to `0` to keep archived items until you purge them by hand). The page
header states your instance's current rule.
## Actions
| Action | What it actually does |
| --- | --- |
| **Merge** (only when a matching active book exists) | Folds this archived copy's reading data — progress, annotations, collections — into the active copy and removes the archived entry. If the same user has reading data on both copies, the active copy's data wins. This is the right choice when the duplicate is a leftover twin and the real book lives on. |
| **Restore** | Puts the item back into the libraries immediately. If the file is genuinely still gone, the next scan archives it again — useful when you know the file just came back or is about to. |
| **Delete** | Deletes the item **and its reading history** permanently. No archive, no undo. |
### Purge All Archived
The header button wipes every archived item at once — permanently, reading
history included (a confirm dialog says exactly that). It exists for the
"clean slate" moments; per-item **Delete** is the scalpel.
## Related
- [Scanning](scanning.md) — how scans decide what's missing, and why only
library-wide scans (shallow or force) archive; a single-folder scan
never marks its sibling folders' items missing.