Assemble the implementation spec #187

Closed
opened 2026-08-12 04:14:06 +00:00 by rosa · 2 comments
Owner

Map: #181
Blocked by: #183 (Does Media grow user-facing metadata?), #184 (Design the media library page), and #185 (Prototype the media picker in the post editor) — it folds all of their answers together.

Question

Assemble the implementation spec — the map's destination. Fold every closed decision into one document an implementation session can execute without reopening anything:

  • The domain surface: new Media Service ops and repository-port additions (list-by-user, delete, referencing-Posts lookup), plus exposing Photo resolution to the web editor path (currently pub(crate) Micropub-only). This is the fog patch the map holds under "Not yet specified" — it lands here if no earlier ticket has pinned it.
  • The web surface: library page, editor picker, routes.
  • Any CONTEXT.md and ADR updates the decisions imply.

Resolution closes the map: link the spec, verify no fog remains under "Not yet specified", and confirm nothing is left to decide before implementation.

Map: #181 Blocked by: #183 (Does Media grow user-facing metadata?), #184 (Design the media library page), and #185 (Prototype the media picker in the post editor) — it folds all of their answers together. ## Question Assemble the implementation spec — the map's destination. Fold every closed decision into one document an implementation session can execute without reopening anything: - The domain surface: new Media Service ops and repository-port additions (list-by-user, delete, referencing-Posts lookup), plus exposing Photo resolution to the web editor path (currently `pub(crate)` Micropub-only). This is the fog patch the map holds under "Not yet specified" — it lands here if no earlier ticket has pinned it. - The web surface: library page, editor picker, routes. - Any `CONTEXT.md` and ADR updates the decisions imply. Resolution closes the map: link the spec, verify no fog remains under "Not yet specified", and confirm nothing is left to decide before implementation.
rosa self-assigned this 2026-08-12 05:42:31 +00:00
Author
Owner

Resolution

The spec exists: Media management: Library page and editor picker — implementation spec (#188, labelled ready-for-agent). It folds every closed decision — the filename label (#183), the Library design (#184), and the variant-A picker (#185) — into one document with the domain-op shapes this ticket held:

  • MediaFilename captured at upload through both adapters (basename-only, 255-char truncating cap, absence allowed), with its migration.
  • New Media Service ops: list_media_for (newest-first, shared by Library and picker), resolve_owned_photo (the id-based existence+ownership check the web editor path needs — Micropub's resolve_photo keeps its URL head and delegates its tail, so the ownership decision lives once), list_posts_referencing (the confirm page's listing), and delete_media (owner-scoped, NotFound for foreign/missing, StillProcessing refused, Ready/Failed deletable; the schema's SET NULL/CASCADE does the detaching, and the repository transaction also clears the orphaned photo_alt).
  • Repository-port additions with conformance tests against both the SQLite and memory implementations.
  • Web surface: /media routes (list, upload, confirm-delete) in app_routes, nav + dashboard entries, the tile grid, and the picker with the remove > upload > pick > keep precedence — no CSP change.
  • Docs: CONTEXT.md needs only a one-line warn-and-allow deletion note on the Library entry; no new ADR.

Map check: nothing remains under "Not yet specified", and nothing is left to decide before implementation — this resolution closes the map.

## Resolution The spec exists: [Media management: Library page and editor picker — implementation spec](https://code.cosmicrose.dev/rosa/vernier/issues/188) (#188, labelled `ready-for-agent`). It folds every closed decision — the filename label (#183), the Library design (#184), and the variant-A picker (#185) — into one document with the domain-op shapes this ticket held: - **`MediaFilename`** captured at upload through both adapters (basename-only, 255-char truncating cap, absence allowed), with its migration. - **New Media Service ops**: `list_media_for` (newest-first, shared by Library and picker), `resolve_owned_photo` (the id-based existence+ownership check the web editor path needs — Micropub's `resolve_photo` keeps its URL head and delegates its tail, so the ownership decision lives once), `list_posts_referencing` (the confirm page's listing), and `delete_media` (owner-scoped, `NotFound` for foreign/missing, `StillProcessing` refused, Ready/Failed deletable; the schema's `SET NULL`/`CASCADE` does the detaching, and the repository transaction also clears the orphaned `photo_alt`). - **Repository-port additions** with conformance tests against both the SQLite and memory implementations. - **Web surface**: `/media` routes (list, upload, confirm-delete) in `app_routes`, nav + dashboard entries, the tile grid, and the picker with the `remove > upload > pick > keep` precedence — no CSP change. - **Docs**: CONTEXT.md needs only a one-line warn-and-allow deletion note on the Library entry; no new ADR. Map check: nothing remains under "Not yet specified", and nothing is left to decide before implementation — this resolution closes the map.
Author
Owner

Resolved — spec assembled as #188.

Resolved — spec assembled as #188.
rosa closed this issue 2026-08-12 05:48:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rosa/vernier#187
No description provided.