Skip to content

feat(plugins): one-line plugin settings copy, language coverage floor, roomier review dialogs - #30742

Closed
nwparker wants to merge 26 commits into
nwparker/plugins-v2-5-icon-themesfrom
nwparker/plugins-v2-6-settings-ux
Closed

nwparker wants to merge 26 commits into
nwparker/plugins-v2-5-icon-themesfrom
nwparker/plugins-v2-6-settings-ux

Conversation

@nwparker

@nwparker nwparker commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​234 $\color{#cf222e}{\Huge{\mathbf{−}}}$​39 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​195
Prod 39 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​561 $\color{#cf222e}{\Huge{\mathbf{−}}}$​446 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​115

ELI5

The plugin settings were wordy, the review dialogs were narrow and cramped, and Orca offered a "Português do Brasil" language that translated almost nothing. Now each setting has one short line, review dialogs are wide and read top to bottom, and a language only appears in the Language menu once it translates most of Orca.

What Changed

Before:

  • The official catalog offered a Portuguese pack covering 22 of about 16,000 strings, so picking it changed almost nothing.
  • Settings and dialogs had two- and three-line explanations of how plugins work internally.
  • With the plugin system off, a dashed box explained what happens to installed plugins.
  • Consent and marketplace preview dialogs were medium width, with bordered cards nested inside, and the whole dialog scrolled, buttons included.

After:

  • No stub language. The Portuguese pack is removed from the launch catalog.
  • Coverage floor.
    • Each language pack's coverage is measured when it loads.
    • Packs under 80% stay installed, but the Language menu doesn't offer them, and neither the renderer nor the main process switches to them.
    • The plugin card shows coverage, for example "pt-BR 0% translated".
  • One-line copy.
    • Plugin settings, dialog descriptions and errors say what something is in one short line.
    • Security warnings keep their risk statement in one sentence, for example "Its worker runs as a normal process with full access to your files, network, and other processes."
    • With the plugin system off, the page shows only the toggle.
  • Review dialogs.
    • Consent and marketplace preview dialogs are wider (sm:max-w-2xl) and single column. They run: header with provenance, then the warning, permissions, keyboard shortcuts, VM commands, and "What changed" for updates.
    • Sections are separated by rules rather than nested cards.
    • Only the middle scrolls, so Cancel and the primary button stay visible.
    • Install is sm:max-w-xl. Remove and rollback are compact confirmations.

How it works:

  • Launch catalog (resources/plugins/launch/): the Portuguese entry and its directory are deleted. The marketplace e2e now builds a complete test language pack from the English catalog (tests/e2e/helpers/plugin-language-pack-fixture.ts).
  • Coverage (src/shared/plugins/plugin-language-pack-coverage.ts, src/main/plugins/plugin-language-pack-registry.ts):
    • Coverage is the share of non-empty, translatable English strings the pack translates. Plugin security copy is excluded, since packs may never replace it.
    • Main imports the English catalog lazily, only when a language pack loads.
    • The value travels on the existing language-pack registration as coverage.
    • usePluginLanguagePacks, the macOS notice hooks and the main-process menus use only packs at or above the floor.
  • Entry cap: the per-pack entry cap rises from 20,000 to 50,000, because a complete pack is already about 18,000 entries.
  • Copy standard (docs/STYLEGUIDE.md): a "Settings subtext" rule (one line, aim for 80 characters, say what it is, no mechanics or reassurance outside security copy). All five shipped translations are updated.
  • Dialogs (plugin-review-dialog-layout.tsx, PluginConsentDialog.tsx, PluginMarketplacePreviewDialog.tsx, the keyboard-shortcut and VM-recipe previews): DialogContent uses a three-row grid. PluginReviewBody is the scrolling middle row, and PluginReviewSection is a headed block divided by rules.

Why

  • Measure coverage in main, at load. The renderer doesn't hold the full English catalog. Main already lazy-loads locale catalogs, so measuring there costs nothing until a pack loads, and the main-process menus get the same answer as the renderer.
  • Hide partial packs instead of rejecting them. Authors can still install and test a pack while it is incomplete. Users only see languages that actually change Orca.
  • A style-guide rule, not a lint. The standard is enforced in review; a character-count rule on translation keys would be process machinery for little gain.
  • Wider, single-column dialogs with a fixed footer. Permission lists and shortcut previews were squeezed into a medium dialog with cards inside cards. The decision buttons scrolled away on small windows.

Linked Issue

None. This is part of the plugin platform rework (maintainer change).

Visual Proof

Screenshots from a hidden dev window (ORCA_BACKGROUND_LAUNCH=1, isolated profile, mock keychain), captured over CDP. A local copy of the old Portuguese pack is installed so its coverage shows.

  • Installed plugins, before and after (copy, coverage line): Before · 2-installed.png After · 2-installed.png
  • Consent dialog at 1280 px, before and after: Before · 3-consent-1280.png After · 3-consent-1280.png
  • Consent dialog at 900 px, before and after: Before · 4-consent-900.png After · 4-consent-900.png
  • Marketplace preview, before and after: Before · 7-preview.png After · 7-preview.png
  • Install dialog, before and after: Before · 5-install.png After · 5-install.png
  • Language menu, before (offers the 0% pack) and after (doesn't): Before · 8-language-picker.png After · 8-language-picker.png
  • Plugin system off, after (toggle only): After · 9-system-off.png

Testing

  • Unit tests:

    • Coverage counting, ignoring keys English lacks, and the floor (plugin-language-pack-coverage.test.ts).
    • The registry reports coverage (plugin-language-pack-registry.test.ts).
    • Partial packs stay in the store but aren't offered (plugin-language-packs-startup.test.ts).
    • The plugin card shows coverage (PluginSettingsRow.test.tsx).
    • "What changed" sits after the permissions (PluginConsentDialog.test.tsx).
  • Local suites: 15,721 tests in the plugin, shared, i18n, startup, store, hooks, settings, editor, native-chat and UI suites pass. tc:node, tc:web, oxlint, check:code-quality:changed, localization catalog and coverage checks are clean.

  • End-to-end: the plugin e2e specs (demo, marketplace content with the generated language pack, panel containment ×2, startup budget) pass locally, run in the background.

  • Platforms: macOS locally. This draft skips most CI jobs, so Linux and Windows aren't covered yet.

  • 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

  • Remote catalog: the official marketplace repository still lists the Portuguese pack, and that list isn't in this repo. Removing it there is a separate change. Until then, it can be installed but is never offered as a language.
  • Compatibility: coverage is a new field on a registration that only crosses IPC within one app version, so there is no wire-compatibility concern. Settings are unchanged.
  • Security: protected plugin security copy is still not translatable, and it doesn't count toward coverage. The shortened consent warnings keep the same risk statements.
  • SSH: language packs and these dialogs are local UI and are unaffected by where a workspace runs.
  • Depends on: the icon themes PR.

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). Targeted suites, tc:node, tc:web, oxlint, the change-quality gate, localization checks and plugin e2e pass locally; full pnpm lint not run.

@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from cbe1dea to 42f40c5 Compare October 19, 2026 21:42
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch 2 times, most recently from c5c5ba8 to 059672d Compare October 21, 2026 06:32
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from 42f40c5 to 111ab32 Compare October 21, 2026 06:51
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch from 059672d to 796fc9a Compare October 21, 2026 12:23
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from 111ab32 to b04942d Compare October 21, 2026 12:23
@nwparker
nwparker marked this pull request as ready for review October 21, 2026 12:24
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch from 796fc9a to 33aa2d0 Compare October 21, 2026 20:09
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from b04942d to c50d65b Compare October 21, 2026 20:10
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch from 33aa2d0 to de95f9d Compare October 24, 2026 11:43
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch 2 times, most recently from 9e95019 to 7452b90 Compare October 25, 2026 05:23
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch from de95f9d to 0c09906 Compare October 25, 2026 05:23
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from 7452b90 to eb24515 Compare October 26, 2026 12:04
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch 2 times, most recently from afce228 to 3157f58 Compare October 26, 2026 12:32
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from eb24515 to 0d68d0b Compare October 26, 2026 12:32
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch from 3157f58 to a64d875 Compare October 28, 2026 04:57
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from 0d68d0b to e835a1e Compare October 28, 2026 04:57
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch from a64d875 to f1ac3ec Compare October 28, 2026 05:30
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from e835a1e to 086c8f0 Compare October 28, 2026 05:30
…owlist and size cap

Plugin and marketplace sources were a real clone/checkout, so user hooks,
smudge filters and core.hooksPath ran, insteadOf rules could reach any
transport, and nothing bounded the download. Now a --no-checkout depth-1
clone (or exact-commit fetch) runs with an empty hooks path, only the https
and ssh transports, and Orca writes the commit's exact blobs from ls-tree +
cat-file --batch. Symlinks, submodules, .git aliases, colliding portable
paths and SHA-256 repositories are refused. A size watcher stops the whole
Git process tree once the pack outgrows an approximate cap.

The exact argv lives in shared code and joins the real-Git compatibility
matrix, so the Git 2.25 lane runs it. Tests reach fixtures over an SSH
shim, since file transports are now refused.
data < instructional < sandboxed-ui < trusted-worker. A v2 manifest is
strict and fails when it carries contributions beyond its profile; v1
manifests keep loading with the least profile inferred from what they
declare.
A v2 catalog entry carries the release it vouches for: commit, content
hash, version, profile, minimum Orca and contribution types. Preview and
install fetch that commit directly and refuse bytes that differ. The v1
file stays strict and frozen for shipped clients; v2 entries strip unknown
keys, and entries this client cannot install are dropped at parse time.

Catalog fetches read only the index blobs under their own download cap,
so a catalog repository is not held to one plugin's limits. Release-bearing
snapshots are cached under a new key, so an older build never reads them
and simply refetches.

readMarketplaceJson and parseMarketplaceFile from #30612 are replaced by
parsePluginMarketplaceIndex: catalogs are now read as Git blobs, so the
on-disk JSON read has no caller left.
Plugin downloads now refuse the file transport, even through an insteadOf
rewrite, so the fresh-profile marketplace journey reaches its fixture
repositories through the GIT_SSH_COMMAND shim the unit tests use.
Consent for any plugin that runs code (a v2 sandboxed-ui or trusted-worker
profile, or a v1 manifest with a worker or panel) now names its installed
content hash, so an update cannot swap code under an old approval. Shipped
v1 installs re-prompt once. Data packs keep their fingerprints, and dev
trees stay unbound so a save doesn't re-prompt. The re-review notice is one
short line.
The content verifier cached its first check, so bytes swapped between a
crash and its restart still ran. The controller now hands the manager one
uncached verifyBeforeSpawn hook that runs before every spawn, including
crash restarts, and replaces the cached first-start check, so nothing is
hashed twice and a running worker is reused without hashing. It is an
integrity check, not a sandbox: Node still reads files after it. Approval
is re-asserted at the same points, so a revoked plugin stops restarting
instead of counting as a crash, and cancellation does not wait on a hash.
A refresh that changes a running worker's spec used to stop it and wait for
the next command or event. Reconcile now restarts it once on the new spec
after every stop, through the same approval and integrity path, and skips
the restart if a newer reconcile or dispose has taken over. Idle workers
stay lazy.
Approval of worker and panel plugins now names their exact bytes, so
switching the demo plugin from its installed copy to the dev folder asks
for review again; the journey approves the dev copy before using it.
Manifests can contribute themes (public CSS tokens over a light or dark
base) and terminal themes (an ANSI palette), each at most 16 KiB. App
themes must set --background and --foreground; omitted tokens are derived
from them (surfaces copy the background, muted text, borders and accents
mix the foreground into it), and values must be colors (no keywords,
lengths, calc, var or url). Both load through the shared artifact-pack
registry with the plugin's display name and a content revision, reach the
renderer over IPC and are re-validated there. Catalog releases can declare
app-theme and terminal-theme, and marketplaces stop hiding theme listings.
docs/reference/plugin-themes.md documents the format.
Selecting a plugin terminal theme saves a copy of its palette in settings
(terminalPluginPalettes). The shared lookup reads it, so main, headless
serve and relays answer terminal color queries and native chat matches the
terminal without the plugin loaded; a malformed snapshot falls back to the
default theme.
Appearance keeps the System/Dark/Light control until a plugin offers a
theme; then Theme becomes one list with plugin themes after a divider,
labelled with the publisher when names collide. Choosing one stores its
base in theme and remembers the earlier built-in choice, which comes back
while the plugin is off or after it is uninstalled; a plugin update that
changes the base re-syncs theme. It also offers the plugin's terminal
colors in one click.

The renderer paints only values CSS parses as colors, checks every
text/surface pair, ring and border against the effective set (plugin
values over this mode's built-ins) and repeats until nothing changes, so
dropping one pair cannot expose another. The applied theme is cached with
its id and revision, painted before first render, and dropped as soon as
settings show it no longer applies. Main bounds the new settings on every
write and load, and uninstalling a plugin clears its theme choices and
palette copies. Terminal themes appear under Plugins in the picker with the
plugin's name and are passed to lookups instead of read from a store.
An icon theme maps the file, folder and folder-open slots plus exact file
names and extensions to SVGs. Listing reads only the mapping. A theme's
SVGs are read only when it is selected, once per distinct file, under
per-icon, per-theme and icon-count caps, and are sent as text with index
maps so the renderer sanitizes and registers each icon once. Catalog
releases can declare icon-theme, and marketplaces stop hiding icon packs.
Appearance gains an Icon theme row while an enabled plugin offers one.
The renderer parses each SVG with the browser's XML parser and keeps only
allowlisted SVG elements and un-namespaced attributes; url() may name only
a fragment in the same icon, so gradients, clip paths and masks work.
Each icon becomes one blob URL and one CSS rule keyed by its index, so
rows carry a small attribute instead of the image. Icons drawn only in
currentColor render as masks that follow the text color. FileTypeIcon
and the explorer's folders fall back to the built-in icons when the
plugin is disabled, a path has no mapping, or an SVG is rejected.
Uninstalling the plugin clears the setting.
Icon theme file names and extensions such as constructor no longer resolve to
inherited Object.prototype members, and registered icon indexes must point at a real SVG.
The pack translated 22 of about 16,000 strings, so choosing it changed
almost nothing. The marketplace e2e now installs a generated pack built
from the English catalog instead.
Main measures each pack against the translatable English strings when it
loads (the English catalog is imported lazily, only then). Packs under
80% stay installed and their plugin card shows how much they translate,
but neither the Language picker nor the main process switches to them.
The catalog entry cap rises to 50,000 because a complete pack is already
close to the old 20,000.
Plugin settings, dialogs and errors now say what a thing is in one short
line instead of explaining how it works. Security warnings keep their risk
statement in one sentence. The plugin-system toggle stands alone when the
system is off. The style guide records the standard, and translations are
updated.
Consent and marketplace preview dialogs are 2xl wide with one column:
header with provenance, then the warning, permissions, shortcuts, VM
commands and, for updates, what changed, separated by rules instead of
nested cards. Only the body scrolls, so the decision buttons stay in view.
Install is xl; remove and rollback are compact confirmations.
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch from f1ac3ec to 59c239f Compare October 28, 2026 10:53
@nwparker
nwparker force-pushed the nwparker/plugins-v2-6-settings-ux branch from 086c8f0 to 26d649b Compare October 28, 2026 10:53
@nwparker
nwparker force-pushed the nwparker/plugins-v2-5-icon-themes branch from 59c239f to 6bc70e5 Compare October 28, 2026 22:14
@nwparker nwparker mentioned this pull request Oct 28, 2026
7 of 9 tasks
@nwparker

Copy link
Copy Markdown
Contributor Author

Folded into #35470 (Plugin Alpha), which lands the rest of the plugin stack in one PR.

@nwparker nwparker closed this Oct 28, 2026
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.

1 participant