One notes model: just me and the GM, the table, GMs only — with history; the journal entry stops (D30, D97, D98, D106, lane 4) #811
Loading…
Reference in a new issue
No description provided.
Delete branch "build/lane4-notes"
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?
Lane 4 (#730).
⚠ For self-hosters: GMs can now read every session note, including notes that were private before (D97, D106)
The owner decided this on 2026-09-24: nothing is hidden from a campaign's GMs, and that includes notes written before the upgrade.
/notenow says "Your GM can read them."The model
session_notes.visibilityis nowmine,tableorgm(text with a CHECK; the enum type is dropped).mineis one per person per session.tableandgmare one shared note per session, withupdated_byfor "Last changed by Marcus on Tuesday".Every save of a shared note is kept.
session_note_versionsis built on #808'sTextVersionMixin, and any version can be put back.The data migration:
mine;sessions.session_notesand every GM's public note, including the journal task's entries, become the table note;Several sources are joined under
— {name}lines, so no words are lost and it's clear who wrote what.sessions.session_notesis dropped.Session.session_notesis now a read-onlycolumn_propertyholding the table note, so the session response, the bot's summary and the export keep working.The downgrade keeps every word. The table note goes back to the column. The GMs-only note goes to its creator's private note, never to a public one, so a downgrade can't expose GMs-only notes to players.
Endpoints
GET /api/sessions/{id}/notes:{mine, table};{mine, table, gm, players}, whereplayersis every player's own note (D97/D106).PUT /api/sessions/{id}/notes/{audience}takes{content, expected_updated_at, source}.current, so the page can offer "Show me his".gmgets a 403.minegets a 422: "A GM's notes are for GMs only or the table."GET …/notes/{audience}/versionsandPOST …/put-back, fortable(any member) andgm(GMs).Compatibility until lane 4's pages replace the old ones
session_notesandPATCH {session_notes}read and write the table note, with a version./my-notesand/my-notekeep their shapes./campaigns/{id}/my-notes) answers from the notes.pages/Sessions.jsx's "Move these notes" writes the target's table note, recorded as amovedversion./noteappends to your own note, or to the GMs-only note for a GM./recaplabels the field "Table notes". The request and response shapes are unchanged, so there's no contract bump.The journal entry stops (D98)
Migration
e9a0b1c2d3f4, chained afterd6e7f8a9b1c2(#810). The single-head pin moved totest_notes_migration.Checks, on the tree merged with main (#807–#810)
db.getlazy-loaded the new column outside the greenlet. That's fixed inc5967d4c, and those modules pass (107).🤖 Generated with Claude Code
The Sessions list's merge read the GM's own public note from the cancelled session and wrote it as the GM's public note on the target. Both are the table note now: it reads the source's table note through GET /api/sessions/{id}/notes and saves it over the target's with PUT .../notes/table, source "moved", so the target's history says where the text came from. The modal says it replaces the target's table note, and the save claims the version it is replacing rather than being refused for it. api/sessions.js gains fetchSessionNotes and saveSessionNote for the new endpoints; fetchMyNotes and upsertMyNote stay for the old session page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>