Skip to content

plugins: make Try it do the thing instead of opening the plugin page - #35846

Merged
nwparker merged 2 commits into
mainfrom
nwparker/plugin-try-it-acts
Oct 29, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/plugin-try-it-acts

Conversation

@nwparker

@nwparker nwparker commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​251 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​245
Prod 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​294 $\color{#cf222e}{\Huge{\mathbf{−}}}$​92 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​202

ELI5

After installing a plugin, the "Try it" button now actually lets you try it. Before, it just took you to the plugin's details page you were already looking at.

What Changed

Before: installing e.g. the Gleam plugin showed a toast "Gleam installed · Try it". Clicking Try it opened the plugin's details page, where the only hint was "Open any .gleam file".

After, Try it does something different for each kind of plugin:

  • Themes and icon themes: no change on install. They are already applied, and the toast says "Now using X · Switch back". On the details page, the file icon theme row now has a Try it button that applies the icons and opens the file tree.
  • Syntax plugins (Gleam, Prisma, Nix, Godot, LaTeX): open a short sample file of that language in a new untitled tab, so you see the highlighting straight away. If the plugin has its own new-file template, that is used instead. If Orca has no sample for that file type, there is no Try it. The details page row shows the same Try it button, or keeps the "Open any .x file" hint when there is no sample.
  • Custom editors (Excalidraw): create and open a new file from the plugin's template. Editors without a template (Spreadsheet, Docx) get no Try it.
  • Language packs: switch the interface language, with Switch back on the toast.
  • Panels: open the panel. Commands: open the command palette searched to the plugin's name, so its commands are listed.
  • Anything else (agent recipes): the toast just says "installed", with no Try it.

How it works: pluginTryAction (new, plugins/state/plugin-try-action.ts) picks the action from the installed manifest when the toast appears. It reads Orca's live registrations only when you click, because those arrive after the install finishes. The old navigate-to-page fallback in PluginManager is removed. To support this, three small pieces were added or pulled out of existing code:

  • a store action openSampleFileInActiveWorkspace that reuses the plugin new-file creation path
  • openPluginPanelFromSettings and switchBackFromPluginLanguage, taken out of their buttons
  • the Cmd+J palette can now start with a search already typed in (modalData.query)

If Try it needs an open workspace and there isn't one, it says so in a toast instead of doing nothing.

Why

Teammate feedback from the alpha: "Try it doesn't work. It just takes me to the details page." The alternative was to remove Try it. We kept it because, for most plugin types, there is a single obvious action that shows the plugin working. For types where there isn't one, the button is now hidden, so it never promises more than it does. The samples are built into Orca because catalog grammars don't ship a sample file, and an empty file shows no highlighting.

Linked Issue

N/A (internal feedback from the plugin alpha)

Visual Proof

Covered by a new hidden-window e2e test (tests/e2e/plugin-try-it.spec.ts). It installs Gleam from a catalog fixture, clicks Try it on the toast, and checks that untitled.gleam opens with the plugin grammar's token colours. Then it installs an Excalidraw-style editor, clicks Try it, and checks that untitled.excalidraw is created from its template and opens in the plugin editor.

Testing

  • I manually tested these changes locally (hidden Electron e2e on macOS)
  • Automated tests added/updated: plugin-try-action.test.ts, use-plugin-install-action.test.tsx, the new e2e spec, and the plugin-install-link e2e, which still passes with the extended fixture

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

The sample and new files are created through the same workspace-host file path the + menu uses, so they work for local, SSH and runtime workspaces, and for folder workspaces. File names use the existing untitled<ext> helper, which works on every platform. No change to anything sent between clients and hosts.

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)

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with one non-blocking issue left in the language-switch failure message.

Findings

  1. P2 Failed language switch looks successful ▶

Summary

“Try it” now opens a sample, creates a plugin file, switches language, opens a panel, or searches commands instead of reopening the plugin page.

  • Install toasts offer direct ways to try supported plugins.
  • Plugin details let people try syntax and file icon themes.
  • Plugin samples and templates open as files in the active workspace.

Reviews (2) · Last reviewed commit: "plugins: address review on Try it (row's..." · Reviewed by Greptile

