Skip to content

feat(plugins): expose durable project enumeration - #1998

Merged
vastsa merged 1 commit into
mainfrom
feat/plugin-projects-list
Oct 30, 2026
Merged

vastsa merged 1 commit into
mainfrom
feat/plugin-projects-list

Conversation

@vastsa

@vastsa vastsa commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Plugins can now build project pickers even when the selected session has no project. pi.projects.list() and the panel bridge return one entry per durable project row, most recently opened first, with stable decimal database ids and non-empty primary-first roots. Missing group metadata falls back to a single root; an unavailable project Host returns [].

The change keeps workspace selection, session bindings, and filesystem permissions unchanged. Primary group rows use the group's display name and registered roots; secondary-folder rows retain their own durable identity and primary path. The SDK, manifest/API reference, ADR, E2E scenario, and shipped-locale release notes document the contract. Integration CI now runs the real Host/plugin-process scenario.

Validation:

  • pnpm build:js, Desktop typecheck, pnpm lint, pnpm docs:check, release-doc check, and architecture check passed.
  • Shared: 1,340 tests passed; Plugin SDK: 382 tests passed.
  • Targeted plugin/process/panel/workspace regression suite: 37 tests passed. The original API failed the project-picker baseline because pi.projects was absent.
  • Real Host/process E2E passed, including ungrouped projects, grouped roots, a projectless session, restart identity, stopped-Host fallback, and unchanged workspace.
  • Broad local tests were also attempted. macOS Homebrew Node 26 packaging tests fail when a copied Node cannot find libnode.147.dylib. Desktop initially lacked an Electron binary; after reusing the primary checkout's Electron, 14 affected user-path files passed and the unrelated deep-file-search fixture still failed. Full Linux integration CI remains the landing gate.

Task candidate:

  • Tested commit: a06976a
  • Base main: 4eea56e
  • E2E: pnpm test:e2e:plugin-projects — PASS
  • Environment: isolated macOS profile and plugin child process, Node 26; Host built from the candidate using the existing Cargo target cache. The preprovisioned dependency tree was incompatible with current Pi patches, so the worktree installed the frozen lockfile. Electron was reused from the primary environment.

Closes #1996.

Let plugins build project pickers independently of the selected session.
Use durable project ids and primary-first roots while keeping workspace
selection and filesystem permissions unchanged.

Cover the process and panel APIs, fallback behavior, and a real Host
restart path, and run the Host/process scenario in integration CI.

closes #1996
Copilot AI balanced review requested due to automatic review settings October 30, 2026 10:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@vastsa
vastsa merged commit 97cc04d into main Oct 30, 2026
6 checks passed
@vastsa
vastsa deleted the feat/plugin-projects-list branch October 30, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin API: expose the list of known projects (pi.projects.list)

2 participants