Repository navigation
feat(logging): bulk download selected log entries as CSV - #865
Open
josephfusco wants to merge 4 commits into
Open
josephfusco wants to merge 4 commits into
josephfusco wants to merge 4 commits into
Conversation
Adds a "Download Selected" bulk action to the logs list. Selected entries are streamed to php://output as a single CSV, fetched one at a time so memory stays flat, and capped by the filterable wpgraphql_logging_bulk_download_limit (default 1000). The single-entry download now shares the same header/stream/write code path.
Contributor
📦 Plugin Artifacts Ready!Download from GitHub Actions run Available plugins:
See the "Artifacts" section at the bottom of the Actions run page |
Second review pass (correctness and security): - Escape cells that spreadsheets would evaluate as formulas. Log values such as the query and message come from unauthenticated GraphQL requests, so an exported CSV could otherwise run attacker formulas. - Drop open output buffers before streaming so large exports are not held in memory. - Ignore non-scalar IDs (absint() turns arrays into 1) and reuse the service's ID sanitizer in the list table.
…ge cases Third review pass (tests and static analysis): - Cover the ViewLogsPage load-time hook end to end: bad nonce and the 'Logs not found' path through the real database service. - Assert formula cells are escaped and plain cells are left alone. - Assert non-scalar IDs are dropped instead of becoming ID 1.
…le setup Fourth review pass (simplification, performance and docs): - Only build the list table at load time when the bulk download action is actually requested, instead of on every page load. - Document the Download Selected bulk action, the 1,000-row cap and its filters, and formula escaping in the plugin docs.
josephfusco
marked this pull request as ready for review
October 30, 2026 19:56
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.
Adds a "Download Selected" bulk action that streams the selected log entries as one CSV. Cells that a spreadsheet would run as formulas are now escaped in every download.
Closes #405
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with implementing bulk log downloads.