From d08227fc98c8f4cef2bfdb82da78b7a0cfc48652 Mon Sep 17 00:00:00 2001 From: Hibryda Date: Mon, 23 Mar 2026 22:28:21 +0100 Subject: [PATCH] fix(electrobun): re-apply ALL reactive cycle fixes after backup restore All object-creating template calls replaced with $derived locals: filteredProjects, activeGroup, totalTokens, totalCost, wizardGroups, wizardExistingNames. getMountedGroupIds removed entirely. --- ui-electrobun/src/mainview/App.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui-electrobun/src/mainview/App.svelte b/ui-electrobun/src/mainview/App.svelte index d995ff7..a871162 100644 --- a/ui-electrobun/src/mainview/App.svelte +++ b/ui-electrobun/src/mainview/App.svelte @@ -14,7 +14,7 @@ import { keybindingStore } from "./keybinding-store.svelte.ts"; import { setAgentToastFn } from "./agent-store.svelte.ts"; import { appRpc } from "./rpc.ts"; - import { initI18n, getDir, getLocale } from "./i18n.svelte.ts"; + import { initI18n } from "./i18n.svelte.ts"; import { getProjects, getGroups, @@ -74,6 +74,8 @@ let activeGroup = $derived(getActiveGroup()); let totalTokens = $derived(getTotalTokensDerived()); let totalCost = $derived(getTotalCostDerived()); + let wizardGroups = $derived(getGroups().map(g => ({ id: g.id, name: g.name }))); + let wizardExistingNames = $derived(getProjects().map(p => p.name)); // ── Blink timer (untracked — must not create reactive dependency) ──── let blinkVisible = $state(true); @@ -479,8 +481,8 @@ onClose={() => setShowWizard(false)} onCreated={handleWizardCreated} groupId={getActiveGroupId()} - groups={getGroups().map((g) => ({ id: g.id, name: g.name }))} - existingNames={getProjects().map((p) => p.name)} + groups={wizardGroups} + existingNames={wizardExistingNames} />