From 326154f2b29a03c80c43b6540db7308a115ffeb7 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Sun, 25 Jan 2026 01:48:34 -0800 Subject: [PATCH] refactor: extract early bootstrap logic to bootstrapStore - Add useBootstrapStore to centralize early initialization (api.init, fetchNodeDefs) - Move settings loading and custom nodes i18n loading to store bootstrap phase - Use VueUse's `until` to coordinate async dependencies in GraphCanvas - Load settings, i18n, and newUserService initialization in parallel where possible - Add unit tests for bootstrapStore Amp-Thread-ID: https://ampcode.com/threads/T-019bf48d-af90-738f-99ce-46309e4be688 Co-authored-by: Amp --- src/components/graph/GraphCanvas.vue | 57 ++++++++------ src/main.ts | 8 ++ src/stores/bootstrapStore.test.ts | 68 ++++++++++++++++ src/stores/bootstrapStore.ts | 112 +++++++++++++++++++++++++++ 4 files changed, 222 insertions(+), 23 deletions(-) create mode 100644 src/stores/bootstrapStore.test.ts create mode 100644 src/stores/bootstrapStore.ts diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index 370665899..c7aa38aa4 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -93,7 +93,7 @@