Automattic / Automattic/cortext

Rollup compute switch on the rows endpoint

Open
#173 0 comments 0 reactions 0 assignees View on GitHub
area: performance priority: medium
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.