feat: add workspace-ideas plugin#16
Open
ZoRDoK wants to merge 5 commits into
Open
Conversation
ZoRDoK
force-pushed
the
feat/workspace-ideas-plugin
branch
2 times, most recently
from
June 12, 2026 21:12
e47610a to
724695c
Compare
Owner
|
I wonder if you would want to publish your plugin as an npm package instead? I have not looked at the code but seems like if you only use the plugin API, it should be doable. |
Owner
|
And any API changes needed I am more than happy to merge to make PI WEB easier to extend |
Adds a bundled "Ideas" workspace panel that lets users capture short
ideas, run each one in a new git worktree + Pi session, and mark them
done. State lives in .pi-web/ideas.json.
Plugin (pi-web-plugins/workspace-ideas):
- Captures ideas, persists them in .pi-web/ideas.json via public
WorkspaceFiles.writeFile.
- Warns if .pi-web/ is not gitignored, offers one-click fix.
- Run starts a Pi session in a fresh idea worktree via
WorkspacePanelSessions.startWithPrompt({ newWorkspace, ideaId }).
- Done archives the idea and keeps a link to its session.
Core changes (minimal seams):
- WorkspaceFiles.writeFile in the public plugin API.
- WorkspacePanelSessions.startWithPrompt seam to start a session in a
new idea worktree without changing focus and refresh host state.
- PUT /api/.../workspaces/:id/file and POST /api/.../idea-workspace
routes (path-escape guarded).
- .gitignore: ignore .pi-web/ in this repo.
Previously `git worktree add` ran with `-C project.path` and no start-point, so the new worktree was always based on the HEAD of the main worktree (usually main) regardless of which workspace the user had selected. Run it with `-C workspace.path` and an explicit `HEAD` start-point so the idea branch forks from the currently selected workspace's branch.
The Fix button silently swallowed write errors and never re-read the gitignore status, so the warning could stay visible after a failed or no-op write. Wrap fixGitignore in try/catch, re-load gitignore state from disk after writing, and show an explicit success or error status.
ZoRDoK
force-pushed
the
feat/workspace-ideas-plugin
branch
from
June 19, 2026 16:46
9d76be7 to
c05d246
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
External PI WEB plugins need a small public API surface to persist workspace-local files and start a session from a workspace panel without relying on private
/api/...calls.The Workspace Ideas plugin now lives outside this repo in:
https://github.com/ZoRDoK/pi-web-plugins/tree/main/plugins/pi-ideas
Change
Add public seams needed by external workspace plugins:
WorkspaceFiles.writeFile(path, content)in the public plugin API.WorkspacePanelSessions.startWithPrompt(prompt, { newWorkspace, ideaId })returningWorkspacePanelSessionInfowith optionalworkspaceId.files.writeFileandsessions.startWithPrompt.HEAD.The bundled
workspace-ideasplugin source was moved out ofpi-web; it is now installable as a Pi package from the external plugin repository.Verification
npm run verify— typecheck, lint, knip, and 588 tests pass.