Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(plugins): restore the Open panel button on installed cards
vastsa438a1a364bbb
diff --git a/apps/desktop/src/features/plugins/InstalledPluginsPanel.tsx b/apps/desktop/src/features/plugins/InstalledPluginsPanel.tsxindex cfa72032c..eda1e4cdb 100644--- a/apps/desktop/src/features/plugins/InstalledPluginsPanel.tsx+++ b/apps/desktop/src/features/plugins/InstalledPluginsPanel.tsx@@ -3,6 +3,7 @@ import {IconCircleAlert,IconCloudDown,IconMore,+ IconPanel,IconPlug,IconReview,IconSearch,@@ -96,6 +97,12 @@ export function InstalledPluginsPanel({const broken = group.id === "attention";const menuOpen = rowMenu === plugin.id;const update = plugin.updateAvailable;+ /**+ * The card's one call to action: an available update, or+ * opening the plugin's own panel. A disabled plugin has+ * neither, so it never carries a primary button.+ */+ const canOpenPanel = plugin.enabled && !!plugin.ui?.panel;return (<articlekey={plugin.id}@@ -194,6 +201,17 @@ export function InstalledPluginsPanel({? t("plugins.updating"): t("plugins.updateTo", { version: update.version })}</Button>+ ) : canOpenPanel ? (+ <Button+ variant="secondary"+ size="sm"+ onClick={() =>+ void run(() => api.openPluginPanel(plugin.id))+ }+ >+ <IconPanel size={14} />+ {t("plugins.openPanel")}+ </Button>) : null}{plugin.enabled && plugin.settings?.length ? (<TooltipButtondiff --git a/apps/desktop/test/plugin-reviews-surface.test.mjs b/apps/desktop/test/plugin-reviews-surface.test.mjsindex e78011c66..21555c061 100644--- a/apps/desktop/test/plugin-reviews-surface.test.mjs+++ b/apps/desktop/test/plugin-reviews-surface.test.mjs@@ -1,7 +1,7 @@/*** Source contracts for the installed plugin cards and the public review- * surface. These pin the behaviour the redesign promised: grouped cards,- * update actions for enabled cards, a read-only review drawer that covers the+ * surface. These pin the behaviour the redesign promised: grouped cards, one+ * call to action per enabled card, a read-only review drawer that covers the* detail sheet without unmounting it, and a composer that only ever links out* to the plugin centre.*/@@ -35,14 +35,17 @@ test("installed plugins keep their state groups and their disclosure", () => {assert.match(pageSrc, /GROUP_ORDER: GroupId\[\] = \["attention", "updates", "active", "disabled"\]/);});-test("installed cards offer updates without a panel shortcut", () => {+test("an installed card grows one call to action: update, then open panel", () => {// The update button names the version it lands on.assert.match(installedPanel, /t\("plugins\.updateTo", \{ version: update\.version \}\)/);assert.match(installedPanel, /variant="primary"/);- assert.doesNotMatch(installedPanel, /plugins\.openPanel|api\.openPluginPanel/);+ // Opening the panel is only offered while the plugin is enabled: the host+ // throws for a plugin it has not loaded.+ assert.match(installedPanel, /const canOpenPanel = plugin\.enabled && !!plugin\.ui\?\.panel/);+ assert.doesNotMatch(installedPanel, /\{plugin\.ui\?\.panel \?/);// Settings stay behind enabled + declared settings.assert.match(installedPanel, /plugin\.enabled && plugin\.settings\?\.length/);- // A disabled plugin has no primary action.+ // A disabled plugin has no primary: both branches read plugin.enabled.assert.match(installedPanel, /\{plugin\.enabled && update \? \(/);});diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex dda09dcbd..ea8d0f42f 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -4451,9 +4451,8 @@ this does not claim an installed full-app settings journey.#### E2E-024H: Installed plugins surface state, risk, and failures- **Preconditions**: At least one enabled plugin, one disabled plugin, and one plugin whose load failed.-- **Steps**: 1) Open Extensions → Installed while plugin changed events are arriving in a burst. 2) Read the tab and group counts. 3) Confirm the failed plugin sits under Needs attention with its error message. 4) Search by author and by permission. 5) Clear the search. 6) Inspect enabled panel-only, update-ready, settings-bearing, and disabled plugin cards.+- **Steps**: 1) Open Extensions → Installed while plugin changed events are arriving in a burst. 2) Read the tab and group counts. 3) Confirm the failed plugin sits under Needs attention with its error message. 4) Search by author and by permission. 5) Clear the search.- **Expected**: The page remains usable during transient host backpressure: identical plugin and extension registry refreshes coalesce, and renderer-facing RPC calls retry explicit `HOST_OVERLOADED` responses with bounded backoff before surfacing an error. Plugins group as Needs attention / Updates available / Active / Turned off with counts; `status: "error" | "load_error"` renders the error message inline instead of being silent; each plugin is a card in an auto-filling grid, defaulting to a quiet name/id/version summary (plus a rating chip when the centre has one), while a Details disclosure reveals risk-tinted permission chips, capabilities, and resident service status; the single scope trigger opens explained Off / This project / Everywhere choices and the project picker; card icon actions expose hover/focus labels; the result count reflects the filtered subset and clearing restores every group.-- **Card actions**: Installed cards never show an Open panel shortcut, even when enabled with a declared panel. A panel-only card keeps scope and overflow controls; an enabled update-ready card keeps its versioned update action; enabled declared settings remain reachable. Panel opening remains available through the plugin launcher.- **Specs linked**: `04-ux/01-ui-ia.md`, `07-plugins/13-plugin-permissions-matrix.md`- **Acceptance**: G (installed plugin management)- **Status**: Documented@@ -4467,7 +4466,7 @@ this does not claim an installed full-app settings journey.- **Acceptance**: G (isolated panel)- **Status**: Documented-Initial-load timeout check: Open a fixture panel from the plugin launcher+Initial-load timeout check: Open a fixture panel from Extensions → Installedwhose page load remains pending. After 15 seconds, the open request must report`PANEL_LOAD_TIMEOUT` through the initiating action and destroy the hiddenwindow; opening a normal panel afterward must still work.diff --git a/docs/spec/06-delivery/plugin-reviews-test-plan.md b/docs/spec/06-delivery/plugin-reviews-test-plan.mdindex 92d18943a..cb1e4ca76 100644--- a/docs/spec/06-delivery/plugin-reviews-test-plan.md+++ b/docs/spec/06-delivery/plugin-reviews-test-plan.md@@ -218,7 +218,7 @@ against a real running center (host stdio RPC, zero-state 9/9 and nonzero 11/11)| ID | Test title (verbatim) | Expected assertion | Status || --- | --- | --- | --- || RVD-UI-01 | installed plugins keep their state groups and their disclosure | Group order `attention, updates, active, disabled`; `role="list"`; details disclosure kept | `verified` (2026-10-16 six-file run) |-| RVD-UI-02 | installed cards offer updates without a panel shortcut | Update button names the target version; no installed-card panel action; settings behind enabled+declared; disabled card has no primary | `verified` (2026-11-04 targeted surface/style run) |+| RVD-UI-02 | an installed card grows one call to action: update, then open panel | Update button names the target version; panel only when enabled+declared; settings behind enabled+declared; disabled card has no primary | `verified` (2026-10-16 six-file run) || RVD-UI-03 | installed and marketplace cards carry the rating chip in their metadata | `RatingChip` inside the existing meta line; hidden when `ratingCount <= 0` | `verified` (2026-10-16 six-file run) || RVD-UI-04 | the installed card shows the trust glyph only from installed metadata | Shield from installed trust tier; no "verified installed" wording | `verified` (2026-10-16 six-file run) || RVD-UI-05 | the detail sheet puts the ratings summary between permissions and versions | Section order Permissions < Ratings & reviews < Versions; unavailable copy; drawer entry not gated on the summary (unavailable-entry behavior) | `verified` (2026-10-16 six-file run) |@@ -257,7 +257,7 @@ The drawer harness runs five probes: the three above plus `pluginReviewsBatchPro| ID | Runner | Scope / expected | Status || --- | --- | --- | --- |-| RVD-E2E-04 | `node scripts/e2e-installed-grid.mjs` (`scripts/e2e/installed-grid.tsx`), probes `installedGridLayoutProbe` + `installedGridActionsProbe` | Real `InstalledPluginsPanel` + `PluginDialogs` in a 1100×900 fixture window, only the IPC boundary fixtured; seven plugins (error, disabled-with-update, plain disabled, panel-only, settings-only, updater, long id). Layout: groups/members/error, rail order + disabled gating, disclosure, real scope menu, chip inline + long-id truncation, 340px grid floor + sub-340 fallback, narrow rail wrap. Actions: update→permission→`marketInstall`(v1.2.3), no panel shortcut or dispatch, settings sheet opens/closes, overflow auto-update false + uninstall | `verified` (2026-11-04 task candidate, 2/2) |+| RVD-E2E-04 | `node scripts/e2e-installed-grid.mjs` (`scripts/e2e/installed-grid.tsx`), probes `installedGridLayoutProbe` + `installedGridActionsProbe` | Real `InstalledPluginsPanel` + `PluginDialogs` in a 1100×900 fixture window, only the IPC boundary fixtured; seven plugins (error, disabled-with-update, plain disabled, panel-only, settings-only, updater, long id). Layout probe PASS: groups/members/error, rail order + disabled gating, disclosure, real scope menu, chip inline + long-id truncation, 340px grid floor + sub-340 fallback, narrow rail wrap. Actions probe PASS: update→permission→`marketInstall`(v1.2.3), panel id, settings sheet opens/closes, overflow auto-update false + uninstall. Reported 2/2 pass; the final rerun decides | `verified` (2026-10-16 six-probe rerun, 2/2) || RVD-E2E-05 | `node scripts/e2e-plugin-detail-focus.mjs` (`scripts/e2e/plugin-detail-focus.tsx`) | Detail-sheet focus/scroll interplay while the summary read returns `{}` — sheet behavior independent of the review surface | `verified` (2026-10-16 six-probe rerun) |**Installed-card real-component fixture (landed).** Runner@@ -271,9 +271,9 @@ state only what the fixture asserts.| --- | --- | --- | --- || RVD-GRID-01 | Grid — wide | At the 1100px host, `.plugins-list` computed columns are ≥2 and every column is ≥340−1px (the 340px floor) | `verified` (2026-10-16 installed-grid layout probe) || RVD-GRID-02 | Grid — narrow | Host forced to 300px: exactly one column ≤300px; the grid does not overflow horizontally (`scrollWidth <= clientWidth + 1`); the card's right edge stays inside the grid | `verified` (2026-10-16 installed-grid layout probe) |-| RVD-GRID-03 | Control order | Updater rail exactly 4: scope-control → primary "Update to v1.2.3" → settings icon (`aria-label "Plugin settings"`) → menu wrap; panel-only rail 2: scope → menu; settings-only rail 3 with the settings icon second; each disabled card: rail 2 (scope + menu), no primary, no settings icon, no panel action | `verified` (2026-11-04 installed-grid layout probe) |+| RVD-GRID-03 | Control order | Updater rail exactly 4: scope-control → primary "Update to v1.2.3" → settings icon (`aria-label "Plugin settings"`) → menu wrap; panel-only rail 3: scope → "Open panel" → menu; settings-only rail 3 with the settings icon second; each disabled card: rail 2 (scope + menu), no primary, no settings icon, no panel action | `verified` (2026-10-16 installed-grid layout probe) || RVD-GRID-04 | Update CTA | Primary click → permission dialog "Install Acme Updater?" naming "v1.2.3" → accept → `marketInstall` recorded as `{id:"acme.updater", version:"1.2.3", enable:true, autoUpdate:true}`; the install dialog steps aside | `verified` (2026-10-16 installed-grid actions probe) |-| RVD-GRID-05 | No installed-card panel shortcut | Panel-only and disabled cards offer no Open panel action; installed-card operations do not dispatch `openPluginPanel` | `verified` (2026-11-04 installed-grid actions probe) |+| RVD-GRID-05 | Panel CTA | "Open panel" on the panel-only card → `openPluginPanel("acme.panel")`; disabled cards offer no panel action | `verified` (2026-10-16 installed-grid actions probe) || RVD-GRID-06 | Settings | Settings icon → `.plugins-settings-modal` titled "Acme Updater settings"; the close control dismisses it | `verified` (2026-10-16 installed-grid actions probe) || RVD-GRID-07 | Groups, membership, disabled states | Seven fixtures in four groups: Needs attention 1 (Acme Broken, error text "Manifest could not be read"); Updates available 2 (Acme Dormant, Acme Updater); Active 3 (Acme Panel, Acme Settings, Long Identifier); Turned off 1 (Acme Off). Disabled gating as in GRID-03 | `verified` (2026-10-16 installed-grid layout probe) || RVD-GRID-08 | Scope | Compact scope trigger (first control) opens `.scope-compact-menu.is-open` with 3 `role="menuitemradio"` choices; "Off" → `disablePlugin("acme.updater")` and the menu closes; "Projects" → `setPluginScope("acme.updater", {mode:"projects", projects:[]})` | `verified` (2026-10-16 installed-grid layout probe) |diff --git a/docs/spec/07-plugins/07-plugin-marketplace.md b/docs/spec/07-plugins/07-plugin-marketplace.mdindex 476e82e9e..03fbe797b 100644--- a/docs/spec/07-plugins/07-plugin-marketplace.md+++ b/docs/spec/07-plugins/07-plugin-marketplace.md@@ -525,11 +525,10 @@ attention, and load errors remain inline. Capabilities, resident servicestatus, and risk-tinted permission chips are rendered inside a collapsed nativeDetails disclosure; expanding it exposes the existing full readout withoutmaking every card tall. A card's control rail clusters at its left edge and-wraps: the compact scope trigger first, then an update action when an enabled-plugin has an available update, followed by the 28px settings and overflow-icon actions. Installed cards do not offer an Open panel shortcut; panel-opening remains available through the plugin launcher. A disabled plugin has-no primary action and no settings icon. Opening the scope trigger shows the three scope choices with+wraps: the compact scope trigger first, then the card's one call to action+(update to the available version, or open the plugin's panel), then the 28px+settings and overflow icon actions. A disabled plugin has no primary action and+no settings icon. Opening the scope trigger shows the three scope choices withtheir explanations, and choosing This project opens the existing projectpicker. Icon actions remain visible at rest and show their labels on hover andkeyboard focus. A verified card shows the trust shield when the installeddiff --git a/scripts/e2e-installed-grid.mjs b/scripts/e2e-installed-grid.mjsindex 1248311c0..bdd3883c2 100644--- a/scripts/e2e-installed-grid.mjs+++ b/scripts/e2e-installed-grid.mjs@@ -1,11 +1,11 @@#!/usr/bin/env node// Real installed-grid components and Chromium behaviour; only host APIs are// fixtures. Drives the installed user path: groups and counts, control-rail-// order and gating (scope first, updates when available, no panel shortcut), the detail+// order and gating (scope first, update OR panel, disabled none), the detail// disclosure, the real compact scope menu, chip-in-meta and long-id// truncation, the 340px grid floor with the sub-340 fallback, narrow rail// wrapping, and the action path update -> permission review -> marketInstall,-// no panel action, settings sheet, and the overflow auto-update/uninstall+// open-panel id, settings sheet, and the overflow auto-update/uninstall// controls. Nothing installs outside the renderer.import { spawnSync } from "node:child_process";import { existsSync, readFileSync } from "node:fs";diff --git a/scripts/e2e/installed-grid.tsx b/scripts/e2e/installed-grid.tsxindex 558211b01..00a0737ef 100644--- a/scripts/e2e/installed-grid.tsx+++ b/scripts/e2e/installed-grid.tsx@@ -285,9 +285,10 @@ Object.assign(globalThis, {);const panelRail = controlsOf(cardByName("Acme Panel"));check(- panelRail.length === 2 &&+ panelRail.length === 3 &&panelRail[0].classList.contains("scope-control") &&- panelRail[1].classList.contains("plugins-menu-wrap"),+ panelRail[1].textContent?.includes("Open panel") === true &&+ panelRail[2].classList.contains("plugins-menu-wrap"),`panel rail: ${panelRail.map((node) => node.className).join(" | ")}`,);const settingsRail = controlsOf(cardByName("Acme Settings"));@@ -515,14 +516,12 @@ Object.assign(globalThis, {);await settle(() => !maybe(".plugins-install-modal"), "install dialog stepped aside");- // --- Installed cards do not offer a panel shortcut ---------------------- check(- [...cardByName("Acme Panel").querySelectorAll("button")].every(- (button) => button.textContent?.trim() !== "Open panel",- ),- "installed card offered the panel action",- );- check(panels.length === 0, `unexpected panel call: ${JSON.stringify(panels)}`);+ // --- Open panel names the plugin ---------------------------------------+ cardByName("Acme Panel")+ .querySelector<HTMLButtonElement>(".plugins-row-controls .btn-secondary")!+ .click();+ await settle(() => panels.length === 1, "openPluginPanel recorded");+ check(panels[0] === "acme.panel", `panel call: ${JSON.stringify(panels)}`);// --- Settings opens only where declared --------------------------------cardByName("Acme Updater")@@ -558,7 +557,7 @@ Object.assign(globalThis, {root.unmount();host.remove();- return "PASS: update->permission->marketInstall(v1.2.3), no panel shortcut or dispatch, settings sheet opens/closes, overflow auto-update false + uninstall";+ return "PASS: update->permission->marketInstall(v1.2.3), panel id, settings sheet opens/closes, overflow auto-update false + uninstall";},});