Repository navigation
plugins: Plugin Alpha - #35470
plugins: Plugin Alpha#35470
Conversation
[High impact] The plugin changes reach plugin installation, access review, and several file-editing workflows. Do not merge until repository identity checks, update opt-out checks, and the remaining disabled-plugin approval race are fixed. Findings
SummaryThis PR adds plugin catalogs, automatic updates, icon themes, syntax packs, custom editors, and install links.
|
| try { | ||
| await input.approve(next.pluginKey, next.consentFingerprint) | ||
| return true |
There was a problem hiding this comment.
Updates restart disabled plugins
An automatic update can turn a plugin back on after the user disables it. predecessor is captured before installation, but approval is carried afterward without checking for disablement during that wait. For worker and panel updates, changed content changes the fingerprint, so input.approve calls applyPluginConsent, which removes the plugin from disabledPlugins and starts its new code. Preserve the current disabled state when carrying approval, including across the approval call's own waits.
How this was verified: The update keeps its earlier approval decision across installation, then calls an approval path that removes the plugin from the current disabled list.
There was a problem hiding this comment.
Fixed: carrying approval now rechecks the live disabled list after the install and file reads, so an update never re-enables a plugin the user turned off meanwhile; test added.
eb09072 to
a4f1ddc
Compare
ece4c4b to
a79d2d3
Compare
a79d2d3 to
2b814f1
Compare
Finishing Touches: 💡 1
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a21b788 to
4c11e5c
Compare
4c11e5c to
923c4f3
Compare
…the overwrite banner
…n the shared i18n instance
…erminal overrides on Switch back
646936b to
50436a7
Compare
| if (!repository) { | ||
| return null | ||
| } | ||
| const path = [...segments.slice(0, -1), repository].join('/').toLowerCase() |
There was a problem hiding this comment.
Different repositories share approval
If a Git server treats repository paths as case-sensitive, team/Plugin.git and team/plugin.git can be different repositories. isSameGitRepository lowercases both paths, while Git fetches the original URL. A catalog can therefore switch repositories without setting repositoryMoved, allowing an automatic update to run the new repository’s code under the old approval.
Preserve path case unless the host is known to ignore it.
How this was verified: Git receives the unchanged source URL, while the update’s repository check compares lowercased paths before carrying approval.
There was a problem hiding this comment.
Leaving as is for this PR: only the catalog owner can change a listing's URL, and an update under a carried approval is still pinned to the catalog's commit and content hash and rechecked for new access. Case-preserving comparison for case-sensitive hosts is a follow-up.
There was a problem hiding this comment.
Understood. Given the catalog-owner control and the per-update commit/content-hash pinning and access checks, we can defer case-preserving repository comparison as a follow-up. I’ll leave this unchanged for the PR.
There was a problem hiding this comment.
Fixed in #35640: paths are now compared case-sensitively except on GitHub, GitLab.com and Bitbucket, so a self-hosted respelling counts as a moved repository and needs review.
| await refreshKillList() | ||
| const outcome: PluginCatalogInstallOutcome = await installCatalogReleaseWithApproval({ | ||
| pluginKey: plugin.pluginKey, | ||
| pluginService, | ||
| install: () => installer.install(preview, { requireInstalled: true }), |
There was a problem hiding this comment.
Updates ignore a recent opt-out
updateOne never checks isEnabled() again after its awaited work. If the user turns automatic updates off while the preview or safety-list request is pending, this code still installs the update and replaces the version they chose to keep. Stopping the timer does not stop the running pass.
Recheck the live policy before starting installation, and carry that check through any wait before publication.
There was a problem hiding this comment.
Leaving as is for this PR: the window is a single in-flight pass. Turning auto-update off stops every later pass, and the installed release is still the catalog-pinned, access-checked one. A recheck before install is a follow-up.
There was a problem hiding this comment.
Understood—we’ll leave this unchanged for this PR. Turning auto-update off prevents later passes, but a pass already in flight can still install its pinned, access-checked release; adding a live-policy recheck before installation remains a follow-up.
There was a problem hiding this comment.
Fixed in #35642: the install step itself rechecks the auto-update setting, so a pass in flight installs nothing once the user opts out.
Adapt task sources and plugin settings to Plugin Alpha (stablyai#35470): - taskSources and settings move from reserved to real contribution points (Since 1.4.245), with policy entries: task sources need trusted-worker, settings are declarative; neither binds content or adds a catalog type. tasks:provide joins the capabilities. - The worker channel uses upstream's req/res envelope: a new taskSource.invoke method beside command.invoke, sharing its id space, cancel-on-timeout and handler context. Ready reports taskSources. - Plugin settings render as a Settings section on the plugin's page instead of a dialog from the old settings row. - Task sources show in the page's Adds list; the reference docs and authoring guide describe both points; hello-tasks is a v2 manifest. - Modules follow the new plugins/ layout (tasks/, contributions/, workers/); findApprovedPlugin replaces the PR's findStartablePlugin. Co-Authored-By: Claude Opus 5.5 <[email protected]>
stablyai#35470 moved the allowlist to languages/ and the artifact test to artifacts/, renamed the pane's `experimental` badge to `alpha`, and dropped `hideLogs`, `restartCount`, `restarting` and `running` from the installed row. Exempt `alpha` in place of `experimental`, drop the four removed paths, import the allowlist from its new folder, and point the refusal cases at trust copy the row and the install dialog still have: `killListMessage`, `invalidPluginError`, `enableLabel`, and the dialog's `description` and `gitHelp`.
ELI5
This lands the rest of the plugin system in one go. Earlier pieces (sources, approval, app and terminal themes) are already in main. This adds what plugins can contribute (icon themes, syntax highlighting, custom editors), how people find and install them (one plugin list, one-step install, catalog suggestions,
orca://plugins/...links), and the safety and schema work needed before plugins ship.It combines these stacked PRs, which are closed in favor of this one:
orca://plugins/...)What Changed
Before: plugins could only add app and terminal themes, and the install and settings flow was split across several screens.
After: plugins can also add file/folder icon themes, syntax packs (highlighted in a worker, live), and custom editors for file types Orca shows as binary or plain text. Settings → Plugins is one list with a page per plugin, one-step install with inline consent, and Update all. Opening a file Orca can't highlight suggests the matching official plugin.
orca://plugins/<id>links open that plugin's page and never install anything. Manifests and catalogs share one documented, versioned schema (manifest v2 needs Orca 1.4.244), with errors that say what to fix.Mechanism: the stack's commits rebased onto main as-is, plus small follow-ups for files main moved or added meanwhile (new language-pack
coveragefield, the panel-lifetime test's imports, the stale-panel-load fix ported into the shared frame opener). The review fixes from the stacked PRs are included (dotted icon extensions, default-black icons stay full color, failed icon loads drop old images, override clearing when adopting a theme's terminal colors).Why
Merging 14 stacked PRs one at a time meant a full CI cycle and a rebase for each. The PRs were already reviewed in order, and GitHub's stack merge isn't set up for them. One PR lands the same commits with one CI run.
Linked Issue
Fixes #
N/A: internal plugin-system work tracked by the stacked PRs above.
Visual Proof
See the linked PRs; each has its own before/after. Nothing here changes UI beyond what they show.
Testing
pnpm tc, plugin/i18n unit suites (221 files), ratchets, localization checks, plugin schema regeneration (no diff) and the changed-code quality gate, all on macOS.AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)