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.
This commit is contained in:
Hibryda 2026-03-23 22:28:21 +01:00
parent 86251f9d92
commit d08227fc98

View file

@ -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}
/>
</div>