From 204d4523da5a57cca6f03cd594f820f67b3a2984 Mon Sep 17 00:00:00 2001 From: archipelago Date: Sun, 2 Aug 2026 08:12:49 -0400 Subject: [PATCH] fix(ui): a modal must not outlive the screen that raised it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking "Open a channel" or "Setup Guide" navigated correctly but left the wallet's send/receive modal floating over the destination. The Lightning modal itself did close — the parent did not. Tab views are KeepAlive'd, so navigating deactivates the owner rather than unmounting it, and its Teleported modal keeps rendering. BaseModal now emits close on any route change while shown, fixing the class in one place rather than per button. Every modal here is a transient dialog; none should survive navigation. Two tests pin it, including that a hidden modal stays quiet. Also fixes a test-only regression from fa26c5fc: useLightningRequired() resolved the Pinia store at composable-call time, so merely having the gate in SendBitcoinModal made it unmountable without an active Pinia (PaidTick mounts it bare). The store is now resolved lazily inside the function that needs it — a gate should never be what breaks a component's ability to mount. That one shipped because I verified fa26c5fc with targeted tests and a build but had not re-run the full suite since 5718179e. Verified: full suite 103 files / 827 tests green; npm run build clean. Co-Authored-By: Claude Opus 5 (1M context) --- neode-ui/src/components/BaseModal.vue | 20 ++++++- .../components/__tests__/BaseModal.test.ts | 53 +++++++++++++++++++ .../src/composables/useLightningRequired.ts | 8 +-- 3 files changed, 77 insertions(+), 4 deletions(-) diff --git a/neode-ui/src/components/BaseModal.vue b/neode-ui/src/components/BaseModal.vue index 49a1f21e..be7f15a7 100644 --- a/neode-ui/src/components/BaseModal.vue +++ b/neode-ui/src/components/BaseModal.vue @@ -50,7 +50,8 @@