You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
plugins: ask "Make sure you trust <publisher>" before installing any non-official plugin - #36271
Before this change, you could install a plugin from someone other than Orca with one click, and the only warning was a line on the plugin's page. Now Orca stops and asks "Make sure you trust " every time you install a plugin that isn't one of Orca's own. Themes and other look-only plugins get a lighter warning. Plugins that run code get a stronger one that lists what they can do. Cancel is the default button.
What Changed
Before: installing a non-official catalog plugin from its card, its page, or a page opened by an orca://plugins/... link went straight to download. Installing from a Git URL or adding a development folder asked for nothing.
After: every one of those paths opens one confirmation dialog first. Nothing downloads until you click Install (or Add folder for a development folder). Cancel, Esc and closing the dialog all back out.
Title: "Make sure you trust ". The owner is the repository owner that Orca reads from the URL it will download from, so a plugin cannot pick its own name here. Folder installs say "Make sure you trust this folder".
Wording by kind:
Theme: "This theme is from acme, not Orca. Only install plugins from authors you trust."
Other look-only content: the same wording, with "plugin" in place of "theme".
Language pack: also says that translations can change any text in Orca.
Plugin that runs code: "It runs the publisher's code inside Orca…", plus the same list of what it can access that the review page shows.
Git URL: says Orca hasn't checked the repository.
Local or development folder: says it is an unverified local folder, and for development folders that later edits run without asking.
Details box: the publisher Orca installs the plugin as, the repository Orca parsed (github.com/acme/orca-notes), and the catalog name or folder path. The publisher comes from the catalog listing id, or from the URL owner for a Git URL install (the derived-publisher rule from plugins: derive the publisher from the repository owner, like a Go module path #36281). The manifest's own publisher field is never shown.
Official plugins never show it. "Official" means both the listing and the download preview were marked official by the host. The host only marks a plugin official when it comes from the stablyai official catalog and a stablyai repository.
How it works: there is one async gate, confirmPluginInstallTrust(prompt), in a small store (store/plugin-install-trust-request.ts). PluginInstallTrustDialogHost, mounted in the Plugins pane, renders it. The gate is called from:
usePluginInstallAction.install, which card, page, and link-opened page installs all go through;
PluginsSettingsSection.install for Git URL and folder installs;
the Add path step in PluginDevelopmentDialog.
For a Git URL, the two-step flow from #36525 (check the version, then Install) stays as it is. The trust dialog opens on that final Install click, right before anything downloads.
presentation/plugin-install-trust.ts decides which warning to show. It builds on the existing pluginPublisherNotice and access-warning helpers instead of copying their logic. Deep links still only open the plugin's page, so a link cannot skip the dialog. orca plugin dev load (#36288) talks to the main process over runtime RPC without going through the renderer, so this dialog does not cover it. That is a terminal command the user types on purpose, and it is out of scope here.
Why
One gate inside the install action, not a check at each button. A future install button can't forget it, and links can't get around it.
A blocking dialog instead of the page banner. The card's one-click Install never shows the banner, and the CEO asked for an explicit confirmation.
The parsed repository owner instead of the declared publisher in the title. The manifest's publisher field is the plugin's own claim.
Cancel gets focus. A held Enter, or Enter pressed right after a link opens a page, can't install anything.
Language packs can't rewrite this copy. Every key is under auto.components.settings.PluginInstallTrustDialog.*. The existing auto.components.settings.Plugin* protected prefix covers that, and a unit test checks every key against isProtectedPluginTranslationPath. The dialog also uses surface="security", so the structural rule from #36219 (now merged) picks it up: all 16 keys are in the regenerated protected-copy-keys.json.
Plugin that runs code (stronger wording plus access list), dark and light:
Git URL install and development folder, captured through the real Plugins pane forms:
How these were captured: dev build in the background with ORCA_BACKGROUND_LAUNCH=1, screenshots over CDP. The live catalogs have no community listings yet, so for the theme and code shots I added a temporary hook that was never committed. It called the real gate with prompts built by catalogInstallTrustPrompt from sample community listings. The Git and development folder shots come from the real forms.
Testing
pnpm tc, oxlint, pnpm run check:code-quality:changed, verify:localization-catalogs, verify:localization-extraction, verify:localization-coverage, verify:localization-runtime-catalog
pnpm test for the plugin, settings, shared plugin and i18n suites (676 tests). New coverage:
dialog shown for a community theme (softer wording, Cancel focused), a community code plugin (access list), a Git URL (the real form), a page opened by an install link (still asks, and the install still records that it came from a link), and a development folder;
not shown for an official plugin, and still shown when only one of listing and preview says official;
Cancel installs nothing, approves nothing, and keeps the Git form and development path input as they were.
No e2e change is needed. The e2e fixtures serve their catalogs as the official one, and the existing getByRole('dialog')).toHaveCount(0) checks after install now also show the dialog stays away for official plugins.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Security: closes the gap where non-official installs needed no explicit trust step.
Cross-platform: paths are shown exactly as typed. The URL parsing comes from the shared provenance parser.
SSH and remote: renderer-only. No change to what client and host send each other. Older hosts work unchanged.
Mobile: not affected.
Performance: one small store, and nothing runs until an install starts.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Files skipped from review as they are similar to previous changes: 11
src/renderer/src/i18n/locales/de.json
src/renderer/src/i18n/locales/en.json
src/renderer/src/i18n/locales/es.json
src/renderer/src/i18n/locales/ko.json
src/renderer/src/i18n/locales/pt.json
src/renderer/src/i18n/locales/ja.json
src/renderer/src/i18n/locales/zh.json
src/renderer/src/i18n/locales/zh-Hant.json
src/renderer/src/i18n/locales/fr.json
src/renderer/src/i18n/locales/ru.json
src/renderer/src/i18n/locales/tr.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
Walkthrough
The changes add source-specific trust prompts for plugin installs and development folders. A shared store and dialog present prompt details and return the user’s confirmation. Catalog installs, Git installs from settings, and development-folder additions proceed only after confirmation. The changes also add localized dialog text and tests for prompt content, confirmation, cancellation, and official-plugin cases.
Merge Risk: Low · up to 2076d
The trust flow is broadly gated correctly, but custom-port provenance and dialog accessibility need bounded follow-up.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 53.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title names the main behavior change: a trust confirmation ("Make sure you trust ") before installing non-official plugins. It is specific and matches the changeset, which adds a trust …
Description check
The description follows the repository template closely. It has the ELI5, What Changed (before and after, mechanism), Why, Visual Proof with images, Testing with checked items, Notes covering security…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main behavior change: a trust confirmation ("Make sure you trust <publisher>") before installing non-official plugins. It is specific and matches the changeset, which adds a trust dialog gate for non-official installs, Git URLs, and development folders. It is a single sentence, but it is long at 12 words and 88 characters, and it uses a quoted dialog string that is slightly noisy. These are minor issues and do not affect the assessment.
Full details: Description check
Explanation
The description follows the repository template closely. It has the ELI5, What Changed (before and after, mechanism), Why, Visual Proof with images, Testing with checked items, Notes covering security, cross-platform, SSH, mobile, and performance, and a completed checklist. The Linked Issue section says N/A (maintainer), which the template allows for maintainers. The AI Disclosure and Review sections are empty headings, but the template says to leave AI Disclosure blank for StablyAI team members, so that is acceptable. The LoC block is extra but harmless.
Full details: Docstring Coverage
Explanation
Docstring coverage is 53.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 15 functions across 10 files. (12 skipped: 12 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Make the trust dialog scrollable for long source details.
If a folder path or Git URL wraps beyond the viewport, this fixed, vertically centered dialog has no height limit or scrolling. The Cancel and Install buttons can move off-screen. Enable scrollable on DialogContent so users can reach the decision controls. The shared primitive already provides the bounded scrolling behavior. (raw.githubusercontent.com)
The reason will be displayed to describe this comment to others. Learn more.
Minor · Security & Privacy · Quick win
Preserve custom ports in the repository shown for confirmation.
If a Git URL uses a custom port, parseGitRepositoryIdentity drops that port before this code builds repository. For example, https://git.example.com:8443/acme/plugin.git appears as git.example.com/acme/plugin, although installation uses port 8443. Git URL validation permits that input. Show the actual authority, including its port, so the user confirms the endpoint that will supply the plugin. (raw.githubusercontent.com)
set -u
echo'--- use-settings-page-effects.ts 200-240'
sed -n '200,240p' src/renderer/src/components/settings/use-settings-page-effects.ts
echo'--- settings-load-performance.ts 1-60'
sed -n '1,60p' src/renderer/src/components/settings/settings-load-performance.ts
echo'--- use-settings-store-model.ts 144-152'
sed -n '144,152p' src/renderer/src/components/settings/use-settings-store-model.ts
Repository: stablyai/orca
Length of output: 3148
Skip the trust prompt when the install hook has already unmounted.
A catalog install can store a trust request after its Plugins host has unmounted. Searching in Settings can unmount the Plugins section while fetchPreview is pending. The request then stays in the global store and reappears when the user returns to Plugins. Its Install button continues the old install.
Suggested fix
if (trustPrompt) {
setPhase(pluginKey, null)
+ // Why: an unmounted host cannot answer; a stored prompt would reappear on remount.+ if (!mountedRef.current) {+ return+ }
if (!(await confirmPluginInstallTrust(trustPrompt))) {
Committable suggestion
IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Suggested change
// Why here: the card, the page and every link-opened page install through this one gate.
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
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.
ELI5
Before this change, you could install a plugin from someone other than Orca with one click, and the only warning was a line on the plugin's page. Now Orca stops and asks "Make sure you trust " every time you install a plugin that isn't one of Orca's own. Themes and other look-only plugins get a lighter warning. Plugins that run code get a stronger one that lists what they can do. Cancel is the default button.
What Changed
Before: installing a non-official catalog plugin from its card, its page, or a page opened by an
orca://plugins/...link went straight to download. Installing from a Git URL or adding a development folder asked for nothing.After: every one of those paths opens one confirmation dialog first. Nothing downloads until you click Install (or Add folder for a development folder). Cancel, Esc and closing the dialog all back out.
github.com/acme/orca-notes), and the catalog name or folder path. The publisher comes from the catalog listing id, or from the URL owner for a Git URL install (the derived-publisher rule from plugins: derive the publisher from the repository owner, like a Go module path #36281). The manifest's ownpublisherfield is never shown.How it works: there is one async gate,
confirmPluginInstallTrust(prompt), in a small store (store/plugin-install-trust-request.ts).PluginInstallTrustDialogHost, mounted in the Plugins pane, renders it. The gate is called from:usePluginInstallAction.install, which card, page, and link-opened page installs all go through;PluginsSettingsSection.installfor Git URL and folder installs;PluginDevelopmentDialog.For a Git URL, the two-step flow from #36525 (check the version, then Install) stays as it is. The trust dialog opens on that final Install click, right before anything downloads.
presentation/plugin-install-trust.tsdecides which warning to show. It builds on the existingpluginPublisherNoticeand access-warning helpers instead of copying their logic. Deep links still only open the plugin's page, so a link cannot skip the dialog.orca plugin dev load(#36288) talks to the main process over runtime RPC without going through the renderer, so this dialog does not cover it. That is a terminal command the user types on purpose, and it is out of scope here.Why
Language packs can't rewrite this copy. Every key is under
auto.components.settings.PluginInstallTrustDialog.*. The existingauto.components.settings.Plugin*protected prefix covers that, and a unit test checks every key againstisProtectedPluginTranslationPath. The dialog also usessurface="security", so the structural rule from #36219 (now merged) picks it up: all 16 keys are in the regeneratedprotected-copy-keys.json.Linked Issue
N/A (maintainer; CEO request following #36218).
Visual Proof
Theme (softer wording), dark and light:
Plugin that runs code (stronger wording plus access list), dark and light:
Git URL install and development folder, captured through the real Plugins pane forms:
How these were captured: dev build in the background with
ORCA_BACKGROUND_LAUNCH=1, screenshots over CDP. The live catalogs have no community listings yet, so for the theme and code shots I added a temporary hook that was never committed. It called the real gate with prompts built bycatalogInstallTrustPromptfrom sample community listings. The Git and development folder shots come from the real forms.Testing
pnpm tc,oxlint,pnpm run check:code-quality:changed,verify:localization-catalogs,verify:localization-extraction,verify:localization-coverage,verify:localization-runtime-catalogpnpm testfor the plugin, settings, shared plugin and i18n suites (676 tests). New coverage:No e2e change is needed. The e2e fixtures serve their catalogs as the official one, and the existing
getByRole('dialog')).toHaveCount(0)checks after install now also show the dialog stays away for official plugins.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)