Skip to content

Show plugin hooks in plugin details#19859

Closed
abhinav-oai wants to merge 6 commits intoabhinav/hooks-browser-menufrom
abhinav/plugin-hooks-plugin-detail
Closed

Show plugin hooks in plugin details#19859
abhinav-oai wants to merge 6 commits intoabhinav/hooks-browser-menufrom
abhinav/plugin-hooks-plugin-detail

Conversation

@abhinav-oai
Copy link
Copy Markdown
Collaborator

@abhinav-oai abhinav-oai commented Apr 27, 2026

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'll also need this PluginHookSummary to populate the Plugin Hooks in the App. We can't use hooks/list there because we need to be able to show the hooks for disabled plugins as well.

What

  • extend plugin/read with PluginHookSummary entries containing each hook event name and handler count
  • summarize bundled plugin hooks while loading plugin details
  • render a Hooks row in the /plugins detail popup
CleanShot 2026-04-27 at 11 45 34@2x

pub struct PluginHookSummary {
pub event_name: HookEventName,
pub handler_count: usize,
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

will expand with more metadata in the future

Copy link
Copy Markdown
Collaborator Author

@abhinav-oai abhinav-oai Apr 29, 2026

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

then from this we can derive the event+count we need for the TUI /plugins

@abhinav-oai abhinav-oai marked this pull request as ready for review April 27, 2026 19:13
@abhinav-oai abhinav-oai requested a review from a team as a code owner April 27, 2026 19:13
Base automatically changed from dev/abhinav/plugin-hooks-discovery to main April 28, 2026 21:17
@abhinav-oai
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@abhinav-oai abhinav-oai changed the base branch from main to abhinav/hooks-browser-menu April 29, 2026 18:26
@abhinav-oai abhinav-oai force-pushed the abhinav/plugin-hooks-plugin-detail branch from 9068881 to 68e62c4 Compare April 29, 2026 18:26
abhinav-oai added a commit that referenced this pull request May 7, 2026
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"
/>
Oreoxp pushed a commit to Oreoxp/codex-cli that referenced this pull request May 7, 2026
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"
/>
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