Shelf: carry-forward pins + session navigation (Workbench access, session switcher) #254

Closed
opened 2026-07-22 16:21:53 +00:00 by claude-bot · 1 comment
Contributor

The manual carry-forward spine for the Session Reference Shelf (#235) — the mechanism #247/#248 build on. Agreed design from a detailed discussion.

Pin / carry-forward model

A pinned card is an interval over the campaign's session timeline (ordered by scheduled date; proposed sessions count as future, undated ones sort to the end):

  • Pin in session A → active [A, ∞) → the card appears on A and every later session automatically, including sessions created later. Forward only.
  • Unpin in session D → interval becomes [A, D] (inclusive). Sessions after D lose the card even if already materialized; the removed future cards' tonight-notes are appended to the wiki entry's GM notes (tagged as from an unpinned card). Generated-card notes on removed future sessions are dropped.

Rules

  • Freshness: wiki-sourced cards render live wiki content each session; generated cards stay frozen to their snapshot.
  • Uniqueness: at most one card per wiki entry per session shelf (enforced for manual adds + carry-forward). Generated cards aren't deduped.
  • Completion harvest: when a session flips to completed, each wiki card's tonight-notes are copied into that entry's GM notes (tagged with the session), once (idempotent).
  • Cancel: a canceled session is excluded from carry-forward and is not a boundary (pins skip it to the next live session). Its shelf is preserved only if it has session-specific work (a manually-added card, or any card with notes); layout-only differences aren't retained. Un-canceling re-materializes active pins. Canceled sessions don't harvest to GM notes.

Navigation

  • Session Shelf entry point from the GM Workbench (→ current/next session's shelf).
  • Session switcher in the shelf header to jump between sessions' shelves.
  • Copy cards from another session… action (pulls a session's cards in, respecting the one-wiki-card rule) — covers rescheduling / reviving a canceled session's work.

Storage sketch

  • New shelf_pins table (campaign-scoped): content ref + start session + optional end session; "covers session S" computed live by scheduled-date order.
  • shelf_cards gains pin_id (carried instance vs one-off) + notes_harvested_at.
  • Partial unique index on shelf_cards (session_id, lore_entry_id).

Phasing

  • PR 1 (core): navigation (Workbench link + switcher), pins + carry-forward, live-wiki rendering, uniqueness, unpin note-migration.
  • PR 2 (lifecycle): completion note-harvest, cancel handling, copy-from-session.

Relates to #235; underpins the carry-forward parts of #247 and #248.

The manual carry-forward spine for the Session Reference Shelf (#235) — the mechanism #247/#248 build on. Agreed design from a detailed discussion. ## Pin / carry-forward model A pinned card is an **interval over the campaign's session timeline** (ordered by scheduled date; proposed sessions count as future, undated ones sort to the end): - **Pin** in session A → active `[A, ∞)` → the card appears on A and every later session automatically, including sessions created later. Forward only. - **Unpin** in session D → interval becomes `[A, D]` (inclusive). Sessions after D lose the card even if already materialized; the removed future cards' tonight-notes are appended to the wiki entry's **GM notes** (tagged as from an unpinned card). Generated-card notes on removed future sessions are dropped. ## Rules - **Freshness:** wiki-sourced cards render **live** wiki content each session; generated cards stay frozen to their snapshot. - **Uniqueness:** at most **one card per wiki entry per session shelf** (enforced for manual adds + carry-forward). Generated cards aren't deduped. - **Completion harvest:** when a session flips to *completed*, each wiki card's tonight-notes are **copied** into that entry's GM notes (tagged with the session), once (idempotent). - **Cancel:** a canceled session is excluded from carry-forward and is not a boundary (pins skip it to the next live session). Its shelf is preserved only if it has session-specific work (a manually-added card, or any card with notes); layout-only differences aren't retained. Un-canceling re-materializes active pins. Canceled sessions don't harvest to GM notes. ## Navigation - **Session Shelf** entry point from the GM Workbench (→ current/next session's shelf). - **Session switcher** in the shelf header to jump between sessions' shelves. - **Copy cards from another session…** action (pulls a session's cards in, respecting the one-wiki-card rule) — covers rescheduling / reviving a canceled session's work. ## Storage sketch - New `shelf_pins` table (campaign-scoped): content ref + start session + optional end session; "covers session S" computed live by scheduled-date order. - `shelf_cards` gains `pin_id` (carried instance vs one-off) + `notes_harvested_at`. - Partial unique index on `shelf_cards (session_id, lore_entry_id)`. ## Phasing - **PR 1 (core):** navigation (Workbench link + switcher), pins + carry-forward, live-wiki rendering, uniqueness, unpin note-migration. - **PR 2 (lifecycle):** completion note-harvest, cancel handling, copy-from-session. Relates to #235; underpins the carry-forward parts of #247 and #248.
Author
Contributor

PR 1 (core) merged#255. Live on main + dev:

  • ShelfPin interval model + migration b7c8d9e0f1a2, lazy carry-forward materialization (by scheduled-date order, canceled sessions skipped), pin/unpin with unpin note-migration, live-wiki rendering, one-wiki-card-per-session uniqueness.
  • Frontend: pin toggle + "· carried" marker, session switcher, Workbench "Session Shelf" launcher.
  • 16 shelf tests vs real Postgres; full suite green.

Remaining — PR 2 (lifecycle): completion note-harvest (wiki cards' tonight-notes → GM notes when a session completes, hooking both complete_session and the auto-complete task), cancel handling (preserve session-specific cards, exclude from carry-forward), and the "Copy cards from another session…" action. Closing #254 with PR 2.

**PR 1 (core) merged** — #255. Live on `main` + dev: - `ShelfPin` interval model + migration `b7c8d9e0f1a2`, lazy carry-forward materialization (by scheduled-date order, canceled sessions skipped), pin/unpin with unpin note-migration, live-wiki rendering, one-wiki-card-per-session uniqueness. - Frontend: pin toggle + "· carried" marker, session switcher, Workbench "Session Shelf" launcher. - 16 shelf tests vs real Postgres; full suite green. **Remaining — PR 2 (lifecycle):** completion note-harvest (wiki cards' tonight-notes → GM notes when a session completes, hooking both `complete_session` and the auto-complete task), cancel handling (preserve session-specific cards, exclude from carry-forward), and the "Copy cards from another session…" action. Closing #254 with PR 2.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Quest-Board#254
No description provided.