Skip to content

Build detail page shows "Page not found" (404) for webhook- and API-triggered (and finished) deployments #635

Description

@onerandomd3v

Build detail page shows "Page not found" (404) for webhook- and API-triggered (and finished) deployments

Image

Environment

  • Openship 0.6.6, self-hosted (Docker Compose mode)
  • Deployments triggered via the GitHub App webhook (auto-deploy on push) and via the API (POST /api/deployments/build/access), rather than through the dashboard deploy wizard.

Summary

Opening a deployment's build page (/build/{deploymentId}) renders a "Page not found" (404) for deployments that were not initiated through the dashboard's interactive deploy/build wizard — i.e. webhook (auto-deploy) and API-triggered deployments — as well as for builds that have already finished. The underlying deployment record and its build logs are persisted and remain fully accessible via the API (GET /api/deployments/{id} and GET /api/deployments/{id}/logs both return the status and full logs), so this appears to be a dashboard rendering gap rather than missing data.

(Confirmed on 0.6.6: navigating to /build/{id} for a ready deployment with trigger: webhook renders the app's "Page not found" 404 page with "Back to dashboard" / "View deployments" buttons — screenshot attached.)

Steps to reproduce

  1. Configure a project with auto-deploy on push (GitHub App), or deploy a project via POST /api/deployments/build/access directly.
  2. Trigger a deployment via a git push (webhook) or the API call — not through the dashboard wizard.
  3. In the dashboard, open that deployment's build page (e.g. click the build, or navigate to /build/{deploymentId}).

Expected

The build page shows the deployment's status and logs for any deployment, regardless of how it was triggered or whether it is still running — falling back to the persisted deployment record + stored build logs when there is no live build session/stream to attach to.

Actual

The page renders ResourceNotFound (a 404-style page). It happens for webhook/API-triggered deployments and for deployments whose build has already completed.

Likely cause (from the source)

In apps/dashboard/src/app/(dashboard)/(deployment)/build/[id]/page.tsx, the page initializes a build session: if the deployment is currently deploying it attaches to the live stream (GET /:id/stream), otherwise it calls loadBuildSession(deploymentId) (from useDeploymentBuild / DeploymentContext). When no build session can be loaded/attached, the page sets notFound and renders ResourceNotFound.

Deployments created outside the dashboard wizard (webhook/API), and finished builds, don't have a loadable/attachable build session, so the page shows not-found — even though GET /api/deployments/{id} and GET /api/deployments/{id}/logs return the persisted status and logs.

Suggested fix

When loadBuildSession finds no live/attachable session, fall back to rendering the persisted deployment record and its stored logs (from the deployment + logs endpoints) instead of showing ResourceNotFound. This makes the build page work for all deployment triggers (wizard, webhook auto-deploy, API) and for completed builds.

Impact / severity

Low severity — no data is lost; status and logs remain accessible via the API. It is a dashboard UX gap that becomes more visible as webhook auto-deploy usage grows (which is the common path once the GitHub App is connected), since those deployments are the ones most likely to hit it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions