Skip to content

TanStack migration: CMS codegen path changed in v7.20, props not editable until full migration #424

Description

@JonasJesus42

Problem

After upgrading to @decocms/blocks >= 7.20, the CMS schema generators write output to .deco/ (new path), but the TanStack Start app reads schemas from src/server/{cms,admin} (old path). This creates a mismatch:

  • Running deno task gen regenerates schemas into .deco/ and produces a ~400k line diff.
  • New CMS section props added to components are not editable in the admin until the full schema migration is completed.
  • Manually editing .deco/blocks/*.json or blocks.gen.json conflicts with the admin sync — do not edit these files directly.

Symptoms

  • New @Schema props show up in TypeScript but not in the Deco admin editor.
  • After running the generator, CI shows a massive diff (~400k lines) touching .deco/ files.
  • The admin may overwrite manual edits to .deco/blocks/*.json on next publish.

Migration path

The full fix requires running the migration script to move from the old src/server/{cms,admin} schema layout to the new .deco/ layout. Until that migration is complete:

  1. Do not run deno task gen expecting new props to appear in admin.
  2. Do not manually edit .deco/blocks/*.json — treat these as admin-owned data.
  3. New section props will not be CMS-editable; pass values via server loaders instead.

Reference

  • Migration script: deco-migrate-script skill.
  • Post-migration, sections.gen.ts and section-loaders.ts must also be updated for new sections to resolve correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions