Skip to content

feat(scaffold): add Props interface with seo and github to generated site.ts - #264

Merged
JonasJesus42 merged 2 commits into
mainfrom
fix/emit-site-app-schema
Jun 22, 2026
Merged

feat(scaffold): add Props interface with seo and github to generated site.ts#264
JonasJesus42 merged 2 commits into
mainfrom
fix/emit-site-app-schema

Conversation

@JonasJesus42

@JonasJesus42 JonasJesus42 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The deco-migrate scaffold now generates a Props interface in src/apps/site.ts with CMS-editable fields: seo, github, platform
  • This is picked up automatically by generate-schema.ts's third pass (PR feat(schema): generate app JSON Schemas from src/apps #257) which scans src/apps/ and emits them to manifest.blocks.apps
  • Without a Props interface, the Studio site tab opened but showed no editable fields

Problem

The existing scaffold generated src/apps/site.ts with only Platform and AppContext — no Props interface. When generate-schema.ts (with the third pass from #257) scanned this file, it produced an empty schema for site/apps/site.ts.

As a result, the Studio Content > Site tab showed the app entry but rendered no form fields.

github field

The github block (owner, repo, branch, team) enables team access management from the Studio site tab — a common need for store projects.

Test plan

  • Run deco-migrate on a fresh deco.cx site
  • Check that src/apps/site.ts contains a Props interface
  • Run npm run generate:schema and confirm meta.gen.json contains site/apps/site.ts in manifest.blocks.apps with seo and github properties

Generated with Claude Code


Summary by cubic

Scaffold now generates a CMS-editable Props interface in src/apps/site.ts and a default Site export. generate-schema.ts now always registers the site app, merging or falling back to built-in seo, github, and platform fields so the Studio Site tab always shows a form.

  • New Features
    • Adds seo fields (title, description, favicon, image, titleTemplate, noIndexing) and github settings (owner, repo, branch, team).
    • Ensures the site app is included in manifest.blocks.apps even without Props; merges built-in fields when present and emits a base64 alias for manifest lookup.

Written for commit cef5587. Summary will update on new commits.

Review in cubic

…site.ts

New sites scaffolded via deco-migrate now get a CMS-editable Props interface
in src/apps/site.ts so generate-schema emits the site app schema automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JonasJesus42
JonasJesus42 requested a review from a team June 22, 2026 15:10
…elds

Every TanStack Start site has a 'site' block in the decofile with
__resolveType: '<namespace>/apps/site.ts'. Without an entry in
manifest.blocks.apps the Studio cannot render the Site tab form.

If src/apps/site.ts exports a Props interface (third pass), merge the
built-in fields (seo, github, platform) with the site's own props.
If src/apps/site.ts has no Props or doesn't exist at all, emit the
built-in schema as a fallback.

Also emits a base64-encoded alias key so lookupManifestBlockSchema
resolves correctly via the fallback path in mesh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@JonasJesus42
JonasJesus42 merged commit 160d871 into main Jun 22, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

JonasJesus42 added a commit that referenced this pull request Jun 22, 2026
vitoUwu pushed a commit to vitoUwu/deco-start that referenced this pull request Jul 21, 2026
…decocms#186)

Stamps Strategy B — the deco-otel-tail Cloudflare Tail Worker — as the
canonical 100% error capture mechanism, and updates the docs + decision
record accordingly.

Concrete changes:

- docs/observability.md
  - Add "Error capture — three-channel model" section above "Sampling"
    with the full coverage matrix mapping {error source} x {channel} x
    {SLO} (framework logger.error, framework span errors, uncaught
    throws, exceededCpu/exceededMemory, raw console.error, info/warn
    logs, OTel spans, OTel metrics).
  - Flip the recommended `logs.head_sampling_rate` default from 1.0 to
    0.01 now that the tail worker covers the gap.
  - Update the data-loss profile table: split "Error logs" into
    "Framework error logs" (direct-POST channel) and a new row for
    "Uncaught throws / exceededCpu / raw console.error" (tail worker
    channel), with the per-channel loss conditions documented.
  - Replace the "Out of scope: tail-on-error sampling — designed away"
    bullet with "DO-buffered tail-on-error rejected on cost grounds;
    functional goal met via direct-POST + Strategy B tail worker"
    (with a pointer to the otel-tail worker source in stats-lake).

- MIGRATION_TOOLING_PLAN.md
  - Append D-8 record: "Cloudflare Tail Worker (Strategy B) is the
    canonical 100% error capture mechanism". Documents the three
    structural gaps that no in-Worker code can close from inside its
    own request handler (uncaught throws, exhaustion outcomes, raw
    console.error from third-party SDKs), the chosen mechanism
    (deco-otel-tail forwarding filtered TraceItems to deco-otel-ingest
    via in-account service binding), and rejected alternatives
    (codemod+lint, Logpush, CF dashboard logs, DO-buffered tail-on-
    error). Includes the operational dependency (tail worker MUST be
    on the same CF account as the ingest worker for the service
    binding to resolve) and the agent-behaviour directive (default to
    Strategy B for the long tail when designing error capture for new
    Worker-deployed code).

Upstream changes that prompted this rewrite:
- decocms/stats-lake#4 merged (deco-otel-tail worker source)
- deco-otel-tail deployed to the deco-cx CF account with the INGEST
  service binding to deco-otel-ingest verified
- Producer-side wiring lands in deco-sites/casaevideo-tanstack#268
  (stacked on PR decocms#264 for the stable pin promotion)

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant