Skip to content

Add /hooks browser for lifecycle hooks#19882

Draft
abhinav-oai wants to merge 9 commits intodev/abhinav/hooks-config-writefrom
abhinav/hooks-browser-menu
Draft

Add /hooks browser for lifecycle hooks#19882
abhinav-oai wants to merge 9 commits intodev/abhinav/hooks-config-writefrom
abhinav/hooks-browser-menu

Conversation

@abhinav-oai
Copy link
Copy Markdown
Collaborator

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

Why

This is stacked on #19840.

hooks/list and hooks/config/write make lifecycle hooks inspectable and writable, but there is not yet a first-class TUI surface for users to see what is installed or manage individual handlers when an event has more than one hook. This adds a /hooks flow that makes those hooks discoverable without collapsing multiple handlers into one row, and keeps the interaction model consistent with the existing skills toggle UI (reference).

What

  • add a two-page /hooks browser in the TUI: an event overview with installed/active counts, followed by a per-event handler page with toggle controls and detail rendering
  • thread plugin identity and managed-state metadata through hook discovery and hooks/list so the UI can label plugin/config sources and suppress toggles for admin-managed hooks
  • persist hook toggles through the existing config-write path and add snapshot coverage for the event list, handler list, managed-hook, and empty states

Test Plan

  • cargo test -p codex-tui hooks_browser --lib
  • cargo test -p codex-hooks
  • cargo test -p codex-core-plugins
  • cargo test -p codex-app-server-protocol
  • cargo test -p codex-app-server --test all v2::hooks_list

@abhinav-oai abhinav-oai changed the title Add /hooks browser Add /hooks browser for lifecycle hooks Apr 27, 2026
Bojun-Vvibe added a commit to Bojun-Vvibe/oss-contributions that referenced this pull request Apr 27, 2026
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