- frames/delete carries its own request body limit (about 4.8 MB), so the
documented 100,000 ids fit; the server's 1 MiB stopped at about 26,900.
- Restore tells a damaged or foreign sidecar of the target sequence
(409 sidecar_mismatch) from an entry whose files no longer match its
record (422 trash_mismatch, now a TrashMismatchException); frames/delete
answers sidecar_mismatch instead of 500, and 404 when the sequence left
the index between plan and delete, also on the re-plan.
- With the archive offline, the trash list and the empty plan answer
503 archive_offline instead of an empty trash; a read-only archive still
lists and plans but cannot be emptied.
- The empty request is audited as trash_empty_requested: the job checks
the plan again and may erase nothing, so the entry no longer claims an
erase that has not happened.
- API tests for these paths, a named subset emptied, sequence-entry
restore and sequence_in_library, photos restored into a new sequence,
viewer 403 on bulk routes and admin deletes of another user's photos.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit fa35831d55c44746f7f76e0cff262ed6aecf8e72)
The web panel now manages the library without editing it: the owner can
browse and view sequences and photos, delete sequences and photos into the
archive's trash, restore or empty the trash and run mass operations, as
R6 asks, on top of the engine endpoints of the previous commit.
- Library page right after the Dashboard: search, Year/Camera/Status/Tag
filters fed by a new GET /api/v1/sequences/facets, sort, cards or list
(remembered per browser), lazy cover thumbnails, Load more by cursor,
multi-select with Shift ranges and "Select all N" of the filter, and a
sticky bar for the selection: Analyse, Proxies, Thumbnails, Verify,
Tags (add/remove), Export CSV (client-side) and Delete (dry run, list
of what moves to the trash, then the move). Filters live in the address,
so Back from a sequence finds them again.
- Sequence view (#/library?id=): inline title, tags, rating and notes,
facts, photos in pages of 500 with content-visibility, a photo viewer
(proxy, arrows, Esc, Exif facts), Set cover, Download original, Delete
photos (typing the count above 20 photos), Delete sequence, renders to
download. No video editing controls.
- Trash view (#/library?view=trash, also linked from Archive): entries,
Restore, and Empty (dry run, list, the localised word typed, the plan's
fingerprint sent back, the job followed to its end).
- Live updates from sequenceChanged and jobState; keyboard grid (one tab
stop, arrows, Space, Shift+Space, Enter, Ctrl+A, Esc); RTL, dark theme.
- GET /sequences takes rendered=true|false for the Status filter.
- ui.js: confirmDialog's typed confirmation by name, word or count, with a
list of what the action concerns; formDialog. api.js: putBytes for the
web upload, which the Library imports on demand (upload.js, optional).
- New web icons from icons.py (Image for the Library, trash, grid/list,
arrows, stars, cover); directional glyphs mirror in right-to-left pages.
- Strings in en and it; tests for the facets (both dialects), the rendered
filter, the menu, the modules and the on-demand upload import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 029cf334f66cb6fa1265b96a6f8faff2964c11ea)
Owner review 2, R6: the web panel manages the library without editing it, so
the engine and the server must delete single photos safely, keep them out of
sync afterwards, and let an administrator restore or finally erase the trash.
- Migration 0008: frame_removals (tombstones by sequence and SHA-256, reason,
replacement); the sidecar gains "removed" (omitted when empty) and frames a
reserved "source"; the indexer writes the tombstones on every sync, so a
rebuild keeps them, and drops a hero frame that is gone.
- FrameTrash: dry run (busy, frames changed, offline, would empty), delete under
the sequence lease with a write-ahead journal that the next writer undoes
after a crash, files to trash/photos/<seq>-<time>/originals with a record,
sidecar without the frames plus tombstones, index sync clearing analyses,
thumbnails and proxies, proxies renamed to follow their frames, follow-up
jobs. Restore re-hashes every file, keeps mismatches in the trash, puts the
same frame records back and drops their tombstones, or files the photos into
a new sequence through the ingest when theirs is gone.
- Project positions on vanished photos are translated by photo and wait as
pending frames, so they come back with a restore.
- Trash entries have a kind (sequence, photos, replaced); emptying is a dry run
with a fingerprint and a new EmptyTrash job (18) that erases exactly the
planned entries, refuses a stale plan and erases replaced originals only
while their replacements still hash right.
- Sync honours tombstones: nothing one side deleted is offered back, local
files are never deleted, replaced photos count as their replacement; the
server answers an upload of a tombstoned SHA-256 as already there.
- Server: sequence thumbnail, photo delete, bulk delete/retag/jobs, trash
list/restore/empty endpoints with their error messages; a verify of
sequences now targets their archive (POST /jobs failed before).
- Desktop trash dialog lists photo entries and empties the trash after a
typed confirmation through the same job.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 35bb56690a1d69eae57153d036e1409201cd73f7)