Skip to content

feat(logging): add a search bar to the All Logs page - #864

Open
josephfusco wants to merge 4 commits into
mainfrom
feat/logging-search
Open

josephfusco wants to merge 4 commits into
mainfrom
feat/logging-search

Conversation

@josephfusco

@josephfusco josephfusco commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Adds a search box to the All Logs page that matches the log message and GraphQL query, and keeps search and filters in the URL across pages. Sites that override the filters template now need to output the wpgraphql_logging_nonce field.

Closes #484

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with implementing the logs search bar.

Adds the standard WP_List_Table search box to the logs list. The term is
matched with a LIKE against the message column and the top-level query in
the context JSON, and composes with the date and level filters.

The filter form now posts the filter nonce so that searches and filters are
redirected to GET, which keeps them in the pagination and sorting links.
@josephfusco josephfusco added the [Type] Enhancement A suggestion for improvement of an existing feature label Oct 30, 2026
@josephfusco josephfusco added this to the WPGraphQL Logging Plugin milestone Oct 30, 2026
@josephfusco josephfusco added the [Area] Logging Issues for the WPGraphQL Logging plugin label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

📦 Plugin Artifacts Ready!

Download from GitHub Actions run

Available plugins:

  • ✅ wpgraphql-logging.zip

See the "Artifacts" section at the bottom of the Actions run page

add_query_arg() does not encode values, so a search term with "&", "#" or
"+" split into extra query args, and wp_safe_redirect() stripped characters
such as "$" and "{" that appear in GraphQL queries. Encode the filter and
search values in both the filter redirect and the bulk action redirect.
Adds wpunit coverage for quotes and backslashes in searched queries and for
telling bulk actions apart from filter submits, plus a Playwright spec for
searching the logs list and combining search with the level filter.
Moves the search and filter request keys to ViewLogsPage::FILTER_KEYS, so the
filter redirect, the page-number check and the bulk action redirect use the
same list. Documents the search box in the admin guide, and the search where
condition in the custom log store guide.
@josephfusco
josephfusco marked this pull request as ready for review October 30, 2026 19:56
@josephfusco
josephfusco requested review from a team and colinmurphy as code owners October 30, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Logging Issues for the WPGraphQL Logging plugin [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(logging): Add a search bar to the listing page

1 participant