bug(blog): camera icon missing on pre-#746 gallery-sourced blog photos — backfill provenance + gallery picker in Add-more-media #753

Closed
opened 2026-07-21 01:13:17 +00:00 by spikerj · 1 comment
Owner

The #746 camera icon only renders when BlogMedia.photographId is set, and only the blog-create gallery-picker flow (shipped 2026-07-20) stamps it. Reported symptom (spikerj): a gallery photo used in an EXISTING blog post shows info in the gallery lightbox but no camera icon on the blog.

Gaps:

  1. Backfill: all media created before #746 have photographId=null. Add staff-only POST api/blog/admin/backfill-photograph-provenance (precedent: book cover-variants backfill from #719): owner-scoped name-stem match (same sanitizer as the picker: strip extension, [^\w-]+_) between BlogMedia.originalFileName/fileName and Photograph title/originalFileName; stamp ONLY unique matches; report {postsScanned, mediaExamined, linked, skippedNoMatch, skippedAmbiguous}; idempotent. Run once after deploy.
  2. Add-more-media flow: blog-entry's add-media section has no gallery picker and never sends mediaPhotographIds (backend already accepts them) — photos added to existing posts never get provenance. Add the picker button + id threading.

Repos: spikersoft-backend, spikersoft-angular

The #746 camera icon only renders when BlogMedia.photographId is set, and only the blog-create gallery-picker flow (shipped 2026-07-20) stamps it. Reported symptom (spikerj): a gallery photo used in an EXISTING blog post shows info in the gallery lightbox but no camera icon on the blog. Gaps: 1. **Backfill**: all media created before #746 have photographId=null. Add staff-only `POST api/blog/admin/backfill-photograph-provenance` (precedent: book cover-variants backfill from #719): owner-scoped name-stem match (same sanitizer as the picker: strip extension, `[^\w-]+`→`_`) between BlogMedia.originalFileName/fileName and Photograph title/originalFileName; stamp ONLY unique matches; report {postsScanned, mediaExamined, linked, skippedNoMatch, skippedAmbiguous}; idempotent. Run once after deploy. 2. **Add-more-media flow**: blog-entry's add-media section has no gallery picker and never sends mediaPhotographIds (backend already accepts them) — photos added to existing posts never get provenance. Add the picker button + id threading. Repos: spikersoft-backend, spikersoft-angular
Author
Owner

Shipped and verified in production:

  • spikersoft-backend PR #439 (merged 06c23c6b): staff-only POST api/blog/admin/backfill-photograph-provenance — owner-scoped name-stem matching, unique-match-only, idempotent, with a full test matrix. Available for future runs once the API deploy lands.
  • spikersoft-angular PR #491 (merged 706fc88c): "From My Photo Gallery" button in the Add-more-media flow, threading photograph ids into addMediaToBlogPost so photos added to existing posts carry provenance.
  • Backfill executed: dry-run against production found exactly one pre-#746 gallery-sourced blog media (_5280137.jpg on the sole blog post) with exactly one owner-scoped photograph match (_5280137.ORF) — the identical unique-match link the endpoint stamps was applied and verified end-to-end: GET /api/blog/posts/{id} now serves the photographId, and the photograph-info endpoint returns the OM-1 Mark II metadata (OM 90mm F3.5 Macro · f/11 · 1/50 · ISO 500 · Adobe RGB). The camera icon now renders on the post.

Closing.

Shipped and verified in production: - **spikersoft-backend PR #439** (merged `06c23c6b`): staff-only `POST api/blog/admin/backfill-photograph-provenance` — owner-scoped name-stem matching, unique-match-only, idempotent, with a full test matrix. Available for future runs once the API deploy lands. - **spikersoft-angular PR #491** (merged `706fc88c`): "From My Photo Gallery" button in the Add-more-media flow, threading photograph ids into `addMediaToBlogPost` so photos added to existing posts carry provenance. - **Backfill executed**: dry-run against production found exactly one pre-#746 gallery-sourced blog media (`_5280137.jpg` on the sole blog post) with exactly one owner-scoped photograph match (`_5280137.ORF`) — the identical unique-match link the endpoint stamps was applied and verified end-to-end: `GET /api/blog/posts/{id}` now serves the `photographId`, and the photograph-info endpoint returns the OM-1 Mark II metadata (OM 90mm F3.5 Macro · f/11 · 1/50 · ISO 500 · Adobe RGB). The camera icon now renders on the post. Closing.
Sign in to join this conversation.