Plugin install progress through status bar #235

Closed
opened 2026-06-02 17:03:10 +00:00 by steve · 0 comments
Owner

Plugin registry installs and updates currently show coarse installer progress
inside the Plugin registry settings panel. Long downloads should instead use
the app progress system so they are visible from the status bar, can show
determinate download progress, and can be cancelled cooperatively.

Problem

The Plugin registry panel renders local install-phase alerts after a user starts
an install. That duplicates the app-owned notification/status-bar progress
surface and does not expose byte-level download progress or cancellation for
large official plugin files.

Goal

Route plugin install and update progress through app.notifications, with the
compact status-bar item as the primary live indicator and the notification
center as the detail surface for the progress bar and Cancel action.

Scope

  • Add cooperative cancellation and byte-level download progress to the official
    plugin distribution installer path.
  • Remove install/update progress alerts from the Plugin registry settings panel.
  • Wrap install/update actions from the registry panel in notification progress.
  • Update the relevant package/spec docs and focused tests.

Non-goals

  • Do not add an inline progress bar or cancel button directly inside the status
    bar item.
  • Do not change uninstall into a progress task.
  • Do not change registry signing, hash verification, installed provenance, or
    plugin activation policy beyond passing cancellation/progress through.

Acceptance Criteria

  • Plugin install/update actions no longer render progress panels inside the
    Plugin registry settings tab or detail dialog.
  • Install/update tasks appear through the notifications status-bar item with a
    compact plugin label and percent when byte totals are known.
  • Clicking the status item opens the notification center, where the active
    install/update row shows detail text, a determinate progress bar when
    possible, and a Cancel button.
  • Cancelling an in-flight install/update aborts cooperative fetch/staging work,
    does not persist an installed record for a cancelled fresh install, and does
    not surface a destructive registry error alert or failure notice.
  • Existing signature, size, hash, staging cleanup, enablement, and update
    behavior remain intact.

Implementation Notes

  • Extend InstallPluginOptions with signal?: AbortSignal, and extend
    PluginDistributionManager.update() with an optional options object carrying
    the same signal.
  • Extend PluginInstallProgressEvent with downloadedBytes, totalBytes,
    filePath, fileIndex, and fileCount.
  • Thread the signal and progress callback from
    DefaultPluginDistributionManager into VerifiedPluginInstaller.
  • Stream release file responses when Response.body is available; fall back to
    arrayBuffer() with a final progress update otherwise.
  • In plugins-registry-panel.svelte, register a plugin-scoped progress listener
    only for the active notification-wrapped install/update action and map
    distribution byte progress into progress.report({ current, total, message }).
  • Treat AbortError/cancelled progress as a non-error user cancellation in the
    registry panel while still refreshing panel state afterward.

Suggested Files or Specs To Inspect

  • packages/api/src/lib/plugin-distribution/manager.ts
  • packages/api/src/lib/plugin-distribution/installer.ts
  • packages/api/src/lib/__tests__/plugin-distribution-manager.test.ts
  • packages/workspace/src/lib/components/configuration/plugins-registry-panel.svelte
  • spec/src/20-packages/api/index.md
  • spec/src/20-packages/workspace/index.md
  • spec/src/20-packages/plugins/notifications/index.md

Validation Commands

  • pnpm --filter @lapis-notes/api test:run src/lib/__tests__/plugin-distribution-manager.test.ts
  • pnpm --filter @lapis-notes/workspace check:all
  • pnpm --filter @lapis-notes/api check:all
  • make spec-lint
  • mdbook build spec
  • pnpm test:smoke

Follow-up Tasks

Implementation Summary

Implemented notification-backed plugin install/update progress, byte-level distribution download progress, cooperative cancellation, focused tests, and spec updates.

Plugin registry installs and updates currently show coarse installer progress inside the Plugin registry settings panel. Long downloads should instead use the app progress system so they are visible from the status bar, can show determinate download progress, and can be cancelled cooperatively. ## Problem The Plugin registry panel renders local install-phase alerts after a user starts an install. That duplicates the app-owned notification/status-bar progress surface and does not expose byte-level download progress or cancellation for large official plugin files. ## Goal Route plugin install and update progress through `app.notifications`, with the compact status-bar item as the primary live indicator and the notification center as the detail surface for the progress bar and Cancel action. ## Scope - Add cooperative cancellation and byte-level download progress to the official plugin distribution installer path. - Remove install/update progress alerts from the Plugin registry settings panel. - Wrap install/update actions from the registry panel in notification progress. - Update the relevant package/spec docs and focused tests. ## Non-goals - Do not add an inline progress bar or cancel button directly inside the status bar item. - Do not change uninstall into a progress task. - Do not change registry signing, hash verification, installed provenance, or plugin activation policy beyond passing cancellation/progress through. ## Acceptance Criteria - Plugin install/update actions no longer render progress panels inside the Plugin registry settings tab or detail dialog. - Install/update tasks appear through the notifications status-bar item with a compact plugin label and percent when byte totals are known. - Clicking the status item opens the notification center, where the active install/update row shows detail text, a determinate progress bar when possible, and a Cancel button. - Cancelling an in-flight install/update aborts cooperative fetch/staging work, does not persist an installed record for a cancelled fresh install, and does not surface a destructive registry error alert or failure notice. - Existing signature, size, hash, staging cleanup, enablement, and update behavior remain intact. ## Implementation Notes - Extend `InstallPluginOptions` with `signal?: AbortSignal`, and extend `PluginDistributionManager.update()` with an optional options object carrying the same signal. - Extend `PluginInstallProgressEvent` with `downloadedBytes`, `totalBytes`, `filePath`, `fileIndex`, and `fileCount`. - Thread the signal and progress callback from `DefaultPluginDistributionManager` into `VerifiedPluginInstaller`. - Stream release file responses when `Response.body` is available; fall back to `arrayBuffer()` with a final progress update otherwise. - In `plugins-registry-panel.svelte`, register a plugin-scoped progress listener only for the active notification-wrapped install/update action and map distribution byte progress into `progress.report({ current, total, message })`. - Treat `AbortError`/cancelled progress as a non-error user cancellation in the registry panel while still refreshing panel state afterward. ## Suggested Files or Specs To Inspect - `packages/api/src/lib/plugin-distribution/manager.ts` - `packages/api/src/lib/plugin-distribution/installer.ts` - `packages/api/src/lib/__tests__/plugin-distribution-manager.test.ts` - `packages/workspace/src/lib/components/configuration/plugins-registry-panel.svelte` - `spec/src/20-packages/api/index.md` - `spec/src/20-packages/workspace/index.md` - `spec/src/20-packages/plugins/notifications/index.md` ## Validation Commands - `pnpm --filter @lapis-notes/api test:run src/lib/__tests__/plugin-distribution-manager.test.ts` - `pnpm --filter @lapis-notes/workspace check:all` - `pnpm --filter @lapis-notes/api check:all` - `make spec-lint` - `mdbook build spec` - `pnpm test:smoke` ## Related Issues - Follow-up to #175 — [Add Plugins settings registry UI](../closed/175-add-plugins-settings-registry-ui.md) ## Follow-up Tasks ## Implementation Summary Implemented notification-backed plugin install/update progress, byte-level distribution download progress, cooperative cancellation, focused tests, and spec updates. <!-- backlog:task_id=TASK-PLUGIN-REGISTRY-PROGRESS source_spec=spec/src/20-packages/workspace/index.md related_issue=175 -->
steve added this to the Full Registry V1 milestone 2026-06-02 17:03:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#235
No description provided.