decocms / decocms/blocks

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

Open
#424 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5
Forks
2
Avg merge
20h 12m
Merged PRs (30d)
36

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the deco-migrate-script skill and compare the old src/server/{cms,admin} schema layout with the new .deco/ layout. Check sections.gen.ts and section-loaders.ts for the post-migration updates required for new sections. Done means the migration is complete, generated output no longer creates the large mismatch, and new section props resolve in the admin without manually editing .deco/ files.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.