Skip to content

Conversation

@isshaddad
Copy link
Collaborator

@isshaddad isshaddad commented Jan 29, 2026

Adds a workaround to playwright to browser download failures based on this GH issue: #2440


Open with Devin

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

⚠️ No Changeset found

Latest commit: b724d93

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

Walkthrough

This pull request adds documentation and API specifications for three new Deployments API endpoints. Changes include a new troubleshooting section in the Playwright extension documentation, three new MDX documentation files for Deployments API operations (retrieve, get-latest, promote), an updated navigation structure in docs.json to include the new "Deployments API" group, and comprehensive OpenAPI specifications for the three endpoints with request/response schemas, error handling, security requirements, and code examples.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title claims to add a playwright workaround, but the changeset includes significant API documentation additions (Deployments API with three new endpoints) beyond the playwright docs fix. Update the title to reflect all major changes, such as 'docs: Add Playwright workaround and Deployments API documentation' or split into multiple focused PRs.
Description check ⚠️ Warning The description only mentions the Playwright workaround and omits the substantial Deployments API documentation additions (three new endpoints and navigation updates). Update the description to document all changes: Playwright workaround, three new Deployments API endpoints (retrieve, get-latest, promote), API documentation, and navigation updates.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional flags.

Open in Devin Review

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/v3-openapi.yaml`:
- Around line 607-669: The get_latest_deployment_v1 response intentionally omits
imagePlatform, externalBuildData, and worker compared to get_deployment_v1;
either refactor by extracting a reusable Deployment schema under
components/schemas (create a Deployment model with all common fields and then
use an inline subset or a DeploymentSummary schema for the latest endpoint) or
add a clear comment/description in the OpenAPI file near the
/api/v1/deployments/latest operation (or in components/schemas) stating that
get_latest_deployment_v1 returns a reduced DeploymentSummary and intentionally
omits imagePlatform, externalBuildData, and worker to match backend behavior;
update references to get_deployment_v1, Deployment, imagePlatform,
externalBuildData, and worker so readers can see the relationship.
🧹 Nitpick comments (1)
docs/v3-openapi.yaml (1)

508-606: LGTM with optional schema improvement suggestions.

The endpoint is well-documented with proper responses, security, and code samples.

Optional improvements:

  1. The response schema is defined inline rather than using $ref like other endpoints. Consider extracting the DeploymentObject schema to components/schemas for reusability across the three deployment endpoints.

  2. The tasks array (lines 569-580) lacks a maxItems constraint, which is an OpenAPI best practice for array validation. Consider adding it if there's a known upper bound.

Note: The Gitleaks warnings about the curl auth headers are false positives—the tokens (tr_dev_1234) are clearly placeholder examples.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 72c3571 and b724d93.

📒 Files selected for processing (6)
  • docs/config/extensions/playwright.mdx
  • docs/docs.json
  • docs/management/deployments/get-latest.mdx
  • docs/management/deployments/promote.mdx
  • docs/management/deployments/retrieve.mdx
  • docs/v3-openapi.yaml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier before committing

Files:

  • docs/docs.json
  • docs/v3-openapi.yaml
🧠 Learnings (3)
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties

Applied to files:

  • docs/config/extensions/playwright.mdx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure build process in trigger.config.ts using `build` object with external packages, extensions, and JSX settings

Applied to files:

  • docs/config/extensions/playwright.mdx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Configure task retry behavior using the `retry` property with options like maxAttempts, factor, and timeout values

Applied to files:

  • docs/config/extensions/playwright.mdx
🪛 Checkov (3.2.334)
docs/v3-openapi.yaml

[medium] 569-582: Ensure that arrays have a maximum number of items

(CKV_OPENAPI_21)

🪛 Gitleaks (8.30.0)
docs/v3-openapi.yaml

[high] 602-605: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

(curl-auth-header)


[high] 665-668: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

(curl-auth-header)


[high] 730-733: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

(curl-auth-header)

⏰ 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). (1)
  • GitHub Check: Mintlify Deployment
🔇 Additional comments (6)
docs/config/extensions/playwright.mdx (1)

94-119: LGTM! Clear troubleshooting documentation.

The workaround for browser download failures is well-documented with a clear code example and links to the relevant GitHub issue for context.

One minor note: consider verifying that the GitHub issue comment link (with the specific comment ID #issuecomment-3815104376) remains valid over time, as comment IDs can change if comments are deleted/recreated.

docs/management/deployments/get-latest.mdx (1)

1-4: LGTM!

Standard Mintlify documentation page with proper front matter referencing the OpenAPI endpoint.

docs/management/deployments/retrieve.mdx (1)

1-4: LGTM!

Standard Mintlify documentation page with proper front matter referencing the OpenAPI endpoint.

docs/management/deployments/promote.mdx (1)

1-4: LGTM!

Standard Mintlify documentation page with proper front matter referencing the OpenAPI endpoint.

docs/docs.json (1)

272-280: LGTM!

The new Deployments API navigation group is properly structured and consistent with the existing API groups.

docs/v3-openapi.yaml (1)

670-735: LGTM!

The promote endpoint is well-documented with appropriate request/response schemas and error handling for 400, 401, and 404 cases.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +607 to +669
"/api/v1/deployments/latest":
get:
operationId: get_latest_deployment_v1
summary: Get latest deployment
description: Retrieve information about the latest unmanaged deployment for the authenticated project.
responses:
"200":
description: Successful request
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: The deployment ID
status:
type: string
enum: ["PENDING", "INSTALLING", "BUILDING", "DEPLOYING", "DEPLOYED", "FAILED", "CANCELED", "TIMED_OUT"]
description: The current status of the deployment
contentHash:
type: string
description: Hash of the deployment content
shortCode:
type: string
description: The short code for the deployment
version:
type: string
description: The deployment version (e.g., "20250228.1")
imageReference:
type: string
nullable: true
description: Reference to the deployment image
errorData:
type: object
nullable: true
description: Error data if the deployment failed
"401":
description: Unauthorized - API key is missing or invalid
"404":
description: No deployment found
tags:
- deployments
security:
- secretKey: []
x-codeSamples:
- lang: typescript
source: |-
const response = await fetch(
"https://api.trigger.dev/api/v1/deployments/latest",
{
method: "GET",
headers: {
"Authorization": `Bearer ${secretKey}`,
},
}
);
const deployment = await response.json();
- lang: curl
source: |-
curl -X GET "https://api.trigger.dev/api/v1/deployments/latest" \
-H "Authorization: Bearer tr_dev_1234"

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, find and check the OpenAPI YAML file
find . -name "*openapi*" -o -name "v3-openapi.yaml" 2>/dev/null

# Check file size and basic structure
if [ -f "docs/v3-openapi.yaml" ]; then
  wc -l docs/v3-openapi.yaml
  echo "---"
  # Look for both endpoint definitions
  rg -n "/api/v1/deployments" docs/v3-openapi.yaml | head -20
fi

Repository: triggerdotdev/trigger.dev

Length of output: 769


🏁 Script executed:

#!/bin/bash
# Read the deployment endpoint schema
sed -n '508,606p' docs/v3-openapi.yaml

Repository: triggerdotdev/trigger.dev

Length of output: 3657


🏁 Script executed:

#!/bin/bash
# Check for components/schemas section that might define a shared Deployment schema
rg -n "components:" docs/v3-openapi.yaml
echo "---"
# Look for Deployment schema definitions
rg -n "Deployment:" docs/v3-openapi.yaml | head -20
echo "---"
# Check if the file follows Prettier formatting (check for YAML formatting issues)
# Look at specific sections with potential formatting issues
sed -n '607,650p' docs/v3-openapi.yaml | cat -A

Repository: triggerdotdev/trigger.dev

Length of output: 1849


🏁 Script executed:

#!/bin/bash
# Read the components section
sed -n '1621,1700p' docs/v3-openapi.yaml

Repository: triggerdotdev/trigger.dev

Length of output: 3194


🏁 Script executed:

#!/bin/bash
# Search for Deployment schema in the schemas section
rg -n "schemas:" docs/v3-openapi.yaml
echo "---"
# Look for deployment-related schema definitions
rg -n "^\s+Deployment|^\s+Deployment:" docs/v3-openapi.yaml

Repository: triggerdotdev/trigger.dev

Length of output: 88


🏁 Script executed:

#!/bin/bash
# Read the schemas section to check what's defined
sed -n '1747,1850p' docs/v3-openapi.yaml

Repository: triggerdotdev/trigger.dev

Length of output: 3737


🏁 Script executed:

#!/bin/bash
# Check if there's a backend implementation to understand if this is intentional
# Search for deployment route handlers
find . -type f \( -name "*.ts" -o -name "*.js" \) -path "*/routes/*" -o -path "*/api/*" 2>/dev/null | grep -i deploy | head -10
echo "---"
# Search for getLatestDeployment handler
rg -l "getLatestDeployment|get_latest_deployment" --type ts | head -10

Repository: triggerdotdev/trigger.dev

Length of output: 753


🏁 Script executed:

#!/bin/bash
# Check the implementation of the latest deployment endpoint
cat ./apps/webapp/app/routes/api.v1.deployments.latest.ts
echo "=== END LATEST ==="
echo ""
# Check the implementation of the specific deployment endpoint
cat ./apps/webapp/app/routes/api.v1.deployments.\$deploymentId.ts | head -100

Repository: triggerdotdev/trigger.dev

Length of output: 3672


🏁 Script executed:

#!/bin/bash
# Check the coding guidelines - verify if Prettier is meant to apply to YAML
# Look for prettier config
find . -name ".prettierrc*" -o -name "prettier.config.*" 2>/dev/null | head -5
echo "---"
# Check if YAML formatting is properly applied (check indentation/structure)
sed -n '607,620p' docs/v3-openapi.yaml | od -c | head -30

Repository: triggerdotdev/trigger.dev

Length of output: 184


🏁 Script executed:

#!/bin/bash
# Check if prettier config includes yaml
cat ./prettier.config.js | head -40

Repository: triggerdotdev/trigger.dev

Length of output: 277


🏁 Script executed:

#!/bin/bash
# Check if there's a .prettierignore file
if [ -f ".prettierignore" ]; then
  cat .prettierignore | grep -i yaml
  echo "---"
  cat .prettierignore | grep -i docs
fi
echo "---"
# Check if prettier should be applied to YAML - try to run prettier check (may not be available)
# but first verify the file's YAML indentation consistency
head -100 docs/v3-openapi.yaml | grep -E "^  " | head -20

Repository: triggerdotdev/trigger.dev

Length of output: 825


Response schema difference is intentional—document the design decision or refactor.

The get_latest_deployment_v1 endpoint intentionally returns fewer fields than get_deployment_v1. The backend implementation confirms it omits imagePlatform, externalBuildData, and the worker object.

To improve maintainability, consider:

  1. Extracting a reusable Deployment schema in components/schemas to reduce duplication
  2. Or add a comment in the OpenAPI spec explaining why the latest endpoint returns a subset of fields
🧰 Tools
🪛 Gitleaks (8.30.0)

[high] 665-668: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

(curl-auth-header)

🤖 Prompt for AI Agents
In `@docs/v3-openapi.yaml` around lines 607 - 669, The get_latest_deployment_v1
response intentionally omits imagePlatform, externalBuildData, and worker
compared to get_deployment_v1; either refactor by extracting a reusable
Deployment schema under components/schemas (create a Deployment model with all
common fields and then use an inline subset or a DeploymentSummary schema for
the latest endpoint) or add a clear comment/description in the OpenAPI file near
the /api/v1/deployments/latest operation (or in components/schemas) stating that
get_latest_deployment_v1 returns a reduced DeploymentSummary and intentionally
omits imagePlatform, externalBuildData, and worker to match backend behavior;
update references to get_deployment_v1, Deployment, imagePlatform,
externalBuildData, and worker so readers can see the relationship.

@ericallam
Copy link
Member

@isshaddad did you mean to add the deployment api docs to this PR?

@isshaddad
Copy link
Collaborator Author

@isshaddad did you mean to add the deployment api docs to this PR?

I merged docs/promote-deployment because it was already approved and I initially wanted to do additional changes in the API reference section

@ericallam ericallam merged commit 01208fd into main Jan 30, 2026
11 checks passed
@ericallam ericallam deleted the docs/playwright-workaround branch January 30, 2026 08:43
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.

4 participants