Chat: Discover panel surfaces hidden capabilities#69
Merged
Conversation
…#68) Adds a "Discover capabilities" panel below the chat UI on the openclaWP Chat admin page. Each row shows one capability surface with a one-line description, a population count or "Not set up yet" hint, and a link to that page. This is the discovery anchor that complements #68 (hide-when-empty submenu items): with the menu condensed, a first-time user now has one obvious place to see what openclaWP can do. Refactor: - `OpenclaWP_Admin_Menu_Visibility::is_surface_populated( string $slug ) : bool` and `surface_count( string $slug ): ?int` extracted as public static methods so the menu gating and the Discover panel share one source of truth (no risk of disagreeing about whether a capability is set up). - New `parent_for_slug()` convenience wrapper centralises the `add_submenu_page` parent-resolution pattern; 8 admin classes updated to use it. The panel is dismissible per user (stored in `openclawp_discover_dismissed` user meta). Settings page exposes a "Show it again" affordance. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
lezama
added a commit
that referenced
this pull request
May 19, 2026
Adds an `openclawp_agent_file` CPT and a wp-admin → openclaWP → Agent files surface for authoring markdown documents (AGENTS.md, SOUL.md, BOOTSTRAP.md, …) that customise agent behaviour without touching PHP. Files target a specific agent via the `agent_slug` meta, or apply globally when that meta is empty. The new submenu is hide-when-empty (PR #68 pattern) and the Discover panel (PR #69) picks up the new surface automatically through the shared `OpenclaWP_Admin_Menu_Visibility::surface_count()` helper. A follow-up PR will wire the file contents into the runtime prompt assembler so the agent actually reads them — this PR ships the CPT + admin UI first so admins can start authoring while the runtime side bakes (TODO note in the store class header). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a "Discover capabilities" panel below the chat UI on the openclaWP Chat admin page. Each row shows one capability surface with a one-line description, a population count or "Not set up yet" hint, and a link to that page.
This is the discovery anchor that complements #68 (hide-when-empty submenu items): with the menu condensed, a first-time user now has one obvious place to see what openclaWP can do.
Refactor
OpenclaWP_Admin_Menu_Visibility::is_surface_populated( string $slug ): boolandsurface_count( string $slug ): ?intextracted as public static methods so the menu gating and the Discover panel share one source of truth — no risk of disagreeing about whether a capability is set up.parent_for_slug()wrapper centralises theadd_submenu_pageparent-resolution pattern; 8 admin classes updated to use it.Dismissal
The panel is dismissible per user (
openclawp_discover_dismisseduser meta). The Settings page exposes a "Show it again" affordance only when the current user has dismissed it.Why
Follow-up to the UX review of the full plugin tour. #68 hid 8 empty surfaces from the sidebar; without a discovery surface, those capabilities would be invisible until something populates them.
Test plan
AdminMenuVisibilityTestcases).🤖 Generated with Claude Code