From b02f27f559ad3c04db888b177e02bb8fe2dedd7b Mon Sep 17 00:00:00 2001 From: Mischa Date: Fri, 24 Jul 2026 23:28:49 +0200 Subject: [PATCH] docs(working): record three real defects behind the red post specs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also corrects the green-run line: "test-post 6/6" is the scripts/test-post.sh shell suite, not the Playwright specs under tests/ui/post/ — conflating the two made the Playwright post specs look covered when they were never run. Co-Authored-By: Claude Opus 5 --- .../working/plans/2026-07-23-post-form-location-override.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/working/plans/2026-07-23-post-form-location-override.md b/docs/working/plans/2026-07-23-post-form-location-override.md index 8ee8fae..6f5b0d2 100644 --- a/docs/working/plans/2026-07-23-post-form-location-override.md +++ b/docs/working/plans/2026-07-23-post-form-location-override.md @@ -13,7 +13,7 @@ execution: code **Status:** ✅ Complete (2026-07-24) — U1–U6 shipped, then hardened by a multi-agent code review the same day. The review found the design's stated server-side safety net (`cleanCoordinate()`) had never been committed, so it landed here; replaced a prefix-parsing coordinate check that accepted `48abc` / `48,85` / `35.0116S` (hemisphere silently flipped); closed three paths that bypassed the submit gate (draft restore, edit-mode prefill, map-load failure) because the gate read a CSS class no code set at init; added pin removal on blanked fields; made the geocode failure visible; and rewrote the U5 guard spec, which asserted only instantly-passing conditions and so could not fail. R8 and R13 above are revised accordingly. -**Verified by a green run (2026-07-24).** The suite now executes end-to-end: `test-config` 22/22, `test-post` 6/6, and `location-override.spec.js` **20/20** — so the verifications below are no longer by inspection alone. Reaching that took fixing `make test-account` (the password was interpolated into an `sh -c` string, so a shell metacharacter in it killed every UI run), pinning `test-ui` to this checkout's own port, and repairing test cleanup, which had never been able to delete the root-owned entries Grav's Apache creates. See the commit `fix(test): close the test-entry leak into real trip content`. +**Verified by a green run (2026-07-24).** The suite now executes end-to-end: `test-config` 22/22, `test-post` 6/6 (the `scripts/test-post.sh` shell suite — *not* the Playwright specs under `tests/ui/post/`, which is a separate set), and `location-override.spec.js` **20/20** — so the verifications below are no longer by inspection alone. Reaching that took fixing `make test-account` (the password was interpolated into an `sh -c` string, so a shell metacharacter in it killed every UI run), pinning `test-ui` to this checkout's own port, and repairing test cleanup, which had never been able to delete the root-owned entries Grav's Apache creates. See the commit `fix(test): close the test-entry leak into real trip content`. Also landed after the review: maplibre's stylesheet is now lazy-``ed at panel-open instead of statically bundled, cutting `post-form.css` from 92,244 to 26,784 raw bytes (14,528 → 5,631 gzip) on every `/post` load, with a new spec asserting both halves of that boundary. @@ -22,6 +22,10 @@ Also landed after the review: maplibre's stylesheet is now lazy-``ed at pa - This worktree's `user/` branch has diverged from `user/`'s `main`, which is *ahead* on content — notably `denmark-2026` is `published: false` here but `true` on main. That 404s the active trip and cascades through the post specs, so the worktree carries an uncommitted local `published: true` for testing. Bring `user/` up to `main` before merging rather than committing that flip. - Remaining UI failures are pre-existing on `main`, not from this branch: `site.yaml` pins `owner_username` to a real account while the suite authenticates as `testrunner`, so owner-only controls never render for it. Only `trip-publish.spec.js` patches that; `delete-flow`, `edit-mode` and `anon-view` do not. Separate branch. - `make` is entirely broken in the **main** checkout: `-include .env` parses `.env` as makefile syntax and line 6 aborts with `*** missing separator`. Needs a value on that line fixed (or the loading approach changed) — not readable from here by policy. +- **Three specs under `tests/ui/post/` fail on real, pre-existing defects** (found while reviewing main's uncommitted work; headers now record each, left red rather than skipped): + - **UG2 — unguarded silent data loss, the one worth fixing first.** A photo whose upload fails keeps its thumbnail, satisfies the ≥1-photo validation, and the entry posts without the photo. `post-form.js`'s only create-form submit guard is `converting > 0` (pre-FilePond HEIC conversion); FilePond item state is never consulted at submit time. Directly relevant to posting from the road on a weak connection. + - **UG1** — same missing gate, in-flight rather than failed. Both fail as `.photo-convert-status` "element(s) not found", because `photoStatusEl()` only ever runs from the HEIC paths. + - **LD1** — EXIF-rotated photos still squeeze in the lightbox. `partials/entry-journal.html.twig:48-49` emits `{{ img.width }}`/`{{ img.height }}` (raw `getimagesize()`, orientation ignored) while the slide links the original, which browsers render rotated. Needs dimensions from a medium Grav has already oriented; **not verifiable locally** — the dev container has no php-exif, so `auto_fix_orientation` never applies. ## Goal Capsule