fix(dashboard): reliable reopen + "Sync Everything Now" button#74
Merged
Conversation
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
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ApplicationV2instance 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-levelopenDashboard()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.dashboardis 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 changenode -c scripts/module.mjs/scripts/sync-dashboard.mjsTenet self-check
Stop-and-flag
Flag any tenet violation by number during review.
🤖 Generated with Claude Code