Comment on lines +84 to +85
switchToPluginLanguage(pack)
toast.success(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Failed language switch looks successful

switchToPluginLanguage returns before the settings write finishes, so “Now using” appears before the language changes. If the write fails, the interface keeps its previous language but the success toast remains. updateSettings catches the error, so the existing error toast does not run either. Wait for a successful write through updateSettingsOrThrow before reporting success.

Comment thread tests/e2e/plugin-try-it.spec.ts Resolved
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1cfa2ae8-ce06-4719-9f8f-3adcef26f311
Commits

Reviewing files that changed from the base of the PR and between 1b697ce and a8996a1.

Files selected for processing: 7
  • src/renderer/src/components/plugins/catalog/PluginInUseAction.tsx
  • src/renderer/src/components/plugins/page/PluginAddsSection.tsx
  • src/renderer/src/components/plugins/page/PluginContributionActionLanguage.tsx
  • src/renderer/src/components/plugins/state/plugin-try-action.ts
  • src/renderer/src/components/plugins/state/use-plugin-install-action.ts
  • src/renderer/src/i18n/locales/en.json
  • tests/e2e/plugin-try-it.spec.ts
Walkthrough

After a successful plugin install, the toast action is selected from the plugin’s manifest contributions. Supported actions include opening plugin-created files, syntax samples, language packs, panels, and commands. Contribution pages add Try it actions for icon themes and available syntax samples. The change also adds sample-file creation in the active workspace, initializes the worktree palette query from modal data, and tests the install-toast flow with Gleam and Excalidraw plugins.

Priority: Normal

Merge Risk: Low · previous review 1b697

The change is mergeable with owner awareness, but Try it can do nothing for a plugin awaiting approval or apply a different icon theme than the selected row. The new highlighting test can also pass before the sample renders.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 57.14% 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 Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title "plugins: make Try it do the thing instead of opening the plugin page" matches the main change. The PR replaces the Try it fallback that opened the plugin details page with plugin-type-speci…
Description check Passed The description follows the template structure: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review/upstream boundary, Notes, and Checklist are all present. It explains the before and…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "plugins: make Try it do the thing instead of opening the plugin page" matches the main change. The PR replaces the Try it fallback that opened the plugin details page with plugin-type-specific actions (sample files, templates, language switch, panels, commands). The title is specific and conveys the primary change, though the phrase "do the thing" is informal.

Full details: Description check

Explanation

The description follows the template structure: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review/upstream boundary, Notes, and Checklist are all present. It explains the before and after behavior per plugin type, the mechanism (pluginTryAction, live registrations read on click, removal of the PluginManager fallback), and the rationale for keeping Try it. The Linked Issue section reads "N/A (internal feedback from the plugin alpha)" and does not link an issue, although the template says a link is required for outside contributors. The Visual Proof section describes an e2e test but attaches no before/after screenshots or video, though the template requires them for UI behavior changes. The AI Disclosure section is empty. The Testing checkboxes are ticked, and the new e2e spec is described.

Resolution

Optional improvements: add a Fixes # link or confirm the author is a maintainer who needs no issue, attach before/after screenshots or a video for the UI change (the template requires them and the description only describes the e2e test), and complete the AI Disclosure section or confirm it does not apply.

Full details: Docstring Coverage

Explanation

Docstring coverage is 57.14% 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 14 functions across 14 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1d4c98b7-0aa3-470c-ba68-87a02855b608
Commits

Reviewing files that changed from the base of the PR and between 48eca8c and 1b697ce.

Files selected for processing: 14
  • src/renderer/src/components/plugins/list/PluginManager.tsx
  • src/renderer/src/components/plugins/page/PluginAddsSection.tsx
  • src/renderer/src/components/plugins/page/PluginContributionActionLanguage.tsx
  • src/renderer/src/components/plugins/page/PluginContributionActionPanel.tsx
  • src/renderer/src/components/plugins/page/PluginContributionActionSyntax.tsx
  • src/renderer/src/components/plugins/state/plugin-try-action.test.ts
  • src/renderer/src/components/plugins/state/plugin-try-action.ts
  • src/renderer/src/components/plugins/state/use-plugin-install-action.test.tsx
  • src/renderer/src/components/plugins/state/use-plugin-install-action.ts
  • src/renderer/src/components/use-worktree-jump-palette-selection-lifecycle.ts
  • src/renderer/src/store/slices/editor/actions/untitled-file-creation.ts
  • src/renderer/src/store/slices/editor/types/editor-files-slice.ts
  • tests/e2e/helpers/plugin-gleam-catalog-fixture.ts
  • tests/e2e/plugin-try-it.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Comment on lines +108 to +110
if (contributes.newFiles.length > 0) {
return () => {
const newFile = collectActivePluginNewFiles(livePlugins(pluginKey))[0]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Do not offer a silent action for a plugin awaiting approval.

If installation leaves a plugin awaiting review, contributes.newFiles still creates a “Try it” action. On click, collectActivePluginNewFiles excludes that plugin, and the handler does nothing. The removed details-page fallback no longer takes the user to the required review. Show the unavailable reason or take the user to the review when no live new-file registration exists. (raw.githubusercontent.com)

Comment thread tests/e2e/plugin-try-it.spec.ts Resolved
@nwparker
nwparker merged commit b28f54c into main Oct 29, 2026
54 checks passed
nwparker added a commit that referenced this pull request Oct 30, 2026
…gs in every locale

Covers strings added by #36100 and #35846 (category chips, install-state tabs,
access labels, the trusted-code warning, Try it) plus the plugin-pane strings
German, Portuguese, Russian, Turkish and Traditional Chinese never received.
Games, Agents and Integrations chips now read from the catalog instead of the slug.
nwparker added a commit that referenced this pull request Oct 30, 2026
…gs in every locale (#36215)

Covers strings added by #36100 and #35846 (category chips, install-state tabs,
access labels, the trusted-code warning, Try it) plus the plugin-pane strings
German, Portuguese, Russian, Turkish and Traditional Chinese never received.
Games, Agents and Integrations chips now read from the catalog instead of the slug.
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