Skip to content

Route migrated Contentful spaces through Payload CMS - #7260

Draft
jmgasper wants to merge 5 commits into
developfrom
payload-cms
Draft

Route migrated Contentful spaces through Payload CMS#7260
jmgasper wants to merge 5 commits into
developfrom
payload-cms

Conversation

@jmgasper

@jmgasper jmgasper commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • adds per-space Delivery and Preview host overrides for the default, EDU, and TopGear Contentful clients
  • routes both SDK and direct Contentful requests through the selected compatibility host
  • adds optional Payload write-through for EDU article votes while retaining the existing Contentful Management fallback
  • configures the environment-specific Payload asset origin and permits it in image/media CSP directives
  • replaces the 10 unique runtime-hardcoded Contentful assets (11 uses) with their verified assets.topcoder-dev.com / assets.topcoder.com paths
  • limits the seven Thrive track-card queries to the fields needed for Article small rendering and resolved image URLs
  • matches exact Thrive home, tracks, search, and article routes before the generic root Contentful route
  • reuses one keep-alive HTTPS agent across server-side Contentful Delivery, Preview, and Management clients
  • documents the development cutover variables and adds endpoint, query-projection, routing, and connection-pool coverage

Why

This keeps Zurich and Comcast on Contentful while allowing the three exported spaces to move to the Payload compatibility API at cms.topcoder-dev.com. Migrated binary assets are served from the dedicated S3/CloudFront hostname rather than Contentful.

The Thrive home page was also over-fetching full article bodies, waiting on an unrelated default-space CMS route, and opening a new TCP/TLS connection for each CMS request. The focused changes reduce CMS response and hydration weight without changing the rendered cards or caching personalized HTML.

Validation

  • nvm use (Node 10.24.1)
  • focused Jest coverage: 3 suites / 4 tests passed
  • npm run lint
  • npm run build
  • git diff --check
  • all 10 unique hardcoded asset destinations verified present after the Payload asset migration
  • live exact-projection probe: seven track responses reduced from 1,707,334 bytes to 104,474 bytes (93.9%) while retaining migrated image URLs

Rollout note

The Payload asset migration completed and its idempotent replay made zero writes. Keep this PR in draft until the remaining application-level compatibility and post-deployment Thrive performance smoke tests are reviewed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant