fix(dashboard): add missing appID#6387
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — DeploymentIdLink now derives the deployment's appId from the loaded collection instead of the route-level appId param, fixing broken links when the component renders outside /apps/[appId].
- Derive
appIdper-deployment — switches fromuseProjectData().appId(route param, absent on project-level routes) togetDeploymentById(deploymentId)?.appId, so the link href no longer contains anundefinedapp segment when rendered from the projectlogs/requestslog-detail panels. - Graceful fallback — when the deployment isn't in the loaded collection (or is still loading), renders the shortened id plus a
CopyButtonwith no link, avoiding a broken navigation target.
I confirmed the fix is sound: ProjectDataProvider is mounted at (project)/layout.tsx without an appId prop, so its deployments query scopes project-wide and getDeploymentById resolves across the project; Deployment.appId is a required z.string(), and CopyButton accepts the value/variant/className props as used. The only nit is the fallback span using text-xs while the link span omits it — a deliberate, non-blocking visual choice.
Claude Opus | 𝕏
|
also your screenshot doesn't show an app id either @ogzhanolguncu |


Important
Unkey is not accepting external pull requests at this time. Pull requests from people outside the Unkey team will not be reviewed or merged.
Fixes ENG-2886
Problem
Clicking the deployment ID button opens a new tab and hits a URL with apps/undefined, which causes a client-side exception.
Example URL: https://app.unkey.com/workspace_id/projects/proj_123/apps/undefined/deployments/d_123
Fix
This PR adds missing appId for
deployment-id-link. SinceappIdis not available inprojectlevel we have to derive it from deployments. If its missing we fallback todeploymentIdwithout a link.