Repository navigation
Expose core-modal-open signal to extensions (shell.modalOpen) - #3865
Merged
Merged
Conversation
Core's hand-rolled modals (first-launch wizard, delete confirmation, subtree-access-denied) register through a coreModal action that releases on destroy; the host API reads it through a reactive shell.modalOpen getter. Refs #3837 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mstomar125
force-pushed
the
issue-3837-core-modal-signal
branch
from
October 22, 2026 06:20
1008316 to
d7e51a9
Compare
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.
Refs #3837
What
Fix 2 of the issue: a signal for extensions that a core modal is open.
shell.modalOpen(new, in@nodespace/extension-api): a reactive boolean getter, true while any core modal is on screen. Reads in a$derivedor a contribution'swhen()re-run when it flips.stores/core-modal-presence.svelte.ts(a set of registrations, released at most once each) and acoreModalSvelte action (actions/core-modal.ts) that registers on mount and releases indestroy. The signal therefore follows the{#if}that shows the modal and cannot stick on after close, unmount or teardown. The action is deliberately not exported to extensions, so an extension's ownfocusTrapmodal does not count as core's.delete-confirmation-modal,subtree-access-denied-modal(the three hand-rolledaria-modaloverlays).API addition, needs architect ack
shell/ExtensionShellis a new additive export of the host API (one readonly getter). No existing export changes.Tests
tests/components/core-modal-signal.svelte.test.ts(6): registration semantics incl. double release, reactivity in a derivation, and each of the three modals on/off, plus unmount while open. Mutation-checked: removinguse:coreModalfrom each modal fails its tests.Not done
architecture/extension-points.md), not edited here. Proposed text for a maintainer to add under theapp-shell-modalslot:Dialog/Sheet(import options, database name dialog, nested property modal, relationship viewer modal, play viewer, settings dialogs) do not register yet; the signal covers the three hand-rolled overlays named in the issue. They can adoptuse:coreModalor an equivalent effect in a follow-up.role=dialog,aria-modal) is a popover over the editor, not registered.🤖 Generated with Claude Code