decocms / decocms/blocks

deco-migrate: routes geram siteName com P maiúsculo ('Portaldavinci-tanstack') — lookup CMS falha

Open Beginner friendly
#487 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

Gap encontrado: portal-davinci migration run (2026-08-20)

Fase

migrate-script → geração de src/routes/index.tsx e src/routes/$.tsx

Problema

O template de rotas gera siteName: "Portaldavinci-tanstack" (capital P no site name).

O lookup do decofile no CMS Deco é case-sensitive. O site name correto é portaldavinci-tanstack (tudo minúsculo, igual ao nome do worker em wrangler.jsonc).

Com o nome errado:

  • cmsHomeRouteConfig({ siteName: "Portaldavinci-tanstack" }) retorna decofile vazio
  • Todas as seções renderizam vazias no SSR (resolvedSections: [])
  • O conteúdo só aparece após hidratação client-side → CLS 0.822 na página inicial
Evidência
CLS: prod=0.000, cand=0.822 (cls delta 0.822 > 0.05)

Corrigir para portaldavinci-tanstack (lowercase) resolve o mismatch.

Fix sugerido

No template de rotas (deco-migrate/templates/routes/$.tsx e index.tsx), garantir que siteName seja sempre o nome do site em minúsculas — igual ao "name" do wrangler.jsonc:

siteName: ctx.siteName.toLowerCase()
Relacionado
  • decocms/parity#234 — migrate-script predev command
  • decocms/parity#235 — SiteSetupOptions type mismatch

Transferida de decocms/parity#239 (bug de template do deco-migrate / @decocms/blocks-cli, fora do escopo do repo parity).

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 by reading deco-migrate/templates/routes/$.tsx and deco-migrate/templates/routes/index.tsx, then compare the generated siteName with the name in wrangler.jsonc. Verify that generated routes use the lowercase site name and that the CMS lookup no longer produces empty SSR sections or the reported CLS regression.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.