Skip to content

fix(dashboard): add missing appID#6387

Merged
ogzhanolguncu merged 2 commits into
mainfrom
add-missing-appId
Jun 9, 2026
Merged

fix(dashboard): add missing appID#6387
ogzhanolguncu merged 2 commits into
mainfrom
add-missing-appId

Conversation

@ogzhanolguncu

@ogzhanolguncu ogzhanolguncu commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

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. Since appId is not available in project level we have to derive it from deployments. If its missing we fallback to deploymentId without a link.

image

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview, Comment Jun 9, 2026 12:02pm
design Ready Ready Preview, Comment Jun 9, 2026 12:02pm

Request Review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changesDeploymentIdLink 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 appId per-deployment — switches from useProjectData().appId (route param, absent on project-level routes) to getDeploymentById(deploymentId)?.appId, so the link href no longer contains an undefined app segment when rendered from the project logs/requests log-detail panels.
  • Graceful fallback — when the deployment isn't in the loaded collection (or is still loading), renders the shortened id plus a CopyButton with 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.

Pullfrog  | View workflow run | Using Claude Opus𝕏

@chronark

chronark commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

@chronark

chronark commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

also your screenshot doesn't show an app id either @ogzhanolguncu

@ogzhanolguncu ogzhanolguncu enabled auto-merge June 9, 2026 07:35
@linear-code

linear-code Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

ENG-2886

@ogzhanolguncu ogzhanolguncu added this pull request to the merge queue Jun 9, 2026
Merged via the queue into main with commit 13684ad Jun 9, 2026
14 checks passed
@ogzhanolguncu ogzhanolguncu deleted the add-missing-appId branch June 9, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants