perf: Add an ID-only response for rows - #393
Merged
Merged
Conversation
priethor
force-pushed
the
priethor/add/rows-ids-shape
branch
from
July 17, 2026 20:33
ff41a32 to
b446585
Compare
Calculations aggregate the whole filter and search scope rather than the current page, so they belong with the ID list, which is the only part of the response that knows that scope. The shape=ids branch validated the parameter and then dropped it without saying so. Both shapes now share one calculations_for_scope() helper, so a paged request reports the same totals whichever shape it asked for.
priethor
marked this pull request as ready for review
July 28, 2026 22:47
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.
What
Part of #298.
The rows endpoint now accepts
shape=ids, which returns the same ordered and filtered result as a full request, but with IDs and pagination totals instead of row data. It is available in edit context, supports up to 1,000 IDs per page, and leaves full responses as the default. Requested calculations still cover the entire result, not just the current page.Core REST row responses now return the same cover and field data as the rows endpoint.
Why
This separates the row list from the row records before moving those records to core-data. The UI does not use
shape=idsyet, but projected requests such as Gutenberg link suggestions already do less work.How
ID-only requests use the field-value index when possible and fall back to postmeta otherwise. Core REST requests honor
_fields, so they skip any row enrichment the caller did not request. The backend benchmark covers both row shapes and the link-suggestion projection.Testing Instructions
shape=fullandshape=ids. Confirm that both return the same order and totals, and that the ID response contains onlyids,total,totalPages, and any requestedcalculations.calculations[field-X]operation and use a smallper_pagevalue. Confirm that both shapes return the same calculation for the entire filtered result, not just the current page.context=view. Confirm that the first succeeds and the second is rejected.