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:
| Reason | Trigger | Preview panel behavior |
|---|---|---|
fetch_failed | HTTP 404 from the status endpoint | Permissive fallback — idle UI, buttons enabled |
service_unreachable | TypeError from fetch() (no network path to API) | Fail-closed pane |
status_error | Non-404 HTTP error (401, 403, 429, 5xx) | Fail-closed pane with HTTP status |
malformed_response | 200 response with unexpected JSON shape | Fail-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 statusmalformed_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:
| Phase | Trigger | Publish button |
|---|---|---|
preflight_unavailable | TypeError — API not reachable at all | Disabled |
preflight_error | Non-2xx HTTP — infra / auth / rate-limit / server error | Disabled |
preflight_failed | 200 + valid: false — template expression or render error | Disabled |
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_failedbackward-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_errorHTTP 500,preflight_errorHTTP 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 passedpnpm lint— 0 errors (1 pre-existing unrelated warning inTemplatePickerDialog.tsx)pnpm --filter @pulp-engine/editor test— 523 passed, 0 failedpnpm --filter @pulp-engine/api test— 582 passed, 41 skipped, 0 failedpnpm 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