From 5e5f02c67d0c165dd93f8277a3815d51a540d996 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sat, 5 Sep 2026 04:42:20 +0900 Subject: feat(layout): plan 03 — frontend plugin ABI + handshake + load lifecycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/plugins/ui/PluginManager.svelte | 10 +++++++--- src/features/plugins/ui/PluginRow.svelte | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src/features/plugins/ui') diff --git a/src/features/plugins/ui/PluginManager.svelte b/src/features/plugins/ui/PluginManager.svelte index cd3d542..fd2a8a7 100644 --- a/src/features/plugins/ui/PluginManager.svelte +++ b/src/features/plugins/ui/PluginManager.svelte @@ -6,7 +6,7 @@ import { autoCheckBackendPrereqs } from "../logic/prereqs"; import { dependencyHighlightSets } from "../logic/highlight"; import { unloadBlockReason } from "../logic/last-provider"; - import { splitSections } from "../logic/view-model"; + import { splitSections, withFrontendStates } from "../logic/view-model"; import PluginTable from "./PluginTable.svelte"; import UnloadConfirmModal from "./UnloadConfirmModal.svelte"; @@ -17,9 +17,13 @@ }); // ── Derived sections + hover highlighting (§8) ──────────────────────────── - const sections = $derived(splitSections(plugins.nodes)); + // The FE-half states (plan 03) merge into the nodes here — one reactive + // derivation over both inputs (the normalized nodes + the plugin host's + // post-sync state map). + const nodes = $derived(withFrontendStates(plugins.nodes, plugins.frontendStates)); + const sections = $derived(splitSections(nodes)); let hoveredId = $state(null); - const highlight = $derived(dependencyHighlightSets(hoveredId, plugins.nodes)); + const highlight = $derived(dependencyHighlightSets(hoveredId, nodes)); function highlightFor(id: string): "dep" | "dependent" | null { if (highlight.deps.has(id)) return "dep"; diff --git a/src/features/plugins/ui/PluginRow.svelte b/src/features/plugins/ui/PluginRow.svelte index 457bd29..73e0b18 100644 --- a/src/features/plugins/ui/PluginRow.svelte +++ b/src/features/plugins/ui/PluginRow.svelte @@ -83,6 +83,10 @@ {#if node.reason !== null} {node.reason} {/if} + {#if node.frontendIssue !== undefined} + + {node.frontendIssue} + {/if} {#if node.dependsOn.length > 0} depends on: {node.dependsOn.join(", ")} {/if} -- cgit v1.2.3