Pulp Engine Document Rendering
Get started
Release v0.42.0

Pulp Engine v0.42.0 — Release Notes

This release sharpens the editor’s preview and publish-gate failure handling. fetchPreviewStatus() now returns distinct typed reasons for each failure mode instead of collapsing them, the preview panel fail-closes with specific messaging for true infrastructure failures, and the publish-gate dialog gains symmetrical fail-closed states for preflight errors — all editor/client-side, no server changes.


What changed

1. fetchPreviewStatus() — typed failure reasons

fetchPreviewStatus() in apps/editor/src/lib/api.ts previously treated all non-success paths ambiguously. It now returns one of four distinct PreviewCapabilityStatus reasons for unavailability:

ReasonTriggerPreview panel behavior
fetch_failedHTTP 404 from the status endpointPermissive fallback — idle UI, buttons enabled
service_unreachableTypeError from fetch() (no network path to API)Fail-closed pane
status_errorNon-404 HTTP error (401, 403, 429, 5xx)Fail-closed pane with HTTP status
malformed_response200 response with unexpected JSON shapeFail-closed pane

The fetch_failed path intentionally maps to the legacy permissive behavior: older API backends that predate GET /render/preview/status always return 404, and those deployments should continue to show the idle preview UI rather than a hard failure.

2. PreviewPanel — fail-closed panes for true status-check failures

The three fail-closed reasons each render a specific unavailable pane with the render and proof buttons disabled:

  • service_unreachable“Preview service unreachable”
  • status_error“Preview check failed (HTTP N)” — N is the actual HTTP status
  • malformed_response“Preview check failed” (unexpected response message)

routes_disabled and browser_unavailable continue to render their existing “Preview unavailable” pane. fetch_failed falls through to the normal idle UI (backward compat path).

3. PublishGateDialog — symmetrical preflight fail-closed states

Three new GatePhase values mirror the preview-panel approach for the publish validation preflight (validateForPublish()). Previously, errors from the preflight call could produce vague or missing UI feedback; they now map to explicit fail-closed states:

PhaseTriggerPublish button
preflight_unavailableTypeError — API not reachable at allDisabled
preflight_errorNon-2xx HTTP — infra / auth / rate-limit / server errorDisabled
preflight_failed200 + valid: false — template expression or render errorDisabled

All three phases display actionable messaging. The preflight_failed phase shows the validation error detail from the API response.

4. Tests

  • PreviewPanel.test.tsx: 8 new status-capability tests — capability loading state, fetch_failed backward-compat assertion, all three fail-closed states (service_unreachable, status_error, malformed_response), routes_disabled, browser_unavailable, and render-button disabled guard.
  • PublishGateDialog.test.tsx: 4 new preflight-error tests — preflight_failed (ValidationFailedError), preflight_unavailable (TypeError), preflight_error HTTP 500, preflight_error HTTP 403.

5. docs/editor-guide.md

New “Preview panel states” reference table covering all 8 panel states with cause, meaning, and remediation guidance. Includes an explicit note that older API backends returning 404 on the status endpoint are compatible — the panel shows the idle guidance and allows render attempts.


Validation

  • pnpm typecheck — 10/10 passed
  • pnpm lint — 0 errors (1 pre-existing unrelated warning in TemplatePickerDialog.tsx)
  • pnpm --filter @pulp-engine/editor test — 523 passed, 0 failed
  • pnpm --filter @pulp-engine/api test — 582 passed, 41 skipped, 0 failed
  • pnpm build — 10/10 successful

Upgrade

No breaking changes. This is a pure editor/client-side release.

Backward compatibility: HTTP 404 on GET /render/preview/status continues to map to fetch_failed and the permissive idle UI. Older backends that predate the status endpoint are fully compatible without any configuration change.

API server contract: Unchanged. No new routes, no changed response shapes, no new environment variables, no migrations, no credential changes.

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