docs(37): plan Phase 37 Media Library (album) across 5 waves
This commit is contained in:
@@ -49,6 +49,8 @@ Decimal phases appear between their surrounding integers in numeric order.
|
||||
- [ ] **Phase 31: Chat polish against WavePath clients** - `tide` additions, `sm-wavepath-app`, the full PHP recording of WavePath's community routes and the foundation slice green
|
||||
- [ ] **Phase 31.1: WavePath messaging parity** (INSERTED) - Group chat, channels, DMs, threads, commands and attachments replay green
|
||||
- [ ] **Phase 31.2: WavePath satellites parity and close-out** (INSERTED) - Presence, push, webhooks, bot, video, guests, forums and notes; zero pending
|
||||
- [ ] **Phase 37: Media Library (`album`)** - Plugin-agnostic DB-indexed media library with friendly SEO slugs, WebP `srcset` variants, admin Media screen + `mediafinder` / shared picker, and MCP uploads (signed URLs + base64)
|
||||
- [ ] **Phase 38: Extensible Journal embed providers** - Pluggable `data-embed` registry in `sm-journal-plugin` and lazy `IntersectionObserver` hydration registry in `vue-journal-layer` (CSP-safe, static fallback preserved)
|
||||
|
||||
## Phase Details
|
||||
|
||||
@@ -1919,6 +1921,8 @@ Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 →
|
||||
| 34. Plugin marketplace | 6/6 | In Progress| |
|
||||
| 35. Mail templates and layouts editor | 9/9 | Complete | 2026-11-14 |
|
||||
| 36. Granular MCP OAuth & API token scope picker | 4/4 | Complete | 2026-11-24 |
|
||||
| 37. Media Library (`album`) | 0/TBD | Not started | - |
|
||||
| 38. Extensible Journal embed providers | 0/TBD | Not started | - |
|
||||
|
||||
## Backlog
|
||||
|
||||
@@ -2027,3 +2031,55 @@ Plans:
|
||||
|
||||
**Wave 4** *(blocked on Wave 3 completion)*
|
||||
- [x] 36-04-PLAN.md — Comprehensive Go & Vitest unit/component suites (closing all 7 UI-SPEC backstops), full release gates, human release-tag checkpoint, and `sm-grzybyfunkcjonalne-app` local E2E proof
|
||||
|
||||
### Phase 37: Media Library (`album`)
|
||||
|
||||
**Goal:** Ship a core, plugin-agnostic Media Library (`modules/album`) backed by `lagoon/attach` and Postgres metadata with virtual folders, immutable blob keys and friendly SEO slugs, automatic responsive WebP `srcset` variants, a first-class admin Media screen + `type: mediafinder` field + shared Media Picker modal, and MCP media tools (single-use signed upload URLs for CLI agents + size-capped base64 upload for remote web connectors). Unify `cabana` Mail Images and `sm-journal-plugin` media uploads onto `album` with backward-compatible aliases. Decision note: `.planning/notes/2026-11-26-media-library-album-module.md`.
|
||||
**Mode:** mvp
|
||||
**Depends on:** Phase 35 (Mail templates and layouts editor), Phase 36 (Granular MCP OAuth & API token scope picker)
|
||||
**Repos:** `summercms.go`, `sm-journal-plugin` (unification/alias + inline `srcset` support), `vue-journal-layer` (inline `srcset` rendering), consuming apps as adopted
|
||||
**Requirements**: TBD
|
||||
**Success Criteria** (what must be TRUE):
|
||||
|
||||
1. `modules/album` stores virtual folders and media items (`alt`, `title`, `width`, `height`, `sha256`, `variants`) in Postgres over `lagoon/attach` (`blob.Bucket`), serving public assets at immutable-ID + friendly-slug URLs with `Cache-Control: immutable`, safe `Content-Disposition`, and `nosniff`, so moving or renaming items never breaks published URLs.
|
||||
2. Image uploads automatically produce responsive WebP width variants (`srcset` metadata exposed in API and MCP responses), while interactive JS/HTML bundles and SVG remain disallowed in v1.
|
||||
3. `cabana` / `boardwalk` provide a permission-gated **Media** admin screen (folders, search, upload, metadata edit, delete), a reusable `type: mediafinder` form field, and a shared Media Picker modal used by Mail Editor and Blog Editor; existing Mail Images and Journal upload endpoints remain backward-compatible.
|
||||
4. `pier` exposes granularly scoped (`media` / `media:read`) MCP tools supporting both **short-lived single-use signed upload URLs** (`media_prepare_upload` → HTTP binary upload) and **size-capped direct base64 upload** (`media_upload`), alongside `media_list`, `media_get`, `media_update`, `media_delete`, and `media_create_folder`.
|
||||
5. OpenAPI schema, embedded `boardwalk/dist`, module README + `docs/`, and Go + Vitest unit tests (last plan) pass green.
|
||||
|
||||
**Plans:** 5 plans
|
||||
|
||||
Plans:
|
||||
**Wave 1**
|
||||
- [ ] 37-01-PLAN.md — Core `modules/album` package (Postgres migrations in `lagoon`, upload + synchronous WebP `480w`/`960w`/`1600w` variants + `sha256`, single-use `summer_media_upload_tokens`, after-commit delete seam, zero-DB-hit `/media/...` & `/media/upload/{token}` in `surf`, Mail Images backfill, README & `docs/services/media-library.md`)
|
||||
|
||||
**Wave 2** *(blocked on Wave 1 completion)*
|
||||
- [ ] 37-02-PLAN.md — `cabana` admin Media REST API, `media.view_media`/`media.manage_media` permissions, `media`/`media:read` token scopes, `type: mediafinder` YAML schema, backward-compatible `/mail/images` unification, 7 `media_*` MCP tools in `pier` (+ 8 MiB body cap), EN/PL phrasebooks, OpenAPI & TS regen
|
||||
|
||||
**Wave 3** *(blocked on Wave 2 completion)*
|
||||
- [ ] 37-03-PLAN.md — Admin Vue 3 SPA (`MediaView.vue` with folder tree, grid/list, search, upload, metadata edit, delete warning; shared `MediaPickerModal.vue` reused by `MailImagePicker.vue`; `MediaFinderField.vue`; rebuilt `modules/boardwalk/dist`)
|
||||
|
||||
**Wave 4** *(blocked on Wave 3 completion)*
|
||||
- [ ] 37-04-PLAN.md — Sibling unification (`sm-journal-plugin` `/_journal/api/v1/media/upload` over `album`, Blog Editor media picker hook, single-query batched inline `srcset`/`sizes` enrichment; `vue-journal-layer` sanitizer allow-list for inline `srcset`/`sizes`/`width`/`height`)
|
||||
|
||||
**Wave 5** *(blocked on Waves 1–4 completion)*
|
||||
- [ ] 37-05-PLAN.md — Unit tests last & verification gates (Go unit + Postgres integration tests for `album`/`cabana`/`pier`/`surf`, Vitest suites for Media screen/picker/`mediafinder`, `scripts/check-phase37.sh` with local read-only consumer proofs, and `37-VALIDATION.md`)
|
||||
|
||||
### Phase 38: Extensible Journal embed providers
|
||||
|
||||
**Goal:** Replace hardcoded `youtube`-only embed handling in `sm-journal-plugin` and `vue-journal-layer` with a generic, app-extensible embed provider registry so any SummerCMS site can register custom CSP-safe embeds (such as interactive visualizations, calculators, or additional video/audio providers) with SSR static fallback (`<img>` + `<figcaption>`) and lazy `IntersectionObserver` hydration. Decision note: `.planning/notes/2026-11-26-journal-extensible-embeds.md`.
|
||||
**Mode:** mvp
|
||||
**Depends on:** None (independent short phase; pairs well with Phase 37 `album` for fallback images)
|
||||
**Repos:** `sm-journal-plugin`, `vue-journal-layer`
|
||||
**Requirements**: TBD
|
||||
**Success Criteria** (what must be TRUE):
|
||||
|
||||
1. `sm-journal-plugin` (`classes/format_html.go`) validates `<figure data-embed="<provider>" data-id="<id>">` against a configurable/registered embed provider map (`youtube` registered by default) and preserves static fallback `<img>` and `<figcaption>` inside the figure without allowing arbitrary `script`/`style`/`iframe`/`svg`.
|
||||
2. The Blog Editor (`assets/src/blogeditor/embed.ts`) reads registered embed providers dynamically rather than hardcoding only `youtube`, preserving existing YouTube authoring unchanged.
|
||||
3. `vue-journal-layer` exposes an app-extensible embed provider registry that renders the SSR static fallback unchanged, lazy-hydrates registered providers on viewport entry (`IntersectionObserver`) with `script-src 'self'` CSP compliance, reserves height (no CLS), and exposes `prefers-reduced-motion`.
|
||||
4. Unit tests (Go + Vitest, last plan) and README/docs updates pass green.
|
||||
|
||||
**Plans:** 0 plans
|
||||
|
||||
Plans:
|
||||
- [ ] TBD (run `/msd-discuss-phase 38` then `/msd-plan-phase 38` to break down)
|
||||
|
||||
Reference in New Issue
Block a user