Skip to content

fix(web): compile creator presets before starting dev server - #373

Open
pcbeingused333 wants to merge 1 commit into
krillinai:masterfrom
pcbeingused333:fix/c1961-web-predev
Open

pcbeingused333 wants to merge 1 commit into
krillinai:masterfrom
pcbeingused333:fix/c1961-web-predev

Conversation

@pcbeingused333

Copy link
Copy Markdown
Contributor

Fixes #344

Summary

On a fresh clone, pnpm web:dev runs every predev step but never generates .runtime/generated/creator-presets/catalog.json / manifest.json, so the Vite plugin's buildStart check (assertStaticBuildInput in apps/web/vite.config.ts) aborts with "Run pnpm templates:compile before building Web". Desktop already runs templates:compile in apps/desktop/scripts/prepare-daemon.mjs; the Web predev was the only entry point missing it.

This appends pnpm -w templates:compile (the existing root script) to the end of apps/web predev. The compiler runs from source via tsx, so it doesn't need a prior daemon build.

Change risk level

  • P0 — Low risk: copy, style tweaks, defaults, local display conditions, test assertions. No Runtime/API/persistence contract changes.
  • P1 — Medium risk: shared state, business logic, persistence, cross-component interaction, Runtime request parameters, shared components.
  • P2 — High risk: Daemon/Runtime, protocol, database migration, process management, service configuration, build/packaging, release pipeline, or Web/Desktop parity changes.

Verification

  • Targeted checks for the changed files / closest tests
  • pnpm typecheck for affected packages (TypeScript changes)
  • Module tests for affected areas (P1+)
  • Production build (only when touching compile boundaries, lazy loading, assets, or build config)
  • Service restart + health check (P2 daemon/runtime changes)
  • Web/Desktop parity checks (shared UI, Bridge, or packaging changes)

Actually ran:

  • A small harness in node:22 with pnpm 9.15.0 ran the real apps/web predev string, stubbing the unrelated Desktop runtime prep and package builds, with OPENCREATOR_PRESET_CATALOG_ROOT pointed at an empty temp dir and no packages/protocol/dist present. On master it ends without a catalog.json. With this change templates:compile runs ("Compiled creator presets: catalog=…") and writes valid catalog.json and manifest.json.

Intentionally skipped, and why:

  • Full pnpm web:dev boot and the Desktop runtime prep steps: the change only appends one existing command to the end of the script.
  • Typecheck: no TypeScript changes.

Web / Desktop parity

  • This change does not affect Web/Desktop parity
  • General capability implemented once in shared Web/Daemon code (no per-bridge forks)
  • Platform-specific entries are hidden when the capability is unavailable (no silent no-op buttons)
  • The same flow was checked on the other platform, not only the one where the issue was reported

Checklist

  • Focused change — no unrelated refactors or fixes mixed in
  • Docs updated in the same PR if user-visible behavior changed
  • No .runtime/, credentials, Codex sessions, build caches, or user data committed

AI assistance: this change and its validation notes were generated with AI coding assistants (Codex, Claude Code).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux/Fedora 44] web:dev fails: missing .runtime/generated/creator-presets/catalog.json (templates:compile not run in predev)

1 participant