Skip to content

feat(cms): add efficient relation pages and content projections - #296

Merged
olliethedev merged 9 commits into
mainfrom
feat/cms-content-projections-290
Oct 28, 2026
Merged

olliethedev merged 9 commits into
mainfrom
feat/cms-content-projections-290

Conversation

@olliethedev

@olliethedev olliethedev commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

- Related-item reads can stop at adapter-default scan limits and fetch each item separately.
+ Complete batched scans, unique totals, stable timestamp/ID ordering, and page-only content reads.
- CMS reads always return the editor envelope and raw JSON.
+ Opt-in content views and literal top-level field selections on existing reads and picker hooks.

Preserve default responses and authorization. Full, content, and projected variants have separate cache identities, equivalent field sets share an identity, and mutations refresh affected variants. Existing SSR/SSG paths retain serialized timestamps and matching hydration envelopes.

Closes #290
Closes #291
Closes #292
Closes #293
Closes #294

Evidence

  • Before: A default-limited adapter regression returned zero of 125 matching source records after unrelated relation rows; different relation page sizes shared a cache entry.
    After: Direct and inverse reads return all successive unique pages with deterministic ordering, while full payload retrieval stays limited to requested page IDs.

  • Before: Content views and field selections retained editor data or shared full-response caches.
    After: Operation/HTTP/getter/resource tests verify exact reduced envelopes; literal punctuation, Unicode and declared-dot names; invalid selections; optional/null/nested values; authorization and race checks; projected picker search/preloads; mutation freshness; and prefetch/type parity.

  • Final head: build, typecheck, lint, Knip and docs production build pass. 1,191 Stack + 198 CLI unit tests, 115 CMS/relation/SSG browser tests across Next.js, React Router and TanStack (SSG on Next.js), 7 release-gate tests, and 15 product-proof tests pass.

  • Regenerated registry output is clean. A fresh packed registry consumer installs all nine plugin items and builds successfully. Built-export type probes verify default/content/static-field and dynamic-field results.

  • Standards and spec reviews have no remaining material findings. Adapter coverage uses memory plus a default-limited/counting fixture; named production database adapters were not run.

  • Media concurrency regression waits for committed user A and suspends only speculative user B. It verifies A refreshes and B stays uncached, removing a scheduler-dependent cache-eviction assertion. Twenty repeated Media-suite runs pass, and an injected render-phase ownership fault still makes the test fail; the CI repair is confined to this test.

  • Full CI/CD verification passes on 6156e2f9: all five workflows, all expected jobs, and both Vercel deployments. The repository release gate passed after two matching evidence collections.

Merge Danger

Door: two-way

No schema migration or new dependency. Reduced output is opt-in; existing calls retain their envelopes and access checks.

Blast Radius: CMS

Relation retrieval, read typing, query cache identities and prefetch hydration. Output projection reduces response payloads; stored JSON may still be fetched and parsed, and relation ID/metadata scans grow with cardinality.

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
better-stack-docs Ready Ready Preview Oct 28, 2026 8:04pm UTC
better-stack-playground Ready Ready Preview Oct 28, 2026 8:04pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T19:22:53.541439Z b85aaa7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Suspend only speculative identity B, wait for the committed A list, and verify A remains committed and refreshes without populating B. The prior global suspension flag made cache cleanup depend on React scheduling. Twenty full Media-suite runs pass, and an injected render-phase scope ownership regression is still detected.
@olliethedev
olliethedev merged commit 2ac8e7f into main Oct 28, 2026
14 checks passed
@olliethedev
olliethedev deleted the feat/cms-content-projections-290 branch October 28, 2026 20:28

This branch was successfully deployed

2 active deployments
Preview – better-stack-docs — 6156e2f9 Deployed Oct 28, 2026 by vercel[bot]
Preview – better-stack-playground — 6156e2f9 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant