Build detail page shows "Page not found" (404) for webhook- and API-triggered (and finished) deployments
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
- Configure a project with auto-deploy on push (GitHub App), or deploy a project via
POST /api/deployments/build/access directly.
- Trigger a deployment via a
git push (webhook) or the API call — not through the dashboard wizard.
- 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.
Build detail page shows "Page not found" (404) for webhook- and API-triggered (and finished) deployments
Environment
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}andGET /api/deployments/{id}/logsboth 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 areadydeployment withtrigger: webhookrenders the app's "Page not found" 404 page with "Back to dashboard" / "View deployments" buttons — screenshot attached.)Steps to reproduce
POST /api/deployments/build/accessdirectly.git push(webhook) or the API call — not through the dashboard wizard./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 callsloadBuildSession(deploymentId)(fromuseDeploymentBuild/DeploymentContext). When no build session can be loaded/attached, the page setsnotFoundand rendersResourceNotFound.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}andGET /api/deployments/{id}/logsreturn the persisted status and logs.Suggested fix
When
loadBuildSessionfinds no live/attachable session, fall back to rendering the persisted deployment record and its stored logs (from the deployment + logs endpoints) instead of showingResourceNotFound. 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.