feat(web): unify selection mode across media walls (ADR 0099) #914
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/unified-selection-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ADR 0099 implementation: uniform selection-mode semantics on every selectable MediaGrid wall
Decision points → changes
1. Click-to-toggle everywhere
MediaGrid.svelte:612: removed the!checkboxOnlySelectionbypass —handleMediaClicknow routes every short click/tap to selection toggle whenever a selection is active, on every selectable wall. With no selection, per-wall defaults (detail overlay) are unchanged, so curation openability is preserved.checkboxOnlySelectionprop entirely (:57-62 contract removed;sweepAvailablegate :179 simplified; all internal uses removed).2. Drag-sweep everywhere
selectionSweep; eligibility unchanged (selection already active at pointerdown, long-press entry ends that gesture, headers/gaps/placeholders inert, touch scroll inside selection starts on non-tile points).DiscoveryInstanceDetail.svelte(curation wall serving /explore/people/*, plants, etc.): droppedcheckboxOnlySelection={true}, wiredselectionSweep={sweepSelectedMedia}with a batched commit (:696-712 — set-union add / set-filtered remove, anchor maintained, one state update per rAF batch).albums/[albumId]/+page.svelte: wiredselectionSweepthe same way (:137-153, :490), gated onselectionBusy.3. People-page bug fixed
On the people/instance page, clicking another image while a selection was active opened the detail overlay instead of toggling. This was the sole
checkboxOnlySelectionconsumer (added deliberately 2026-09-22) contradicting spec 21h; the bypass is gone and the curation wall now follows the uniform rule.4. Out of scope (unchanged)
Album suggestion-review grid keeps its domain action semantics; the tentative-candidate list keeps explicit selection-mode semantics; checkboxes, section toggles, keyboard selection, long-press entry,
alwaysShowSelectionControlsall unchanged.5. Cleanup
Deleted the dead
routes/explore/people/[personRecordId]/+page.svelte(308-redirected by +page.ts since S032T006). SvelteKit builds fine with the +page.ts-only redirect route — verified.Spec/ADR artifacts
specs/001-v1-baseline/ux-capability-matrix.mditem 11: rescoped from "timeline opt-in" to every selectable wall incl. curation surfaces.specs/001-v1-baseline/spec.jsonSC-21i3: same rescope, eligibility details preserved (spec-query CLI).accepted.Tests
tests/instance-remove-mode.spec.ts: flipped the enshrined exception — with an active selection, clicking tile B now yields2 selectedwith nomedia=param; companion assertion proves no-selection clicks still open the overlay; added touch sweep (mobile), desktop mouse sweep, and sweep-deselect cases.tests/albums.spec.ts: new album-detail test — no-selection click opens overlay, click-while-selected toggles, touch + mouse sweep select, backward sweep deselects.Validation
npm run check: 0 errors (18 pre-existing warnings).npm run build: success.npx playwright test tests/timeline.spec.ts tests/instance-remove-mode.spec.ts tests/discovery-domain-selection.spec.ts tests/albums.spec.ts(desktop + Pixel 7): 152 passed, 14 skipped, 0 failed, 0 flaky.