feat(webapp): show Vercel deployment links in UI#3094
Conversation
Add Vercel integration lookup and expose a deployment URL so linked Vercel deployments are discoverable from the app. - Import VercelProjectIntegrationDataSchema and query for organizationProjectIntegration to detect Vercel project data. - Parse integrationData and, when a vercelTeamSlug is present, look up the latest integrationDeployment for the deployment and construct a Vercel URL (vercel.com/<team>/<project>/<id>). - Attach vercelDeploymentUrl to the DeploymentPresenter output. - Render the Vercel link in deployment detail and deployments list by using the VercelLink component where vercelDeploymentUrl exists. - Remove an unused tooltip import and swap VercelLogo usage to the VercelLink component in the list view. This makes it easier for users to jump directly to the corresponding Vercel deployment from the webapp.
|
|
@coderabbitai review |
Introduce buildVercelDeploymentUrl to centralize construction of Vercel deployment URLs and replace inline URL building in presenters. - Add buildVercelDeploymentUrl to vercelProjectIntegrationSchema.ts. It strips the "dpl_" prefix from integrationDeploymentId and returns the canonical Vercel URL. - Update DeploymentListPresenter and DeploymentPresenter to import and use the new helper instead of duplicating string assembly. This reduces duplicated logic, ensures consistent URL formatting, and makes future URL-related changes easier to maintain.
WalkthroughThis pull request adds Vercel deployment URL display functionality across the deployment views. It introduces a new VercelLink component for rendering deployment links, a buildVercelDeploymentUrl helper function to construct URLs, and updates the DeploymentPresenter and DeploymentListPresenter to fetch Vercel integration data from the database and include the deployment URL in their responses. The deployment detail and list UI pages are then updated to conditionally render the VercelLink component when a Vercel deployment URL is available. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.ts (1)
205-212: Consider adding unit tests forbuildVercelDeploymentUrl.Both the
dpl_-prefixed and non-prefixed ID cases should be verified.Based on learnings: "Consider centralizing this logic in a small helper and add tests to verify both prefixed and non-prefixed inputs." The centralization is done here; the test coverage is still missing.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.ts` around lines 205 - 212, Add unit tests for buildVercelDeploymentUrl that verify it strips a "dpl_" prefix when present and leaves non-prefixed IDs unchanged: create tests calling buildVercelDeploymentUrl with (1) integrationDeploymentId = "dpl_abc123" and asserting the returned URL contains "abc123", and (2) integrationDeploymentId = "abc123" and asserting the returned URL contains "abc123"; include a vercelTeamSlug and vercelProjectName in both tests and assert the full URL matches the expected string to ensure the function behaves for both prefixed and non-prefixed inputs.
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.tsapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.ts
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead
**/*.{ts,tsx}: Always import tasks from@trigger.dev/sdk, never use@trigger.dev/sdk/v3or deprecatedclient.defineJobpattern
Every Trigger.dev task must be exported and have a uniqueidproperty with no timeouts in the run function
Files:
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
{packages/core,apps/webapp}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use zod for validation in packages/core and apps/webapp
Files:
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use function declarations instead of default exports
Import from
@trigger.dev/coreusing subpaths only, never import from root
Files:
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
apps/webapp/app/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Access all environment variables through the
envexport ofenv.server.tsinstead of directly accessingprocess.envin the Trigger.dev webapp
Files:
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
apps/webapp/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
apps/webapp/**/*.{ts,tsx}: When importing from@trigger.dev/corein the webapp, use subpath exports from the package.json instead of importing from the root path
Follow the Remix 2.1.0 and Express server conventions when updating the main trigger.dev webappAccess environment variables via
envexport fromapps/webapp/app/env.server.ts, never useprocess.envdirectly
Files:
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}
📄 CodeRabbit inference engine (AGENTS.md)
Format code using Prettier before committing
Files:
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)
**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries
Files:
apps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
🧠 Learnings (14)
📓 Common learnings
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: apps/webapp/app/presenters/v3/BranchesPresenter.server.ts:45-45
Timestamp: 2026-02-03T18:27:05.229Z
Learning: In the Vercel integration feature, the GitHub app is responsible for builds and provides git metadata (using source: "trigger_github_app"). The Vercel integration is only for linking deployments between platforms, not for triggering builds or providing git metadata.
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts:233-237
Timestamp: 2026-02-06T19:53:46.849Z
Learning: Vercel dashboard URLs for deployments use the format `https://vercel.com/${teamSlug}/${projectName}/${deploymentId}` where the deploymentId should NOT include the `dpl_` prefix. When constructing Vercel dashboard links from API deployment IDs (which include the `dpl_` prefix), the prefix must be stripped using `.replace(/^dpl_/, "")`.
📚 Learning: 2026-02-03T18:27:05.229Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: apps/webapp/app/presenters/v3/BranchesPresenter.server.ts:45-45
Timestamp: 2026-02-03T18:27:05.229Z
Learning: In the Vercel integration feature, the GitHub app is responsible for builds and provides git metadata (using source: "trigger_github_app"). The Vercel integration is only for linking deployments between platforms, not for triggering builds or providing git metadata.
Applied to files:
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
📚 Learning: 2026-02-11T16:37:32.429Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3019
File: apps/webapp/app/components/primitives/charts/Card.tsx:26-30
Timestamp: 2026-02-11T16:37:32.429Z
Learning: In projects using react-grid-layout, avoid relying on drag-handle class to imply draggability. Ensure drag-handle elements only affect dragging when the parent grid item is configured draggable in the layout; conditionally apply cursor styles based on the draggable prop. This improves correctness and accessibility.
Applied to files:
apps/webapp/app/components/integrations/VercelLink.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx
📚 Learning: 2026-02-03T18:27:40.429Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables/route.tsx:553-555
Timestamp: 2026-02-03T18:27:40.429Z
Learning: In apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables/route.tsx, the menu buttons (e.g., Edit with PencilSquareIcon) in the TableCellMenu are intentionally icon-only with no text labels as a compact UI pattern. This is a deliberate design choice for this route; preserve the icon-only behavior for consistency in this file.
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx
📚 Learning: 2025-12-08T15:19:56.823Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2760
File: apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx:278-281
Timestamp: 2025-12-08T15:19:56.823Z
Learning: In apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx, the tableState search parameter uses intentional double-encoding: the parameter value contains a URL-encoded URLSearchParams string, so decodeURIComponent(value("tableState") ?? "") is required to fully decode it before parsing with new URLSearchParams(). This pattern allows bundling multiple filter/pagination params as a single search parameter.
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx
📚 Learning: 2026-02-06T19:53:46.849Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts:233-237
Timestamp: 2026-02-06T19:53:46.849Z
Learning: Vercel dashboard URLs for deployments use the format `https://vercel.com/${teamSlug}/${projectName}/${deploymentId}` where the deploymentId should NOT include the `dpl_` prefix. When constructing Vercel dashboard links from API deployment IDs (which include the `dpl_` prefix), the prefix must be stripped using `.replace(/^dpl_/, "")`.
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.ts
📚 Learning: 2025-11-27T16:26:58.661Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-11-27T16:26:58.661Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : Follow the Remix 2.1.0 and Express server conventions when updating the main trigger.dev webapp
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts
📚 Learning: 2026-02-04T16:34:48.876Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: apps/webapp/app/routes/vercel.connect.tsx:13-27
Timestamp: 2026-02-04T16:34:48.876Z
Learning: In apps/webapp/app/routes/vercel.connect.tsx, configurationId may be absent for "dashboard" flows but must be present for "marketplace" flows. Enforce this with a Zod superRefine and pass installationId to repository methods only when configurationId is defined (omit the field otherwise).
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsxapps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
📚 Learning: 2026-02-11T16:50:14.167Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3019
File: apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboards.$dashboardId.widgets.tsx:126-131
Timestamp: 2026-02-11T16:50:14.167Z
Learning: In apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboards.$dashboardId.widgets.tsx, MetricsDashboard entities are intentionally scoped to the organization level, not the project level. The dashboard lookup should filter by organizationId only (not projectId), allowing dashboards to be accessed across projects within the same organization. The optional projectId field on MetricsDashboard serves other purposes and should not be used as an authorization constraint.
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx
📚 Learning: 2025-11-27T16:26:58.661Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-11-27T16:26:58.661Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from `trigger.dev/core` in the webapp, use subpath exports from the package.json instead of importing from the root path
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx
📚 Learning: 2026-02-06T19:53:38.843Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts:233-237
Timestamp: 2026-02-06T19:53:38.843Z
Learning: When constructing Vercel dashboard URLs from deployment IDs, always strip the dpl_ prefix from the ID. Implement this by transforming the ID with .replace(/^dpl_/, "") before concatenating into the URL: https://vercel.com/${teamSlug}/${projectName}/${cleanedDeploymentId}. Consider centralizing this logic in a small helper (e.g., getVercelDeploymentId(id) or a URL builder) and add tests to verify both prefixed and non-prefixed inputs.
Applied to files:
apps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
📚 Learning: 2025-11-27T16:26:58.661Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-11-27T16:26:58.661Z
Learning: Applies to apps/webapp/app/v3/presenters/**/*.server.{ts,tsx} : Organize presenters in the webapp following the pattern `app/v3/presenters/*/*.server.ts` to move complex loader code into classes
Applied to files:
apps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
📚 Learning: 2025-08-14T12:13:20.455Z
Learnt from: myftija
Repo: triggerdotdev/trigger.dev PR: 2392
File: packages/cli-v3/src/utilities/gitMeta.ts:195-218
Timestamp: 2025-08-14T12:13:20.455Z
Learning: In the GitMeta schema (packages/core/src/v3/schemas/common.ts), all fields are intentionally optional to handle partial data from various deployment contexts (local, GitHub Actions, GitHub App). Functions like getGitHubAppMeta() are designed to work with missing environment variables rather than validate their presence.
Applied to files:
apps/webapp/app/presenters/v3/DeploymentListPresenter.server.tsapps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
📚 Learning: 2025-09-03T14:35:52.384Z
Learnt from: myftija
Repo: triggerdotdev/trigger.dev PR: 2464
File: apps/webapp/app/utils/pathBuilder.ts:144-146
Timestamp: 2025-09-03T14:35:52.384Z
Learning: In the trigger.dev codebase, organization slugs are safe for URL query parameters and don't require URL encoding, as confirmed by the maintainer in apps/webapp/app/utils/pathBuilder.ts.
Applied to files:
apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
🧬 Code graph analysis (5)
apps/webapp/app/components/integrations/VercelLink.tsx (3)
apps/webapp/app/components/primitives/Tooltip.tsx (1)
SimpleTooltip(141-141)apps/webapp/app/components/primitives/Buttons.tsx (1)
LinkButton(335-403)apps/webapp/app/components/integrations/VercelLogo.tsx (1)
VercelLogo(1-12)
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx (1)
apps/webapp/app/components/integrations/VercelLink.tsx (1)
VercelLink(5-22)
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx (1)
apps/webapp/app/components/integrations/VercelLink.tsx (1)
VercelLink(5-22)
apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts (1)
apps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.ts (1)
buildVercelDeploymentUrl(205-212)
apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts (1)
apps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.ts (2)
VercelProjectIntegrationDataSchema(67-75)buildVercelDeploymentUrl(205-212)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (27)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: typecheck / typecheck
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
- GitHub Check: sdk-compat / Bun Runtime
- GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
- GitHub Check: sdk-compat / Cloudflare Workers
- GitHub Check: sdk-compat / Deno Runtime
🔇 Additional comments (5)
apps/webapp/app/components/integrations/VercelLink.tsx (1)
1-22: LGTM!Clean, minimal component. The
LinkButtoncorrectly routes thehttps://vercel.com/…URL through theExtLinkbranch, and the tooltip/label pairing is consistent with other external link buttons in the codebase.apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx (1)
18-18: LGTM!The
VercelLinkimport and the conditional "Linked" property row are correct. The negative-margindivwrapper mirrors the existingGitMetadatapattern, maintaining visual consistency.Also applies to: 520-529
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx (1)
22-22: LGTM!
e.stopPropagation()is a sensible guard even though the parentTableCellhas notoprop.VercelLinkreceives the URL as a non-optionalstringbecause the outer condition already narrows the type.Also applies to: 316-323
apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts (1)
13-16: LGTM!The import refactor cleanly delegates URL construction to
buildVercelDeploymentUrl. The existing guard at line 237 (&& vercelTeamSlug && vercelProjectName) ensures neither value isundefinedor empty before the call, so the inline SQLLEFT JOIN LATERAL+ this function remain consistent.Also applies to: 238-242
apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts (1)
15-18: LGTM!The two sequential queries are appropriate for a single-deployment detail view. The guard
parsed.success && parsed.data.vercelTeamSlug(line 191) ensures theintegrationDeploymentquery only runs when the integration is valid and team-scoped, andbuildVercelDeploymentUrlis never called with anundefinedslug. TheorderBy: { createdAt: "desc" }onfindFirstcorrectly returns the most recent integration deployment record.Also applies to: 169-214, 282-282
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.ts`:
- Around line 205-212: The function buildVercelDeploymentUrl accepts
vercelTeamSlug as string | undefined which lets callers pass undefined and
produce URLs containing the literal "undefined"; change the parameter to
vercelTeamSlug: string (remove | undefined) so the type enforces callers to pass
a real slug, update any call sites that rely on undefined (they should already
guard per the review) and keep the body using vercelTeamSlug.replace(...) and
the same template; ensure TypeScript compiles and no call sites pass undefined
anymore.
---
Nitpick comments:
In `@apps/webapp/app/v3/vercel/vercelProjectIntegrationSchema.ts`:
- Around line 205-212: Add unit tests for buildVercelDeploymentUrl that verify
it strips a "dpl_" prefix when present and leaves non-prefixed IDs unchanged:
create tests calling buildVercelDeploymentUrl with (1) integrationDeploymentId =
"dpl_abc123" and asserting the returned URL contains "abc123", and (2)
integrationDeploymentId = "abc123" and asserting the returned URL contains
"abc123"; include a vercelTeamSlug and vercelProjectName in both tests and
assert the full URL matches the expected string to ensure the function behaves
for both prefixed and non-prefixed inputs.
✅ Checklist
Testing
Deployments UI page with and w/o Vercel installed
Changelog
Add Vercel integration lookup and expose a deployment URL so linked
Vercel deployments are discoverable from the app.
organizationProjectIntegration to detect Vercel project data.
look up the latest integrationDeployment for the deployment and
construct a Vercel URL (vercel.com///).
by using the VercelLink component where vercelDeploymentUrl exists.
VercelLink component in the list view.
This makes it easier for users to jump directly to the corresponding
Vercel deployment from the webapp.
Screenshots
💯
This is part 1 of 2 in a stack made with GitButler: