Skip to content

feat: Resync All Journals button — re-pull + update existing journals (incl. permissions)#68

Merged
keyxmakerx merged 1 commit into
mainfrom
claude/gallant-johnson-kd574n
Jun 21, 2026
Merged

feat: Resync All Journals button — re-pull + update existing journals (incl. permissions)#68
keyxmakerx merged 1 commit into
mainfrom
claude/gallant-johnson-kd574n

Conversation

@keyxmakerx

Copy link
Copy Markdown
Owner

Cites: 2026-05-21-core-tenets §T-B1 (fail-closed visibility preserved).
Security implication: none new — the resync re-runs the existing fail-closed _buildOwnership; it never over-shares.

What this changes

Adds a "Resync All Journals" dashboard button (mirrors the existing "Resync All Maps"). Unlike "Pull All" — which only creates journals for entities that don't have one yet — this re-pulls every Chronicle entity and updates existing journals (content + ownership/permissions). So journals that synced before a permission change (e.g. after the #67/#488 permission-sync fix) get corrected in one click instead of re-saving each entity.

  • New JournalSync.resyncAll({verbose}) — updates existing (re-runs _buildOwnership so permissions refresh) + creates missing; respects _syncing/_isExcluded/_isHandledByActorSync; per-entity error isolation; returns {updated, created, skipped, errors}.
  • Dashboard resync-all-journals action + confirm dialog + an Entities-tab button + lang strings.

Why

After the permission-sync fix, there was no one-click way to refresh existing journals' permissions — re-saving each entity was the only option. This closes that gap (and gives a general "force a full refresh" button).

Test plan

  • node --test: 497 pass, 0 fail (+12 new tests)
  • CI confirms

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y14Y6VXb7iB2xcNrYNDJa5


Generated by Claude Code

…missions

Add a "Resync All Journals" action that re-pulls every Chronicle entity and
applies it to Foundry: updating existing journals (name, content, AND
permissions via _buildOwnership) as well as creating missing ones.

Unlike "Pull All" which only creates journals for chronicle-only entities,
resyncAll() fixes journals with stale permissions — the gap users hit after
changing Chronicle visibility settings.

Mirrors the MapSync.resyncAll / resync-all-maps pattern exactly:
- JournalSync.resyncAll({verbose}) — paginated entity fetch, sequential
  update-or-create loop, honors _isExcluded / _isHandledByActorSync /
  _syncing guard, returns {updated,created,skipped,errors}.
- Dashboard action 'resync-all-journals' with confirm dialog.
- "Resync All Journals" button in the Entities tab toolbar.
- Lang keys CHRONICLE.Dashboard.Entities.ResyncAllJournals/.Hint.
- 12 new node:test tests in tools/test-journal-resync-all.mjs.

Full suite: 497 tests, 0 failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y14Y6VXb7iB2xcNrYNDJa5
@keyxmakerx
keyxmakerx merged commit cab2611 into main Jun 21, 2026
1 check passed
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.

2 participants