Loading…
Reference in a new issue
No description provided.
Delete branch "feat/v3.11-session-shelf"
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?
Session Reference Shelf — v3.11 MVP
The first slice of the Session Reference Shelf epic (#235): a per-session surface a GM keeps open during play, holding generated content and pinned wiki entries as freeform, draggable cards.
What's in this PR
#239 — Data model + API
ShelfCardmodel + migration5a6b7c8d9e0f(shelf_cardstable). Each card belongs to a session, references aGenerationResultor aLoreEntryviaSET NULLFKs (cards survive retention pruning), and carries a self-sufficientsnapshotso it renders even if the source is gone.position(JSONB),tonight_notes,scene, and acard_kindCHECK (generation/lore/note)./api/sessions/{id}/shelfvia theget_session_for_gmdependency (a non-GM gets 403). Cross-campaign sources are rejected (422).#240 — Board surface
/sessions/:id/shelf: cards laid out freeform (never auto-reflowed), pointer-drag to reposition (persisted best-effort), inline tonight-notes, remove, and an empty state. Linked from SessionDetail (GM only).#241 — Add to shelf
AddToShelfcontrol: a session picker (defaulting to the campaign's in-progress, else next upcoming, session) + an "Add to shelf" button.card_kind=generation) and in the wiki entry's GM action row (card_kind=lore). Renders nothing when the campaign has no upcoming session to pin to.Notes
5a6b7c8d9e0f.Closes #239, closes #240, closes #241. Part of #235.
🤖 Generated with Claude Code
Shelf cards were fixed-width with a 6-line clamp that truncated longer entries. Cards now have explicit width/height, a scrollable body (no clamp), and a corner grip to resize; geometry (x/y/w/h) persists in `position` alongside placement, best-effort like drag. Header drag = move, grip = resize, sharing one pointer gesture. Also add a `vite:preloadError` handler in main.jsx: when a redeploy rotates asset hashes, a stale tab's lazy route import 404s ("error loading dynamically imported module …"). Reload once (time-guarded against loops) to pull fresh hashes instead of dead-ending on the error boundary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>