feat: shelf carry-forward pins + session navigation — PR 1 of 2 (#254) #255

Merged
claude-bot merged 3 commits from feat/shelf-carry-forward into main 2026-07-22 17:40:34 +00:00
Contributor

The manual carry-forward spine for the Session Reference Shelf (#254), PR 1 of 2 (core). PR 2 will add the completion note-harvest, cancel handling, and copy-from-session.

Carry-forward pins

A ShelfPin is a campaign-level interval over the session timeline (start session → optional end session, ordered by scheduled date; proposed sessions count as future). Reading a session's shelf lazily materializes every active pin that covers it — one card per pin, deduped against manual cards; canceled sessions are skipped (and aren't a boundary).

  • Pin / unpin — pin icon in each card's title bar. Pin carries the card forward from this session onto every later session automatically. Unpin ends the interval at the current session: later sessions lose the card, and any wiki notes on those dropped cards are swept into the entry's GM notes (tagged). The boundary session keeps its card + notes.
  • Live wiki — lore cards render the current entry content each read; generated cards stay frozen to their snapshot.
  • Uniqueness — one wiki card per session shelf (partial unique index; manual adds are now idempotent). Migration de-dupes any pre-existing duplicates first.

Navigation

  • Session switcher in the shelf header — jump between the campaign's sessions' shelves.
  • "Session Shelf" launcher in the GM Workbench header → the current/next session's shelf.

Notes

  • Migration b7c8d9e0f1a2 (shelf_pins + shelf_cards.pin_id/notes_harvested_at + partial unique index). No bot-contract change.
  • Verified: 16 shelf tests pass against real Postgres; full backend suite green (no regressions); frontend eslint + palette tests clean.

Part of #254 and #235.

🤖 Generated with Claude Code

The manual carry-forward spine for the Session Reference Shelf (#254), PR 1 of 2 (core). PR 2 will add the completion note-harvest, cancel handling, and copy-from-session. ## Carry-forward pins A `ShelfPin` is a campaign-level **interval over the session timeline** (start session → optional end session, ordered by scheduled date; proposed sessions count as future). Reading a session's shelf lazily **materializes** every active pin that covers it — one card per pin, deduped against manual cards; canceled sessions are skipped (and aren't a boundary). - **Pin / unpin** — pin icon in each card's title bar. Pin carries the card forward from this session onto every later session automatically. Unpin ends the interval at the current session: later sessions lose the card, and any wiki notes on those dropped cards are swept into the entry's **GM notes** (tagged). The boundary session keeps its card + notes. - **Live wiki** — lore cards render the **current** entry content each read; generated cards stay frozen to their snapshot. - **Uniqueness** — one wiki card per session shelf (partial unique index; manual adds are now idempotent). Migration de-dupes any pre-existing duplicates first. ## Navigation - **Session switcher** in the shelf header — jump between the campaign's sessions' shelves. - **"Session Shelf"** launcher in the GM Workbench header → the current/next session's shelf. ## Notes - Migration `b7c8d9e0f1a2` (shelf_pins + shelf_cards.pin_id/notes_harvested_at + partial unique index). No bot-contract change. - Verified: 16 shelf tests pass against real Postgres; full backend suite green (no regressions); frontend eslint + palette tests clean. Part of #254 and #235. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The manual carry-forward spine (PR 1). A ShelfPin is a campaign-level interval
over the session timeline (start session → optional end session, ordered by
scheduled date). Reading a session's shelf lazily materializes every active pin
that covers it — one card per pin, deduped against manual cards, canceled
sessions skipped.

- Model: shelf_pins table + shelf_cards.pin_id/notes_harvested_at + a partial
  unique index (one wiki card per session; manual adds are now idempotent).
  Migration b7c8d9e0f1a2 (de-dupes any pre-existing wiki dupes first).
- Live wiki: lore cards render the current entry each read; generated cards
  stay frozen to their snapshot.
- Pin/unpin API: POST .../{card_id}/pin | /unpin. Unpin ends the interval at the
  current session; sessions after it lose the card, and any wiki notes on those
  dropped cards are swept into the entry's GM notes. The boundary session keeps
  its card + notes (those harvest at completion — PR 2).
- 16 endpoint/service tests (carry-forward by date order, unpin truncation +
  note migration, live rendering, uniqueness, canceled-skip, GM-only).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(frontend): shelf pin toggle + session switcher + Workbench access (#254)
Some checks failed
CI / Docker image build (pull_request) Successful in 25s
CI / Backend lint (ruff) (pull_request) Failing after 2m18s
CI / Frontend tests, audit, and build (pull_request) Successful in 2m35s
CI / Bot tests and audit (pull_request) Successful in 4m11s
CI / Backend migration, tests, and audit (pull_request) Successful in 6m23s
3bab960a39
- Pin toggle in each card's title bar (filled when carried forward); a subtle
  "· carried" marker on cards that rode in from an earlier session.
- Session switcher in the shelf header — jump between the campaign's sessions'
  shelves (chronological by scheduled date; undated last).
- "Session Shelf" launcher in the GM Workbench header → the current/next
  session's shelf (reuses AddToShelf's target-session rule).

Lore cards already render live wiki content (served by the backend), so no
client change was needed for freshness.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
style(backend): ruff format the carry-forward migration (#254)
All checks were successful
CI / Backend lint (ruff) (pull_request) Successful in 34s
CI / Docker image build (pull_request) Successful in 38s
CI / Frontend tests, audit, and build (pull_request) Successful in 2m14s
CI / Bot tests and audit (pull_request) Successful in 2m18s
CI / Backend migration, tests, and audit (pull_request) Successful in 4m37s
1e614fbb51
Only red CI job was Backend lint (ruff format) on the hand-written migration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
claude-bot deleted branch feat/shelf-carry-forward 2026-07-22 17:40:34 +00:00
Sign in to join this conversation.
No description provided.