Skip to content

fix(dashboard): reliable reopen + "Sync Everything Now" button#74

Merged
keyxmakerx merged 1 commit into
mainfrom
claude/chronicle-sheet-sync-j2m9s4
Jun 28, 2026
Merged

fix(dashboard): reliable reopen + "Sync Everything Now" button#74
keyxmakerx merged 1 commit into
mainfrom
claude/chronicle-sheet-sync-j2m9s4

Conversation

@keyxmakerx

@keyxmakerx keyxmakerx commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Cites: user-reported bugs — "sometimes I can't reopen the dashboard" + "the resync button should resync everything, not just journals"
Security implication: none — UI lifecycle + composing existing sync operations
Consumer-verified: n/a (Foundry-side)
Foundry compatibility: ApplicationV2 lifecycle; not version-gated
Mockup: n/a

What this changes

Two dashboard fixes from the same feedback round.

1. Reliable reopen. The dashboard was a single ApplicationV2 instance re-rendered on every open; after a close that interrupts an in-flight render it could be left non-re-renderable, so reopening intermittently did nothing. A module-level openDashboard() now brings an open window to front, else builds + (re)binds + renders a fresh instance (mirrors the Sync Calendar singleton). All open sites route through it; module.api.dashboard is a live getter.

2. "Sync Everything Now". The Overview quick-action only ran a journal resync — so after a manifest/path change, character field data (and inventory/notes) stayed stale despite the button implying a full sync. It now resyncs all journals + every linked character (ActorSync.repushActor) + all maps under one confirm, with per-item error isolation. Unlinked actors stay on the Characters tab's "Push All Actors" (that operation creates entities and shouldn't be bundled into a routine refresh).

Why

Both block the operator loop: the dashboard is how a GM reopens, re-syncs, and copies the capability report; and a journal-only "resync" is why a character's freshly-corrected fields never refreshed.

Test plan

  • node tools/test-*.mjs — full suite passes (35 files, 0 failures); dashboard + template-roots re-run after this change
  • node -c scripts/module.mjs / scripts/sync-dashboard.mjs
  • Manual in Foundry: rapid close/reopen always works; "Sync Everything Now" refreshes a linked character's stale fields, then re-render shows fresh data
  • CI passes

Tenet self-check

  • T-B1 security: no token/URL/auth changes
  • T-B2 plugin isolation: changes stay within this module
  • T-B3 production UI: window lifecycle hardened; one confirm + completion toast; per-item failure isolation
  • T-B4 dual-audience docs: WHY documented at both helpers

Stop-and-flag

Flag any tenet violation by number during review.

🤖 Generated with Claude Code

The Sync Dashboard is a single ApplicationV2 instance created at init and
re-rendered on every open. After a close — especially one that interrupts
an in-flight render — that instance can be left in a non-re-renderable
state, so reopening it intermittently did nothing ("can't reopen the
dashboard").

Adopt the proven SyncCalendar singleton pattern: a module-level
openDashboard() brings an already-open window to the front, otherwise
builds, (re)binds, and renders a FRESH instance. bind() only sets a
reference, so recreating leaks nothing. All four open sites (scene-control
tool, sidebar click + right-click, module.api.openDashboard) route through
it; module.api.dashboard becomes a live getter so it never goes stale.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LaDDiXB5GTVurEzJwYYopf
@keyxmakerx keyxmakerx merged commit 3585894 into main Jun 28, 2026
1 check passed
@keyxmakerx keyxmakerx changed the title fix(dashboard): reliably reopen after close fix(dashboard): reliable reopen + "Sync Everything Now" button Jun 28, 2026
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