Show plugin hooks in plugin details#19859
Show plugin hooks in plugin details#19859abhinav-oai wants to merge 6 commits intoabhinav/hooks-browser-menufrom
Conversation
| pub struct PluginHookSummary { | ||
| pub event_name: HookEventName, | ||
| pub handler_count: usize, | ||
| } |
There was a problem hiding this comment.
will expand with more metadata in the future
There was a problem hiding this comment.
I think the follow-up shape should be per-handler rather than per-event:
PluginHookSummary {
key: String,
event_name: HookEventName,
matcher: Option<String>,
enabled: bool,
status_message: Option<String>,
definition: serde_json::Value,
display_order: i64,
}That is the smallest shape the app detail page needs to render the hook rows directly: event_name for the title, matcher + optional status_message for the compact description, enabled for the toggle state, definition for the JSON details modal, display_order so clients preserve backend/authored order, and key as the opaque handle for toggling one specific handler.
There was a problem hiding this comment.
then from this we can derive the event+count we need for the TUI /plugins
…-hooks-plugin-detail
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
9068881 to
68e62c4
Compare
Supersedes the abandoned #19859, rebuilt on latest `main`. # Why PR #19705 adds discovery for hooks bundled with plugins, but `/plugins` still only shows skills, apps, and MCP servers. This follow-up makes bundled hooks visible in the same plugin detail view so users can inspect the full plugin surface in one place. We also need `PluginHookSummary` to populate Plugin Hooks in the app; `hooks/list` is not enough there because plugin detail needs to show hooks for disabled plugins too. # What - extend `plugin/read` with `PluginHookSummary` entries for bundled hooks - summarize plugin hooks while loading plugin details - render a `Hooks` row in the `/plugins` detail popup <img width="3456" height="848" alt="CleanShot 2026-04-27 at 11 45 34@2x" src="https://github.com/user-attachments/assets/fe3a38d6-a260-4351-8513-fb04c93d725b" />
Supersedes the abandoned openai#19859, rebuilt on latest `main`. # Why PR openai#19705 adds discovery for hooks bundled with plugins, but `/plugins` still only shows skills, apps, and MCP servers. This follow-up makes bundled hooks visible in the same plugin detail view so users can inspect the full plugin surface in one place. We also need `PluginHookSummary` to populate Plugin Hooks in the app; `hooks/list` is not enough there because plugin detail needs to show hooks for disabled plugins too. # What - extend `plugin/read` with `PluginHookSummary` entries for bundled hooks - summarize plugin hooks while loading plugin details - render a `Hooks` row in the `/plugins` detail popup <img width="3456" height="848" alt="CleanShot 2026-04-27 at 11 45 34@2x" src="https://github.com/user-attachments/assets/fe3a38d6-a260-4351-8513-fb04c93d725b" />
Why
PR #19705 adds discovery for hooks bundled with plugins, but
/pluginsstill only shows skills, apps, and MCP servers. This follow-up makes bundled hooks visible in the same plugin detail view so users can inspect the full plugin surface in one place.We'll also need this
PluginHookSummaryto populate the Plugin Hooks in the App. We can't usehooks/listthere because we need to be able to show the hooks for disabled plugins as well.What
plugin/readwithPluginHookSummaryentries containing each hook event name and handler countHooksrow in the/pluginsdetail popup