feat: shelf lifecycle — completion harvest, cancel prune, copy-from — PR 2 of 2 (#254) #256
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/shelf-lifecycle"
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?
PR 2 (lifecycle) of the Session Reference Shelf carry-forward feature (#254), completing the design signed off earlier. No migration (reuses PR 1's
notes_harvested_at).Completion harvest
When a session completes — both the GM
complete_sessionpath and the auto-complete Beat task — each wiki card's tonight-notes are copied into that entry's GM notes (tagged with the session), once per card (idempotent vianotes_harvested_at). The shelf's live scratch notes become durable canon.Cancel prune
Cancelling a session (GM cancel + series bulk-cancel) drops carried-forward cards that have no notes, while keeping session-specific work: manually-added cards, any card with notes, and cards pinned from that session. So a cancelled session doesn't retain a shelf it never used, but real prep is never lost.
Copy-from-session
POST /api/sessions/{id}/shelf/copy-from/{source}pulls another session's cards onto this one as one-off cards (same campaign, respecting the one-wiki-card rule) — for rescheduling or reviving a cancelled session's work. Surfaced as a "Copy from…" picker in the shelf header and empty state.Verified
Closes #254. Part of #235.
🤖 Generated with Claude Code
PR 2 (lifecycle) of the carry-forward feature. No migration (reuses PR 1's notes_harvested_at column). - Completion harvest: when a session completes — GM `complete_session` and the auto-complete Beat task both — each wiki card's tonight-notes are copied into the entry's GM notes (tagged, once per card). - Cancel prune: cancelling a session (`cancel_session` + series bulk-cancel) drops carried-forward cards with no notes, keeping manual cards, noted cards, and cards pinned from that session. - Copy-from: POST /api/sessions/{id}/shelf/copy-from/{source} pulls another session's cards in as one-off cards (same campaign, dedup-respecting) — for rescheduling / reviving a cancelled session's work. - 16 new tests (67 across shelf + sessions, no regressions). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>