Repository navigation
plugins: make Try it do the thing instead of opening the plugin page - #35846
Conversation
[Medium impact] The PR appears safe to merge, with one non-blocking issue left in the language-switch failure message. Findings
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.
Reviews (2) · Last reviewed commit: "plugins: address review on Try it (row's..." · Reviewed by Greptile |
| switchToPluginLanguage(pack) | ||
| toast.success( |
There was a problem hiding this comment.
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.
|
Warning Review limit reachedYou'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. View limit details
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
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
Files selected for processing: 14-
src/renderer/src/components/plugins/list/PluginManager.tsxsrc/renderer/src/components/plugins/page/PluginAddsSection.tsxsrc/renderer/src/components/plugins/page/PluginContributionActionLanguage.tsxsrc/renderer/src/components/plugins/page/PluginContributionActionPanel.tsxsrc/renderer/src/components/plugins/page/PluginContributionActionSyntax.tsxsrc/renderer/src/components/plugins/state/plugin-try-action.test.tssrc/renderer/src/components/plugins/state/plugin-try-action.tssrc/renderer/src/components/plugins/state/use-plugin-install-action.test.tsxsrc/renderer/src/components/plugins/state/use-plugin-install-action.tssrc/renderer/src/components/use-worktree-jump-palette-selection-lifecycle.tssrc/renderer/src/store/slices/editor/actions/untitled-file-creation.tssrc/renderer/src/store/slices/editor/types/editor-files-slice.tstests/e2e/helpers/plugin-gleam-catalog-fixture.tstests/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.
-
| if (contributes.newFiles.length > 0) { | ||
| return () => { | ||
| const newFile = collectActivePluginNewFiles(livePlugins(pluginKey))[0] |
There was a problem hiding this comment.
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)
…result, pending plugins)
…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.
…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.
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:
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 inPluginManageris removed. To support this, three small pieces were added or pulled out of existing code:openSampleFileInActiveWorkspacethat reuses the plugin new-file creation pathopenPluginPanelFromSettingsandswitchBackFromPluginLanguage, taken out of their buttonsmodalData.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 thatuntitled.gleamopens with the plugin grammar's token colours. Then it installs an Excalidraw-style editor, clicks Try it, and checks thatuntitled.excalidrawis created from its template and opens in the plugin editor.Testing
plugin-try-action.test.ts,use-plugin-install-action.test.tsx, the new e2e spec, and theplugin-install-linke2e, which still passes with the extended fixtureReview
Agent skill upstream boundary
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
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)