Skip to content

docs(experiments): spec for swapping the list to the server-side contract (#37007) - #37257

Draft
oidacra wants to merge 2 commits into
mainfrom
oidacra/experiments-portlet-list-server-side-swap
Draft

docs(experiments): spec for swapping the list to the server-side contract (#37007)#37257
oidacra wants to merge 2 commits into
mainfrom
oidacra/experiments-portlet-list-server-side-swap

Conversation

@oidacra

@oidacra oidacra commented Aug 27, 2026

Copy link
Copy Markdown
Member

Spec-first PR for #37007, using the single-PR flow: the specification lands as the initial commit and the implementation will land in this same PR once its entry condition is met.

Closes #37007. Visual review page (summarizes; the spec decides): https://claude.ai/code/artifact/908c4144-2b25-40f9-a2d4-abdc18b1000b

What the spec defines

Swap the Experiments portlet list from the #36989 client-side interim (download every experiment plus a bulk page lookup, then fake paging, sorting, filtering, counts and site scoping in the browser) to the server-side contract on GET /api/v1/experiments. Pure consumer swap: no new endpoint; every new query parameter is additive and optional, so existing callers are untouched.

  • One request per view change carrying page, per_page, orderby, direction, filter, status, goal, created_by, running_from, running_to, siteId; the pager total comes from pagination.totalEntries; the interim client-side utilities are deleted.
  • The URL contract stays byte-identical for every pre-existing parameter — the Experiments Portlet — E2E test suite (incl. flag-off regression of the old flow) #37006 deep-link E2E suite must pass unchanged. The three new parameters appear only when their filter is active.
  • Two stakeholder-requested filters (added 2026-08-27): by creator (created_by) and by running date range (running_from/running_to, inclusive overlap semantics, orthogonal to the status filter). Their two toolbar controls are the only permitted exception to the "no component changes" boundary.
  • Accepted behavior changes, owned by Add pagination, sorting, filtering and permission checks to the Experiments list endpoint #36823: permission narrowing (users see only experiments on pages they can edit) and free-text search no longer matching descriptions.

Entry condition: implementation blocked

#36823 (the backend contract, expanded scope) is open with no implementation PR, and none of the contract is on main yet. Implementation in this PR starts only after the expanded #36823 lands and the dependency state is re-verified. Details in the spec's Scope Note and Dependencies sections.

…ract (#37007)

Seeded from issue #37007. Captures the failed entry condition (the #36823
contract is not on main as of 2026-08-26, so its two SQL fixes and permission
filtering are absent) and encodes the coordinator-confirmed expansion of
#36823's scope: sort support for every UI column, a goal parameter with
per-goal counts, row enrichment, and per-status counts — so #37007 lands
complete in one drop once expanded #36823 ships.
…37007 spec

Stakeholder additions relayed by the user on 2026-08-27: filter the list by
the experiment's creator (created_by) and by a running date range
(running_from/running_to, overlap semantics, orthogonal to status). Adds
Story 4, FR-015/FR-016 and SC-007, carves the two new toolbar controls out
of the no-component-change boundary, keeps the pre-existing URL contract
byte-identical (new params are additive), and grows the expanded #36823
expectation accordingly.
@claude

claude Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Claude finished @oidacra's task in 1m 13s —— View job


SDK Compatibility Analysis

  • Read SDK breaking-change categories reference
  • Get full PR diff
  • Analyze diff against every category
  • Post findings (only if breaking) or conclude no issues

Result: No SDK-breaking changes detected.

This PR is docs-only: both commits (99249b3f, f981b3ea) touch a single file, specs/37007-list-server-side-swap/spec.md (+459/-0 total), which is a Spec-Kit specification document. There are no changes to:

  • GraphQL schema / graphql.page / graphql.content (G-1, G-2, G-3)
  • REST response shapes for /api/v1/nav, /api/v1/content, /api/v1/page/*, or /api/v1/experiments implementation code (R-1) — the spec explicitly states implementation is blocked pending Add pagination, sorting, filtering and permission checks to the Experiments list endpoint #36823 and has not landed in this PR
  • UVE/editor postMessage protocol (__DOTCMS_UVE_EVENT__, DotCMSUVEAction) (U-1, U-2)
  • SdkVersionWebInterceptor, X-DotCMS-Version/X-DotCMS-Min-SDK headers, or compareVersions() (H-1)

Since the spec itself documents that all new /api/v1/experiments query parameters (created_by, running_from, running_to, etc.) are planned as additive and optional and no implementation code is included, there is nothing here to evaluate against the SDK contract yet. No comment or label added, per instructions (no code changes = no breaking change to flag).

@erickgonzalez

erickgonzalez commented Aug 28, 2026

Copy link
Copy Markdown
Member

On-Hold until #36823 gets fixed, since probably needs to be re-written based on those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Experiments Portlet — swap the List to the server-side contract

3 participants