Skip to content

plugins(P2): deferred theme, icon-theme and terminal-theme contributions - #9663

Closed
nwparker wants to merge 2 commits into
mainfrom
nwparker/plugins-p2-theming
Closed

nwparker wants to merge 2 commits into
mainfrom
nwparker/plugins-p2-theming

Conversation

@nwparker

@nwparker nwparker commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Plugin-contributed theming (P2)

Adds declarative app themes, file icon themes, and terminal themes to the plugin system, including their registries, renderer state, Appearance controls, activation flow, consent disclosure, launch content, and packaging verification.

This is now rebased directly onto main (2cf91b8e69) and is no longer stacked on the Phase 1 branch. The PR remains draft pending review of the trust-surface contrast policy described below.

Contributions

Contribution Launch packs
themes stablyai.orca-midnight-theme, stablyai.orca-nord-theme
iconThemes stablyai.orca-minimal-icons
terminalThemes stablyai.orca-solarized-terminal

The launch catalog contains seven plugins. Midnight Theme and Navigation Shortcuts are bundled for offline installation.

Implementation

  • Validates theme manifests and keeps all contributions declarative and host-rendered.
  • Exposes a bounded public-token allowlist for app themes.
  • Rejects app-theme URLs, var(), declarations, quotes, braces, and escapes.
  • Realpath-confines icon files to the plugin package.
  • Size-limits and sanitizes SVGs with an element allowlist; rejects events, links, styles, URLs, declarations, and active content.
  • Accepts only known normalized terminal color slots.
  • Applies selections through host-owned registries and stores, with reload persistence and safe built-in fallbacks.
  • Preserves Navigation Shortcuts in the bundled index and the panel theme-revision regression coverage.
  • Repairs the real marketplace E2E journey to use current launch content and Nord as the P2 theme case.

Verification

Rebased result: d5184b9c84

  • pnpm typecheck — passed
  • pnpm lint — passed, including switch exhaustiveness, reliability gates, max-lines ratchet, manifests, and localization parity/coverage (11,480 keys per non-English locale)
  • Changed-test matrix — 29 files, 217 tests passed
  • Packaging verifier — 1 file, 4 tests passed
  • Fresh E2E Electron build — main 1,921 modules; preload passed; renderer 9,138 modules
  • Marketplace Electron E2E — passed against a real Git fixture and fresh profile, covering consent, install, selection, application, and reload
  • Broad suite stress run — 37,897 tests passed before temporary storage exhaustion caused 213 suite-load failures

Serial reruns cleared the apparent PTY, native-chat, SSH transport, orchestration, and project-context failures from that interrupted run. Six unchanged terminal-search decoration tests and three unchanged Electron config-contract tests remain unrelated/pre-existing. build:desktop completed the Electron output; its web projection later failed because out/renderer/.vite/manifest.json was absent. This PR does not change Electron/Vite configuration or the projector.

Visual evidence

Seven-plugin marketplace catalog:

Plugin catalog with all seven launch plugins

Declarative contribution consent:

Consent dialog listing declarative appearance contributions

Nord, Minimal Icons, and Solarized selected together:

All three plugin appearance contribution types selected

Built-in light-theme fallback:

Built-in light theme comparison

Constrained 820×900 layout:

Appearance settings at a constrained window size

Solarized terminal theme applied and marked current:

Solarized terminal preview and current plugin card

A standalone, screenshot-rich HTML review report is available locally at .tmp/plugin-p2-report/index.html. It is self-contained, ignored, and intentionally not part of the PR.

Security review and remaining policy decision

The contribution formats cannot inject content or bypass consent. One residual UX risk remains: host trust/consent dialogs currently inherit selected app-theme tokens, so a deliberately low-contrast theme could reduce the readability of later trust dialogs.

Before marking this ready, decide whether to enforce a contrast floor for trust surfaces or render them with a reserved host-owned palette.

Related continuation

Made with Orca 🐋

@nwparker
nwparker force-pushed the nwparker/plugins-p1-content-marketplace branch from 09c6309 to 11ac815 Compare July 24, 2026 23:45
@nwparker
nwparker force-pushed the nwparker/plugins-p2-theming branch 3 times, most recently from c7984a8 to 375f1b5 Compare July 25, 2026 02:31
@nwparker
nwparker force-pushed the nwparker/plugins-p1-content-marketplace branch from 595af0b to 45ac07f Compare July 25, 2026 05:35
@nwparker
nwparker force-pushed the nwparker/plugins-p2-theming branch from 375f1b5 to 349b5f1 Compare July 25, 2026 05:38
@nwparker
nwparker force-pushed the nwparker/plugins-p1-content-marketplace branch from 45ac07f to dbd31d5 Compare July 27, 2026 06:30
@nwparker
nwparker force-pushed the nwparker/plugins-p2-theming branch 2 times, most recently from ceea1cb to c18faa0 Compare July 27, 2026 06:52
@nwparker
nwparker force-pushed the nwparker/plugins-p1-content-marketplace branch from befa755 to 31ab3a3 Compare July 27, 2026 07:28
@nwparker
nwparker force-pushed the nwparker/plugins-p2-theming branch 3 times, most recently from 08f73e1 to e013f2f Compare July 27, 2026 08:15
@nwparker
nwparker changed the base branch from nwparker/plugins-p1-content-marketplace to main July 27, 2026 08:16
nwparker added 2 commits July 27, 2026 19:33
Re-applies the plugin-contributed theming that was pulled out of the Phase 1
content-pack PR so the deferred theming pass has a reviewable base. This is the
inverse of "plugins: defer theme/icon/terminal-theme contributions to a P2 pass"
plus the coherence fixes that a plain revert cannot know about:

- Keep stablyai.orca-navigation-shortcuts in the bundled plugin index alongside
  the restored midnight-theme pack. Phase 1 made it the bundled entry because
  verify-packaged-plugin-resources rejects an empty index; a bare revert would
  drop it.
- Update the launch-content expectation to both bundled plugins.
- Keep the panel theme-revision regression test added in Phase 1.

Restores: themes / iconThemes / terminalThemes manifest contributions, their
main-process registries and renderer stores, settings and activation glue, and
the midnight-theme, nord-theme, minimal-icons and solarized-terminal packs.

Not ready to merge as-is: this is the preserved starting point for the theming
pass, stacked on the Phase 1 branch.
@loick

loick commented Aug 23, 2026

Copy link
Copy Markdown

Big +1 on landing this — plugin-contributed app themes are the top thing I'm missing in Orca right now.

One concrete friction while this stays deferred: the theme plugins are already live in the public marketplace index (stablyai/orca-plugins → orca-marketplace.json) and are offered in the Install plugin dialog, but they're rejected on current releases (tested v1.4.188) with:

orca-plugin.json is invalid. Ask the plugin author to fix the manifest.

Root cause looks like the shipped manifest schema defines contributes as .strict() and doesn't include themes / iconThemes / terminalThemes yet — so stablyai/orca-nord-theme and stablyai/orca-midnight-theme (both pinned #v1.0.0) can't install at all.

Since this PR is still draft and currently conflicting with main, could it be rebased/landed — or, failing that, could the theme entries be gated out of the public marketplace index until it ships? Today they read as "available" but are uninstallable, which is confusing. Happy to help test on macOS.

@nwparker

Copy link
Copy Markdown
Contributor Author

Superseded by the rebuilt plugin stack on current main: themes in #30719 and icon themes in #30720 (stack #30636 → #30773). Closing; branch left in place.

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

2 participants