From 58242987c88eec16cc849ec6fb547f53cecf3cbe Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Wed, 30 Sep 2026 21:07:37 +0000 Subject: [PATCH] PosterWall: a headerAction seam for the card's header sticker The sticker on every poster card was hard-wired to "Show on map". A wall with no map beside it (a gallery of poster templates) needs the same card with a different action, and a fork of the card would drift from the wall. headerAction null (the default) renders the existing toggle unchanged: the same markup, aria-pressed, the is-last highlight and the window event, so every current wall is untouched. { labelKey, ariaKey } renders a plain button labelled from those keys that emits 'header-action' with the item and dispatches no window event. check:poster-wall-header-action (gates:pre) mounts the real PosterWall headlessly on a recording renderer and calls the sticker's onClick in both modes. Four mutants fail it: no seam, a new branch that also dispatches, a default that emits, and aria-pressed on the new branch. --- internal/check-poster-wall-header-action.mjs | 200 +++++++++++++++++++ library/components/poster/PosterWall.vue | 16 +- package.json | 4 +- 3 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 internal/check-poster-wall-header-action.mjs diff --git a/internal/check-poster-wall-header-action.mjs b/internal/check-poster-wall-header-action.mjs new file mode 100644 index 000000000..e5bbb8b86 --- /dev/null +++ b/internal/check-poster-wall-header-action.mjs @@ -0,0 +1,200 @@ +#!/usr/bin/env node +/** + * check-poster-wall-header-action.mjs: PosterWall's header sticker does what its headerAction prop says. + * + * WHY. PosterWall's card header was hard-wired to "Show on map". A wall with no map beside it (the + * Poster Design gallery) needs the same card with a different action, so the header became a seam: + * headerAction null (the default) keeps the "Show on map" TOGGLE; { labelKey, ariaKey } makes it a + * plain button that emits 'header-action'. Every existing wall passes nothing, so the default path is + * the one that must not move, and the new path must not leak the old one's side effects (a window + * event a map would act on, aria-pressed, the is-last highlight). + * + * HOW. No browser (fleet policy). PosterWall has no