Skip to content

Retire the Chronicle Notes folder sync; set the old folder aside - #135

Merged
keyxmakerx merged 5 commits into
mainfrom
claude/player-notes-1a4r53
Oct 3, 2026
Merged

keyxmakerx merged 5 commits into
mainfrom
claude/player-notes-1a4r53

Conversation

@keyxmakerx

Copy link
Copy Markdown
Owner

Fixes #124
Security implication: none new. This removes a sync path that wrote to Chronicle with the GM's key, and makes no new requests.
Consumer-verified: n/a. Nothing on the wire is added; the module stops calling /notes.
Foundry compatibility: v12–v14. Uses CONST.FOLDER_MAX_DEPTH, journal.update and folder.update only.
Mockup: the signed player-notebook mockup (Sign-offs card mock-player-notebook, "Replace": the old folder is set aside, never deleted). The differences listed below wait on the Sign-offs card diff-notes-folder.

What this changes

Before: a GM who had turned on "Sync Notes" got a "Chronicle Notes" journal folder. It held copies of the notes the GM's key could see. Players' notes never reached Chronicle from there.

After: the player notebook replaces that folder (Chronicle #979, module #126). When the GM loads the world, every note copy is unlinked and marked as an old note, and the folder moves into "Chronicle: removed", the same place every other set-aside journal goes. Nothing is deleted. If the folder tree is nested too deep for Foundry to move it there, it stays where it is, unlinked. The step runs on every load, and on a world that is already done, or never had the folder, it writes nothing.

JournalSync keeps skipping everything in the old folder, plus any marked note the GM moved out of it. So an edit or a new journal there never becomes a Chronicle page. That check used to ask the registered NoteSync; it now lives in a pure helper, isOldNotesJournal.

Also removed, because nothing uses them any more:

  • the "Sync Notes" setting;
  • the dashboard's Notes tab and its Notes row in the sync-direction table;
  • note-sync.mjs and _note-event.mjs;
  • the api-client note helpers.

Why

Key Maker chose "Replace" on the player-notebook mockup, and the rules for this were agreed on #124:

The load-bearing lines:

  • scripts/_notes-folder.mjs: retireNotesFolder and isOldNotesJournal.
  • scripts/module.mjs: the GM-only call, made before syncManager.start().
  • scripts/journal-sync.mjs: the three exclusion sites now call isOldNotesJournal.

Visible differences from the mockup

These are on the Sign-offs card, and this PR waits on it:

  1. The "Sync Notes" checkbox leaves module settings.
  2. The dashboard loses its Notes tab and the Notes row in its sync-direction table.
  3. A folder nested too deep for Foundry stays where it is instead of moving into "Chronicle: removed".

Test plan

  • node --test tools/test-*.mjs: 1004 pass, 0 fail. The new tools/test-notes-folder.mjs has 7 tests: unlink and move, idempotent rerun, a world with no old notes makes no writes, a too-deep tree stays put, a folder the GM filed elsewhere stays put, the exclusion, and the flag strip.
  • node tools/check-package-descriptor.mjs passes.
  • CHRONICLE_DIR=../Chronicle bench/run.sh notes journals: 13 pass, 0 fail, against Chronicle main at 36f75948. The new scenario, "a world with the old Chronicle Notes folder opens and reopens with no duplicates and no Chronicle writes", checks five things:
    • first open makes no Chronicle writes;
    • GM edits and a new journal in the old folder make no writes;
    • reopen makes no writes;
    • there are no duplicate journals and only one removed folder;
    • no Chronicle pages are made.
      With the exclusion switched off, it fails on "edits in the old folder stay in Foundry".
  • Manual verification in Foundry: covered by the live checks in Live test session on Foundry v14 (after TESTING.md is brought up to date) #94.
  • CI passes

Tenet self-check

  • T-B1 security: removes a write path. No new auth, tokens or URLs.
  • T-B2 plugin isolation: module-only.
  • T-B3 production UI: no new UI. The removed tab and setting are listed on the Sign-offs card.
  • T-B4 dual-audience docs: .ai.md, API-CONTRACT.md, CALENDARIA-INTEGRATION.md, TESTING.md and CLAUDE.md now describe the notes folder as set aside.

Generated by Claude Code

claude added 3 commits October 3, 2026 15:47
The player notebook replaced the note sync that copied notes into a
"Chronicle Notes" journal folder. On the GM's world load, every note copy is
now unlinked and marked as an old note, and the folder tree moves into
"Chronicle: removed" when Foundry's folder depth allows. Nothing is deleted,
and running it again writes nothing. JournalSync keeps skipping all of it
through a pure helper, so nothing in the old folder becomes a Chronicle page.

Removes NoteSync, its "Sync Notes" setting, the dashboard's Notes tab and
Notes direction row, and the unused note API helpers.

Fixes #124

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BBSXLMRV7e3xvdqWbfELg7
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BBSXLMRV7e3xvdqWbfELg7
@keyxmakerx
keyxmakerx marked this pull request as ready for review October 3, 2026 17:02
claude added 2 commits October 3, 2026 17:18
…a4r53

# Conflicts:
#	.ai.md
#	CLAUDE.md
#	scripts/module.mjs
keyxmakerx pushed a commit that referenced this pull request Oct 3, 2026
…up's edits

Keeps module PR #134 merging cleanly whether it lands before or after the
notes changes in #135.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011hzkeAmSZQx5cQw5QL3ngM
@keyxmakerx
keyxmakerx merged commit 6968115 into main Oct 3, 2026
3 checks passed
@keyxmakerx
keyxmakerx deleted the claude/player-notes-1a4r53 branch October 3, 2026 22:29
@keyxmakerx keyxmakerx mentioned this pull request Oct 3, 2026
5 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retire the Chronicle Notes journal-folder sync

2 participants