Pulp Engine Document Rendering
Get started
Release v0.40.0

Pulp Engine v0.40.0 — Release Notes

This release adds preview capability negotiation and render execution error codes for the editor preview routes, giving the editor clear, machine-readable reason codes when a render attempt fails, and a stable capability probe at startup.


What changed

1. Preview capability negotiation — GET /render/preview/status

A new always-registered endpoint returns whether the PDF renderer was available when the process started. The probe runs once at startup via probeRendererCapability() and the result is cached for the process lifetime.

Response:

{ "available": true, "reason": null }
{ "available": false, "reason": "browser_unavailable" }
{ "available": false, "reason": "routes_disabled" }

The endpoint is always registered (even when PREVIEW_ROUTES_ENABLED=false) so the editor can distinguish “disabled” from “browser unavailable” from a genuine render error, without attempting a render first. Raw browser failure details stay in structured logs only — they do not surface through the API.

2. Render execution error codes on preview routes

POST /render/preview/html and POST /render/preview/pdf now return an optional machine-readable code field on 422 responses:

codesource
template_expression_errorHandlebars compilation/execution error in the template
validation_failedData payload does not satisfy the template’s inputSchema
render_timeoutPuppeteer page timed out
engine_crashBrowser page crash or fatal engine error

code is omitted for unclassified failures (e.g. asset resolver errors) and when talking to a pre-v0.40 backend that does not emit codes, preserving backward compatibility.

3. Editor UI: capability banner + FRIENDLY_HINTS

The editor reads the /render/preview/status response on mount and shows a specific banner when preview is unavailable (browser_unavailable vs routes_disabled). Render failures in the preview panel now show human-friendly hints keyed to the machine-readable code, distinguishing template expression errors (actionable by the template author) from infrastructure failures (non-actionable by the author).

4. NodeWrapper context menu: Edit shortcut

The NodeWrapper component now accepts an onEnterEdit prop; when provided, an “Edit” entry appears in the node’s context menu as a keyboard-accessible alternative to double-click for entering inline edit mode.


Validation

  • pnpm typecheck — 10/10 passed
  • pnpm lint — 0 errors (1 pre-existing unrelated warning)
  • pnpm --filter @pulp-engine/api test — 531 passed, 41 skipped, 0 failed

Upgrade

Fully backward-compatible. No migrations, no credential changes, no API contract changes.

The GET /render/preview/status endpoint is new and always registered. Callers that do not query it are unaffected.

Preview 422 responses gain an optional code field — existing clients that ignore unknown fields continue to work. The code field is omitted when the error is unclassified, matching previous behavior.

docker pull ghcr.io/OWNER/pulp-engine:v0.40.0