Shelf: scene packs — bundle cards into scenes, swap the board (#244) #264
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/v3.11-scene-packs"
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?
Closes #244.
Bundle shelf cards into named scenes during prep, then swap the board's scene in one tap during play.
Approach
A "scene" is just the free-text
scenetag that has been onShelfCardsince #239 — no new table and no migration. Creating a scene is tagging a card; a scene stops existing when its last card leaves it. The scene bar is derived from the cards themselves.Filtering hides cards, it never moves them. A hidden card's stored
x/yis untouched, so swapping back to a scene restores the exact layout the GM left — the spatial-memory guardrail from #235 ("never auto-move the GM's cards"). Cards also keep their index in the full list while filtered, so a never-placed card's cascade fallback position doesn't drift as scenes change.Backend
One real gap: every field on
ShelfCardUpdateusesNonefor "leave unchanged", so a card could join a scene and never leave it. An empty/blank string is now the clear sentinel, and names are stored stripped so" Docks"and"Docks"are one chip rather than two.Frontend
All/ one chip per scene /Unfiled, each with a count. Hidden entirely until at least one card is tagged, so an untagged shelf looks exactly as it does today.+ New scene…, which swaps in a text input. MatchesCopyFromSelect's idiom and stays keyboard-reachable on a card.Threaded through the surfaces that index the board:
1–9and the stage's prev/next walk the visible scene, so "the Nth card" means the Nth one on screen.Testing
All run locally in containers matching the CI jobs:
777 passed(full suite); newtest_scene_is_stripped_and_cleared_by_empty_stringcovers strip, leave-unchanged, and the clear sentinel.413 passed(full suite); newSessionShelf.test.jsxwith 7 cases covering chip derivation, the no-scene-bar case, scene swapping,Unfiled, returning toAll, tagging, and clearing.ruff check/ruff format --checkclean;eslintclean (the one warning is pre-existing inCampaignDetail.jsx).🤖 Generated with Claude Code