Skip to content

fix(core/schema): persist titleField/dateField on PUT /schema/collections/{slug} (#2573) - #2581

Draft
emdashbot[bot] wants to merge 1 commit into
mainfrom
bot/fix-2573
Draft

fix(core/schema): persist titleField/dateField on PUT /schema/collections/{slug} (#2573)#2581
emdashbot[bot] wants to merge 1 commit into
mainfrom
bot/fix-2573

Conversation

@emdashbot

@emdashbot emdashbot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the silent dropping of titleField and dateField on PUT /_emdash/api/schema/collections/{slug}.

  • Adds both fields to updateCollectionBody as nullable slugs, so updates and clears reach the registry's existing persistence and validation logic.
  • Adds both fields to collectionSchema, restoring the OpenAPI response contract.
  • Exposes both fields through the schema_update_collection MCP tool.
  • Adds regression coverage for preserving, clearing, validating, and returning the display fields.
  • Includes a patch changeset for emdash.

Verification:

  • The focused schema, registry, and OpenAPI tests pass (93 tests).
  • pnpm --filter emdash typecheck passes.
  • pnpm lint:quick passes and formatting was applied.
  • The reporter confirmed the fix against an already-provisioned D1 database on EmDash 0.34.0, including persistence, invalid-field validation, and nullable clearing behavior.

Closes #2573.

A candidate change the reporter confirmed against their own site via the preview build:

npm i https://pkg.pr.new/emdash@bot/fix-2573

Opened automatically by emdashbot as a draft. A maintainer must review before merge.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main.
  • I have added and reviewed the user-facing changeset (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: emdashbot + Kimi K2.7 Code

Screenshots / test output

…ions/{slug} (#2573)

EmDash-Run: 204f1454-297e-424b-8feb-ae098e191646
@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8e253f9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/plugin-mcp-smoke Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/admin Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache 8e253f9 Aug 20 2026, 09:45 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://bot-fix-2573.try.emdashcms.com, https://bot-fix-2573-emdash-playground.emdash-cms.workers.dev (commit 8e253f9)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://40de25f7.try.emdashcms.com, https://40de25f7-emdash-playground.emdash-cms.workers.dev 8e253f9 2026-08-20T09:45:59.003Z Visit the dashboard ↗

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-do 8e253f9 Aug 20 2026, 09:46 AM

@pkg-pr-new

pkg-pr-new Bot commented Aug 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@2581

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@2581

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@2581

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@2581

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@2581

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@2581

emdash

npm i https://pkg.pr.new/emdash@2581

create-emdash

npm i https://pkg.pr.new/create-emdash@2581

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@2581

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@2581

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@2581

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@2581

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@2581

@emdash-cms/registry-verification

npm i https://pkg.pr.new/@emdash-cms/registry-verification@2581

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@2581

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@2581

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@2581

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@2581

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@2581

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@2581

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@2581

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@2581

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@2581

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@2581

commit: 8e253f9

@ascorbic ascorbic changed the title Fix #2573 fix(core/schema): persist titleField/dateField on PUT /schema/collections/{slug} (#2573) Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PUT /schema/collections/{slug} silently drops titleField/dateField: updateCollectionBody omits both keys

0 participants