From babb8029129eee0eb4a8584172ac121aae3c6117 Mon Sep 17 00:00:00 2001 From: Federico Jaramillo Martinez Date: Tue, 19 May 2026 09:27:10 +0200 Subject: [PATCH] feat: add Pi Web status panel --- .changeset/pi-web-status-updates.md | 5 + README.md | 2 +- docs/plugins.html | 8 +- docs/plugins.md | 4 +- pi-web-plugins/info/pi-web-plugin.js | 4 +- pi-web-plugins/pi-web/package.json | 9 + pi-web-plugins/pi-web/pi-web-plugin.js | 148 ++++++++ src/client/src/api.ts | 4 +- src/client/src/api/clients.ts | 6 + src/client/src/api/parsers.ts | 87 ++++- src/client/src/appState.ts | 4 +- src/client/src/components/PiWebApp.ts | 33 +- src/client/src/components/WorkspacePanel.ts | 3 + src/client/src/plugins/types.ts | 1 + src/server/app.ts | 3 + src/server/piWebStatus.test.ts | 47 +++ src/server/piWebStatus.ts | 386 ++++++++++++++++++++ src/server/sessiond.ts | 8 +- src/shared/apiTypes.ts | 57 +++ 19 files changed, 803 insertions(+), 16 deletions(-) create mode 100644 .changeset/pi-web-status-updates.md create mode 100644 pi-web-plugins/pi-web/package.json create mode 100644 pi-web-plugins/pi-web/pi-web-plugin.js create mode 100644 src/server/piWebStatus.test.ts create mode 100644 src/server/piWebStatus.ts diff --git a/.changeset/pi-web-status-updates.md b/.changeset/pi-web-status-updates.md new file mode 100644 index 0000000..ca72fff --- /dev/null +++ b/.changeset/pi-web-status-updates.md @@ -0,0 +1,5 @@ +--- +"@jmfederico/pi-web": patch +--- + +Add a beta-labeled Pi Web status panel with update instructions tailored to global npm, Pi package, or local installs. The panel appears for update/restart messages and stays visible for local or unknown installs, while keeping the bundled Info plugin as the minimal documented plugin example. diff --git a/README.md b/README.md index 4f3540a..297e0fa 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ Pi Web keeps its own state intentionally small: Pi Web production installs can load trusted local UI plugins without rebuilding Pi Web. Plugins are browser-side ES modules that can add action-palette actions, workspace panels, and workspace-label metadata. They do not run in the session daemon and are not sandboxed. -The supported package shape is intentionally singular: `piWeb.plugins` entries with explicit `id` and `module`, plus a browser module that exports `{ apiVersion: 1, name, activate }`. The bundled `pi-web-plugins/info` plugin is the canonical real example. +The supported package shape is intentionally singular: `piWeb.plugins` entries with explicit `id` and `module`, plus a browser module that exports `{ apiVersion: 1, name, activate }`. The bundled `pi-web-plugins/info` plugin is the canonical minimal real example, and `pi-web-plugins/pi-web` demonstrates a dynamic status panel. A useful prompt for AI agents: diff --git a/docs/plugins.html b/docs/plugins.html index cbeb28b..dfe3f66 100644 --- a/docs/plugins.html +++ b/docs/plugins.html @@ -140,8 +140,8 @@ After editing, check the manifest endpoint and browser-console failure cases.

Canonical example

- Pi Web ships a real bundled Info plugin. It is the reference example because it uses all - current contribution types: one action, one workspace label, and one workspace panel. + Pi Web ships a real bundled Info plugin. It is intentionally small while still using all + core contribution types: one action, one workspace label, and one workspace panel.