Skip to content

feat(kody): seed the headless-api starter - #51

Open
jherr wants to merge 3 commits into
mainfrom
kody-headless-seed
Open

jherr wants to merge 3 commits into
mainfrom
kody-headless-seed

Conversation

@jherr

@jherr jherr commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds a seed document to the headless-api Kody starter so a freshly-published app isn't empty (spec §8). Validated locally against a fresh Postgres via kody/headless-api/scripts/local-smoke.mts.

This is also the first PR since pkg-pr-new was enabled — it should exercise the Preview job (pkg-pr-new publish) end-to-end on the private repo.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • A published “Welcome” content item is included for the web channel on first setup.
  • Tests
    • The local smoke check verifies that the “Welcome” content item exists and has the expected title.
  • Documentation
    • Setup notes cover local validation, schedule formats, and workerd database-driver limitations.
    • Public anonymous read access remains an outstanding setup item.

Adds src/seed.ts (one published contentItem) wired into defineCms, for
spec §8 ("seeded document readable"). Validated by local-smoke.mts against
a fresh Postgres — the seeded doc is present on first registration.
Granting public (no-auth) read on contentItem remains a go-day item.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0745f58

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: TanStack/cms
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 3d1e7b2
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a952768f-4861-4daa-9811-1e2e6d9ee161
Walkthrough

The CMS config now includes a published welcome seed, and the local smoke script checks the seeded item. Both scheduled jobs use five-minute interval schedules. The go-day and agent notes record local validation results, workerd constraints, and publishing acceptance checks.

Changes: Headless API setup and validation

Layer / File(s) Summary
Add and verify the welcome seed
kody/headless-api/src/seed.ts, kody/headless-api/src/cms.config.ts, kody/headless-api/scripts/local-smoke.mts, kody/headless-api/GO-DAY.md
The seed contains a published welcome item for the web channel. The CMS config passes it to defineCms. The smoke script triggers registration and checks the title. The go-day notes describe anonymous read acceptance checks.
Update schedules and record runtime validation
kody/headless-api/package.json, kody/headless-api/AGENTS.md, kody/headless-api/GO-DAY.md
Both jobs use five-minute interval schedules. The notes document accepted manifest schedule forms, the pg module-loading failure under workerd, standalone-checkout requirements, dependency pinning, and remaining driver and secret-access checks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: TanStack/cms
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 3d1e7b2
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Free
  • Run ID: 39dc4686-e5f4-4b19-b262-035f7cb8bd37
Commits

Reviewing files that changed from the base of the PR and between 3bbfd85 and ff726a1.

Files selected for processing: 3

  • kody/headless-api/AGENTS.md
  • kody/headless-api/GO-DAY.md
  • kody/headless-api/package.json
Files skipped from review as they are similar to previous changes: 1

  • kody/headless-api/GO-DAY.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

jherr and others added 2 commits November 29, 2026 16:31
Validated the headless-api package under `kody dev` (local workerd). Results:
- The CMS graph bundles + boots under workerd; the `{ fetch }` entry serves
  (CMS 404 on `/`). Biggest unknown (workerd-compat) resolved.
- kody dev validated the `kody.jobs` schema: schedule must be an object
  `{ type: "interval", every: "5m" }` (or cron), not a bare string. Fixed.
- U2 confirmed locally: a DB request fails under workerd with
  `No such module "pg"` — the stock pg driver doesn't load; Neon's serverless
  driver behind the store's PgPoolLike interface is the (config-side) fix.
- `kody dev` must run from a standalone checkout; nested in the monorepo it
  fails the snapshot with a misleading "bundle target(s) missing" error.

GO-DAY.md and AGENTS.md updated with all of the above.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@autofix-ci
autofix-ci Bot requested a review from a team as a code owner November 30, 2026 01:41
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