Automattic / Automattic/cortext
Rollup compute switch on the rows endpoint
- Dominant language
- JavaScript
- Stars
- 51
- Forks
- 2
- Avg merge
- 3h 12m
- Merged PRs (30d)
- 8
Description
## Goal
Rollups are expensive, and some callers do not need them. Let callers skip rollups, compute only visible rollups, or use cached values once a cache exists.
## Scope
* Add `?rollups=none|visible|cached` to `/cortext/v1/rows`.
* `none`: skip `compute_rollup_value`. Requested rollup fields return `null`.
* `visible` default: compute only rollups included in the response. This pairs with `fields[]`.
* `cached`: use cached values when present and fall back to compute. Activates once the rollup cache lands (#177).
* Relation picker and command palette callers send `?rollups=none`.
## Acceptance criteria
* `?rollups=none` skips rollup computation entirely, and rollup fields in the response return `null`.
* Default `visible` computes only rollups included in the response.
* `cached` falls back to compute when no cache exists.
Contributor guide
Research direction
Start at the /cortext/v1/rows endpoint and trace how relation picker and command palette callers build their requests. Verify the current fields[] and rollup computation behavior first, then cover none, visible, and cached modes, including the cache-miss fallback and null rollup fields, with the relevant endpoint tests if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100