Shelf: scene packs #244
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Let the GM bundle ShelfCards into named scenes during prep and swap the shelf's active scene in one tap during play; cards keep their positions. (#235)
Done — merged in PR #264 (
c699721), CI green.Scene packs turned out to need no new table and no migration: the
scenetag has been onShelfCardsince #239, so a scene is simply the set of cards carrying that name. Creating one is tagging a card; a scene stops existing when its last card leaves it. The scene bar is derived from the cards themselves.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 — a scene bar (
All/ per-scene chips with counts /Unfiled), hidden entirely until something is tagged so an untagged shelf looks as it did; and a per-card scene picker with+ New scene….The interesting part was the guardrail. Filtering hides cards, it never moves them — a hidden card's stored x/y is untouched, so swapping back restores the exact layout the GM left (#235's "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 between scenes.
Three surfaces that index the board had to follow:
1–9and the stage's prev/next walk the visible scene, so "the Nth card" means the Nth one on screen.Tested: backend 777 passed (1 new case covering strip / leave-unchanged / clear), frontend 413 passed (new
SessionShelf.test.jsx, 7 cases), ruff + eslint clean.🤖 Generated with Claude Code