Fase 2 stap B (frontend): uitsnede per slide in het scherm, herstelpunt in het plan

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 21:51:21 +01:00
co-authored by Claude Sonnet 5.5
parent e30d885d64
commit e44ca80d1d
11 changed files with 195 additions and 54 deletions
@@ -1,6 +1,6 @@
# Phase 2: the Hero works through the library, and a crop per use
Status: design and rollback plan, **not built yet** (2026-11-17). Branch `feature/media-library-phase2` (no PR until #22 is merged). Test only; every switch is OFF by default; SLS-Main is told before every test deploy; phase 3 (dropping the old tables) only after phase 2 is verified on test and never on production without a separate go from Bryan.
Status (2026-11-17): step B (crop per slide) is built on this branch (backend, frontend, tests); steps A and C and phase 3 are not built. Branch `feature/media-library-phase2` (no PR until #22 is merged). Test only; every switch is OFF by default; SLS-Main is told before every test deploy; phase 3 (dropping the old tables) only after phase 2 is verified on test and never on production without a separate go from Bryan.
## What Bryan wants
@@ -68,7 +68,7 @@ Behaviour:
Before the first deploy of each step (A, B, C) on a test host:
1. **Database dump** if it can be taken (`mysqldump --single-transaction`, dated file outside the deploy directory). SLS-Main cannot make one on the Raspberry Pi today (see migration plan): then the assumption stays that the test data can be rebuilt and that every change is additive (new nullable columns, new tables); Bryan has been told.
1. **Restore point of the test sites (made by Bryan, 2026-11-17 21:37, confirmed by Pi-Main):** `/mnt/storage1/backups/test-herstelpunt/2026-11-17-213757/` (readable by root only) with `db-SlpSoftwareTest.sql.gz`, `db-AndreaSlopFotografieTest.sql.gz`, `media.tar.gz` (both media directories) and `SHA256SUMS`. Made with `sudo bash /home/claude/server-ops/drafts/2026-11-17-test-herstelpunt/test-herstelpunt.sh`. Restoring is step 22b in `drafts/2026-11-17-test-herstelpunt/README.md` on the Pi, done by Bryan (not tested yet). Take a new one before the next step if a lot changed.
2. **Row counts** noted: `HeroImages`, `HeroSlides`, `HeroRetiredFiles`, `MediaAssets`, `MediaUses`.
3. **Sample of public addresses** (ten `/media/hero/<setHash>/...` URLs and the hero markers) requested before and after; same bytes.
@@ -91,5 +91,5 @@ Switches are set through the existing deploy workflow input path (the same way a
## Assumptions made here (also in assumptions-and-open-questions.md)
- The Hero tables stay authoritative until phase 3; "reads and writes through the library" is reached in steps A and C behind switches, not by replacing the tables in one go (a one-go replacement cannot be rolled back by a switch).
- Test data is no longer assumed to be rebuildable: there is a recorded restore point (above). The Hero tables stay authoritative until phase 3; "reads and writes through the library" is reached in steps A and C behind switches, not by replacing the tables in one go (a one-go replacement cannot be rolled back by a switch).
- The crop per slide lives in the slide (nullable) in the Hero until phase 3 and is mirrored to `MediaUses.Crops`; moving the authority to `MediaUses` is part of phase 3.