Media management: Library page and editor picker #194
No reviewers
Labels
No labels
kind
bug
kind
enhancement
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/vernier!194
Loading…
Reference in a new issue
No description provided.
Delete branch "media/management"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the media-management surface from the spec in #188 — the Library page and the post editor's picker. One PR for the whole effort: the remaining slices land as further commits on this branch.
Slices
main(#193).Landed here
The domain vocabulary the web surface will consume:
list_media_for— a user's whole Library, newest-first, ordered by the repository rather than by callers.resolve_owned_photo— turns a picked Media id into an author-ownedPhotoRef. Foreign and absent ids are alikeNone, so the outcome can't be used to probe for another user's ids. No status gate, matching what inline upload already allows.list_posts_referencing— the Posts a Media appears in, any status, newest-first; owner-scoped, so a Media the asker doesn't own reveals nothing.delete_media— owner-scoped, with missing and foreign ids collapsing to one not-found. A still-Processing Media is refused, its integrity being the Reconciler's until it settles; Ready and Failed both delete, detaching every referencing Post's Photo — orphaned alt text included — and dropping the rendition. Disk returns on the existing reclamation tick.resolve_photo(Micropub) keeps its URL parse and delegates existence + ownership toresolve_owned_photo, putting that decision in one place. Behavior unchanged, existing tests untouched.The three new port methods are implemented in both the SQLite and in-memory repositories, the mock mimicking the detach; deleting an unknown id is an idempotent no-op at the repository layer, so a concurrent-delete race can't manufacture an error. Four
both_adapters!conformance behaviours cover the new ops against both implementations, detach included.CONTEXT.md's Library entry records warn-and-allow deletion and the Processing refusal. No new ADR, per #188 §3.
mise run format,mise run ci, andmise run clippypass.Closes #190
WIP: Media management: Library page and editor pickerto Media management: Library page and editor picker