Skip to content

fix(landing): land #2876 + #2877 on main — missed during stacked merge#2882

Merged
viniciusdacal merged 2 commits intomainfrom
fix/landing-page-followup
Apr 20, 2026
Merged

fix(landing): land #2876 + #2877 on main — missed during stacked merge#2882
viniciusdacal merged 2 commits intomainfrom
fix/landing-page-followup

Conversation

@viniciusdacal
Copy link
Copy Markdown
Contributor

Summary

Re-delivers the two landing-page fixes that got orphaned when the original stacked PRs (#2880, #2881) merged into their intermediate base branches instead of `main`. Only #2879 (#2875) landed on `main`; this PR brings #2876 and #2877 onto `main` so the landing can actually be deployed.

Two commits, rebased on latest `main`:

Public API Changes

Carried forward from #2881:

  • `PrerenderOptions` gains optional `onRouteError?: (path: string, error: Error) => void`.
  • `discoverRoutes()` falls back to `module.routes` when rendering `/` throws or returns empty.

Both are additive — strict callers see no behavior difference.

Test plan

Related

🤖 Generated with Claude Code

viniciusdacal and others added 2 commits April 20, 2026 09:13
…in [#2876]

`vtz run` no longer resolves file paths — only package.json script names —
so the chained `vtz run scripts/generate-og.ts` broke the build. And the
`vertz` binary's `#!/usr/bin/env node` shebang means the production build
CLI runs under Node, where `Bun.build()` is undefined.

Three targeted fixes:

- generate-og.ts drops the Bun-only `Bun.write` and `import.meta.dir` in
  favor of `writeFileSync` + `fileURLToPath(new URL(..., import.meta.url))`
  so it runs under plain Node.
- `build` invokes generate-og with `node --experimental-strip-types` and
  invokes the CLI via `bun .../cli/dist/vertz.js build`, bypassing the
  Node shebang so `Bun.build()` has a runtime.
- `deploy` calls `bun run build` (instead of `vtz run build`) and runs
  pre-warm with Node.

`build:og` previously pointed at a non-existent `og-images.ts`; repoint it
at the real script.

Dev scripts (`dev:presence`, `dev:all`) still use `vtz run <file>` and
still break — those are out of scope here; filed as follow-up.

Fixes #2876.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ures [#2877] (#2881)

The landing deploy was serving the home page HTML for /manifesto because
the pre-render pass bailed out whenever any one route failed to render
(a broken component at / took down the whole map). Three small changes
make the pipeline tolerant:

- `packages/landing/src/app.tsx` exports `routes` so the build pipeline
  can fall back to a static walk of the route tree when runtime
  discovery (render /) throws.
- `discoverRoutes()` in `@vertz/ui-server/prerender` catches render
  failures, falls back to `module.routes`, and collects the raw
  patterns (same filtering applies via `filterPrerenderableRoutes`).
- `prerenderRoutes()` accepts an `onRouteError` callback; when supplied,
  it reports per-route failures and continues instead of aborting.
  The default-throw path is preserved for callers that want strict
  behavior. `@vertz/cli`'s `buildUI` wires the callback so one broken
  component no longer sinks every other static route.

Net result: `vertz build` now writes `dist/client/manifesto/index.html`
even though `/` and `/openapi` still crash during SSR. Those two route
failures are tracked separately — see follow-up issue.

Fixes #2877.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@viniciusdacal viniciusdacal merged commit b230475 into main Apr 20, 2026
6 checks passed
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.

1 participant