Plugin actions on right-click context menus #1722
Replies: 8 comments
|
Same need here, from a plain git angle rather than a plugin-authoring one. I keep one space per repo, and the sidebar row already shows the branch and the ahead count. That row is exactly where I am looking when I notice I am 4 commits ahead. Right-clicking it and picking push would be the obvious next move, but the menu stops at Rename / Close / worktree, so I fall back to a terminal or a The keybind workaround works. But in a mouse-first tool it means the one surface that displays git state is the one surface that cannot act on it, and the action set the UI teaches is the only one that can never be extended. Not asking for built-in git commands. Appending plugin actions whose |
|
+1 from the agents sidebar, which this thread does not cover yet. On 0.8.2, right-click on a space still only offers Rename / Close / worktree. Right-click on an agent row does nothing at all — no menu. Plugin actions with That is the gap for inbox-style settle/archive: the natural click is the agent row, and there is currently no mouse surface for it. Keybinds work; the sidebar click does not. Herdr 0.8.2, macOS, stable channel. |
|
+1, with a concrete use case: forking agent sessions from the pane menu. I wrote a small local plugin with two actions, What is missing is the entry point. Forking is a spatial action — "give me this conversation again, to the right" — so the place it belongs is directly under For what it is worth, reading 0.8.2 to check whether I had misconfigured something: Any shape of the API is fine by me. Plain append after the built-in items, no icons, no ordering control, no way to replace built-ins, would already solve it. |
|
+1 with a concrete plugin-author case, reproduced on 0.8.2 and confirmed still absent in 0.9.0. Problem. I maintain herdr-plugin-space-colors, which registers one action per palette: Root cause matches what @BjoernSchotte found in #3183: Smallest change that would close the gap. Give Happy to test a preview build against the 18 actions above and report back. |
|
Windows data point in favor of giving Same situation as the reports above, on 0.9.0-preview (native Windows): an action declaring The recurring workaround advice ("make it a plugin, bind it to a key") does not land for mouse-first users, and on Windows it does not even work yet: the clipboard-oriented plugins I looked at (pane-id / context-locator style) shell out to A menu entry that dispatches an already-declared action needs no new manifest syntax and no new plugin code, and it would make plugins that already ship today usable by mouse on every platform, including Windows. |
|
need this for mouse user |
|
My case: every space is a git worktree, and I keep a local web dashboard with a page per worktree. I want to open the page for a space from its sidebar row. Today that takes a click on the row and then a keybinding. Either of these would cover it:
[1] herdr/src/client/shell/state.rs Lines 531 to 549 in 7b116c0 [2] herdr/src/api/schema/plugins.rs Lines 355 to 361 in 7b116c0 [3] https://herdr.dev/docs/plugins/#link-handlers |
Uh oh!
There was an error while loading. Please reload this page.
Current behavior
Plugin actions can declare
contexts = ["workspace" | "tab" | "pane" | ...]and can be bound to keys withtype = "plugin_action". Right-click context menus (workspace, tab, pane) are still a fixed builtin list only.Plugins such as
osamahbeig/herdr-pane-movertherefore cannot appear on the pane right-click menu even when they declare a pane-oriented action. Today they ship an overlay keybind workaround instead.Requested change
When building a right-click context menu, append enabled plugin actions whose manifest
contextsinclude the matching target:contextscontainsworkspacecontextscontainstabcontextscontainspaneSelecting a plugin row should:
invocation_source = "context_menu"HERDR_PLUGIN_CONTEXT_JSONfieldsEmpty
contextsshould stay keybind/CLI-only and should not add a menu row.No new manifest field is required; reuse the existing
contextsarray and platform/enabled filtering already used for plugin actions.Reason
Herdr already has the action/context model and pane/tab/workspace context menus, but no extension point connecting them. Pane-mover and similar plugins currently cannot offer the natural UX of “right-click pane → Move this pane…”.
Does this change UI, interaction, workflow, or product direction?
Yes — context menus gain plugin rows after the builtin items. Builtin items stay first; plugin rows append after them, sorted by
plugin_id/action_id.Impact details
contexts; no new manifest field required.invocation_source = "context_menu".contextsremains keybind/CLI-only.Contribution intent
Implementation sketch (ready after approval)
Branch on fork:
feat/plugin-context-menu-actionshttps://github.com/RaviTharuma/herdr/tree/feat/plugin-context-menu-actions
Core approach:
ContextMenuItem::{Builtin, Plugin}when the menu opens so render/hit-testing stay simple and the selected plugin action is stable for that open menu.contextsmatch the menu kind.invocation_source = "context_menu".All reactions