Skip to content

feat(buildExtensions): syncSupabaseEnvVars build extension#3152

Open
0ski wants to merge 2 commits intomainfrom
oskar/feat-sync-supabase-env-vars-build-extension
Open

feat(buildExtensions): syncSupabaseEnvVars build extension#3152
0ski wants to merge 2 commits intomainfrom
oskar/feat-sync-supabase-env-vars-build-extension

Conversation

@0ski
Copy link
Collaborator

@0ski 0ski commented Feb 27, 2026

  • docs

@changeset-bot
Copy link

changeset-bot bot commented Feb 27, 2026

🦋 Changeset detected

Latest commit: facb63c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@trigger.dev/build Patch
trigger.dev Patch
@trigger.dev/python Patch
d3-chat Patch
references-d3-openai-agents Patch
references-nextjs-realtime Patch
references-realtime-hooks-test Patch
references-realtime-streams Patch
references-telemetry Patch
@trigger.dev/core Patch
@trigger.dev/react-hooks Patch
@trigger.dev/redis-worker Patch
@trigger.dev/rsc Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/sdk Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/schedule-engine Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/zod-worker Patch
@internal/sdk-compat-tests Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a new built-in extension syncSupabaseEnvVars implemented at packages/build/src/extensions/core/syncSupabaseEnvVars.ts and re-exported from packages/build/src/extensions/core.ts. The extension queries Supabase project/branch details and API keys, builds standard Supabase environment variable mappings (with optional prefix), skips execution on Vercel, and emits EnvVar entries. Documentation was updated (docs/config/extensions/overview.mdx, docs/config/extensions/syncEnvVars.mdx — the new block appears duplicated in the diff). Minor UI copy and styling changes were made to the Vercel onboarding modal and a changeset was added.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete and does not follow the required template structure; it only contains '+ docs' without testing details, changelog, or checklist completion. Complete the PR description by filling out all required sections: checklist items, testing steps, changelog description, and address the issue reference.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main feature added: a new syncSupabaseEnvVars build extension.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch oskar/feat-sync-supabase-env-vars-build-extension

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

coderabbitai[bot]

This comment was marked as resolved.

@0ski 0ski force-pushed the oskar/feat-sync-supabase-env-vars-build-extension branch from 7f391fc to 76fe7b7 Compare March 3, 2026 16:45
devin-ai-integration[bot]

This comment was marked as resolved.

@0ski 0ski force-pushed the oskar/feat-sync-supabase-env-vars-build-extension branch from 76fe7b7 to 25b0834 Compare March 3, 2026 17:36
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.

🧹 Nitpick comments (1)
apps/webapp/app/components/integrations/VercelOnboardingModal.tsx (1)

848-848: Use more descriptive link text for better accessibility context.

“read the docs” is generic; a specific label is easier for screen readers and quick scanning.

Suggested copy tweak
- If you are using Supabase or Neon branching, <TextLink href="https://trigger.dev/docs/vercel-integration#supabase-and-neon-database-branching" target="_blank" rel="noopener noreferrer">read the docs</TextLink> for the recommended setup.
+ If you are using Supabase or Neon branching, <TextLink href="https://trigger.dev/docs/vercel-integration#supabase-and-neon-database-branching" target="_blank" rel="noopener noreferrer">read the Supabase and Neon branching docs</TextLink> for the recommended setup.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/webapp/app/components/integrations/VercelOnboardingModal.tsx` at line
848, The link text "read the docs" in the VercelOnboardingModal component is too
generic; update the TextLink (inside VercelOnboardingModal) to use a more
descriptive label such as "Read Vercel integration docs for Supabase and Neon
branching" and add an explicit aria-label with the same descriptive text for
screen readers (e.g., aria-label="Read Vercel integration docs for Supabase and
Neon database branching") so the TextLink and accessibility metadata clearly
describe the destination.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/webapp/app/components/integrations/VercelOnboardingModal.tsx`:
- Line 848: The link text "read the docs" in the VercelOnboardingModal component
is too generic; update the TextLink (inside VercelOnboardingModal) to use a more
descriptive label such as "Read Vercel integration docs for Supabase and Neon
branching" and add an explicit aria-label with the same descriptive text for
screen readers (e.g., aria-label="Read Vercel integration docs for Supabase and
Neon database branching") so the TextLink and accessibility metadata clearly
describe the destination.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76fe7b7 and 25b0834.

📒 Files selected for processing (7)
  • .changeset/warm-falcons-joke.md
  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
  • docs/config/extensions/overview.mdx
  • docs/config/extensions/syncEnvVars.mdx
  • docs/vercel-integration.mdx
  • packages/build/src/extensions/core.ts
  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/build/src/extensions/core.ts
  • docs/vercel-integration.mdx
  • docs/config/extensions/syncEnvVars.mdx
📜 Review details
⏰ 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 (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{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}: In TypeScript SDK usage, always import from @trigger.dev/sdk, never from @trigger.dev/sdk/v3 or use deprecated client.defineJob
Import from @trigger.dev/core subpaths only, never from the root
Use the Run Engine 2.0 (@internal/run-engine) and redis-worker for all new work, not legacy V1 MarQS queue or deprecated V1 functions

Files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
**/*.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:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier before committing

Files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CLAUDE.md)

Docs in docs/ directory should use Mintlify MDX format following conventions in docs/CLAUDE.md

Files:

  • docs/config/extensions/overview.mdx
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Files:

  • docs/config/extensions/overview.mdx
{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/VercelOnboardingModal.tsx
apps/webapp/app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

Access all environment variables through the env export of env.server.ts instead of directly accessing process.env in the Trigger.dev webapp

Files:

  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
apps/webapp/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

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
Follow the Remix 2.1.0 and Express server conventions when updating the main trigger.dev webapp

Files:

  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
apps/**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (CLAUDE.md)

When modifying only server components (apps/webapp/, apps/supervisor/, etc.) with no package changes, add a .server-changes/ file instead of a changeset

Files:

  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
🧠 Learnings (26)
📓 Common learnings
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 : Use build extensions in trigger.config.ts (additionalFiles, additionalPackages, aptGet, prismaExtension, etc.) to customize the build
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
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.127Z
Learning: Applies to packages/cli-v3/src/build/**/* : Build system in `src/build/` should use configuration from `trigger.config.ts` in user projects to determine bundling, build extensions, and output structure
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-02T12:42:41.093Z
Learning: Applies to packages/**/*.{ts,tsx,js},integrations/**/*.{ts,tsx,js} : When modifying public packages (packages/* or integrations/*), add a changeset via pnpm run changeset:add
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/**/*.{ts,tsx} : Access all environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env` in the Trigger.dev webapp
📚 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 : Use build extensions in trigger.config.ts (additionalFiles, additionalPackages, aptGet, prismaExtension, etc.) to customize the build

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • docs/config/extensions/overview.mdx
  • .changeset/warm-falcons-joke.md
📚 Learning: 2026-03-02T12:42:47.641Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: apps/supervisor/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:42:47.641Z
Learning: Applies to apps/supervisor/src/env.ts : Environment configuration should be defined in `src/env.ts`

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.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/**/*.{ts,tsx} : Access all environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env` in the Trigger.dev webapp

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • docs/config/extensions/overview.mdx
  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
  • .changeset/warm-falcons-joke.md
📚 Learning: 2026-03-02T12:43:34.127Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.127Z
Learning: Applies to packages/cli-v3/src/build/**/* : Build system in `src/build/` should use configuration from `trigger.config.ts` in user projects to determine bundling, build extensions, and output structure

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • docs/config/extensions/overview.mdx
📚 Learning: 2026-03-02T12:43:34.127Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.127Z
Learning: Applies to packages/cli-v3/src/commands/dev.ts : Implement `dev.ts` command in `src/commands/` for local development mode

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
📚 Learning: 2026-03-02T12:43:34.127Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.127Z
Learning: Applies to packages/cli-v3/src/dev/**/* : Dev mode code should be located in `src/dev/` and runs tasks locally in the user's Node.js process without containers

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
📚 Learning: 2025-08-19T09:49:07.011Z
Learnt from: julienvanbeveren
Repo: triggerdotdev/trigger.dev PR: 2417
File: apps/webapp/app/routes/api.v1.projects.$projectRef.envvars.$slug.import.ts:56-61
Timestamp: 2025-08-19T09:49:07.011Z
Learning: In the Trigger.dev codebase, environment variables should default to `isSecret: false` when not explicitly marked as secrets in the syncEnvVars functionality. This is the intended behavior for both regular variables and parent variables.

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
  • .changeset/warm-falcons-joke.md
📚 Learning: 2025-08-14T18:35:44.370Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2390
File: apps/webapp/app/env.server.ts:764-765
Timestamp: 2025-08-14T18:35:44.370Z
Learning: The BoolEnv helper in apps/webapp/app/utils/boolEnv.ts uses z.preprocess with inconsistent default value types across the codebase - some usages pass boolean defaults (correct) while others pass string defaults (incorrect), leading to type confusion. The helper should enforce boolean-only defaults or have clearer documentation.

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
📚 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:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • docs/config/extensions/overview.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} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks

Applied to files:

  • docs/config/extensions/overview.mdx
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx} : In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code

Applied to files:

  • docs/config/extensions/overview.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} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties

Applied to files:

  • docs/config/extensions/overview.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} : Attach metadata to task runs using the metadata option when triggering, and access/update it inside runs using metadata functions

Applied to files:

  • docs/config/extensions/overview.mdx
📚 Learning: 2026-03-02T12:43:48.114Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:48.114Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx,js,jsx} : Always import from `trigger.dev/sdk`. Never use `trigger.dev/sdk/v3` (deprecated path alias)

Applied to files:

  • docs/config/extensions/overview.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} : Use metadata methods (set, del, replace, append, remove, increment, decrement, stream, flush) to update metadata during task execution

Applied to files:

  • docs/config/extensions/overview.mdx
📚 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/components/integrations/VercelOnboardingModal.tsx
📚 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/components/integrations/VercelOnboardingModal.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/components/integrations/VercelOnboardingModal.tsx
📚 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: Use environment variable TRIGGER_SECRET_KEY when triggering tasks from backend code

Applied to files:

  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
📚 Learning: 2025-06-06T23:55:01.933Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2155
File: hosting/docker/.env.example:4-7
Timestamp: 2025-06-06T23:55:01.933Z
Learning: In the trigger.dev project, .env.example files should contain actual example secret values rather than placeholders, as these help users understand the expected format. The files include clear warnings about not using these defaults in production and instructions for generating proper secrets.

Applied to files:

  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
📚 Learning: 2025-06-25T14:14:11.965Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2195
File: hosting/k8s/helm/values-production-example.yaml:95-102
Timestamp: 2025-06-25T14:14:11.965Z
Learning: In the Trigger.dev Helm chart production examples, the maintainer prefers to include initial/bootstrap credentials with clear warnings that they should be changed after first login, rather than requiring external secret references that could complicate initial setup. This follows their pattern of providing working examples with explicit security guidance.

Applied to files:

  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
📚 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: Use `TriggerAuthContext` provider to supply Public Access Token to Trigger.dev React hooks

Applied to files:

  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
📚 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/VercelOnboardingModal.tsx
📚 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/VercelOnboardingModal.tsx
📚 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: Run `npx trigger.devlatest dev` to start the Trigger.dev development server

Applied to files:

  • .changeset/warm-falcons-joke.md
🧬 Code graph analysis (2)
packages/build/src/extensions/core/syncSupabaseEnvVars.ts (2)
packages/core/src/v3/build/extensions.ts (1)
  • BuildExtension (14-22)
packages/build/src/extensions/core/syncEnvVars.ts (1)
  • syncEnvVars (77-127)
apps/webapp/app/components/integrations/VercelOnboardingModal.tsx (2)
apps/webapp/app/components/primitives/Paragraph.tsx (1)
  • Paragraph (88-107)
apps/webapp/app/components/primitives/TextLink.tsx (1)
  • TextLink (29-94)
🔇 Additional comments (7)
apps/webapp/app/components/integrations/VercelOnboardingModal.tsx (3)

51-51: Good addition of TextLink import.

This is correctly used in the updated onboarding copy and keeps the docs CTA in-app styled.


735-736: Nice readability improvement for TRIGGER_SECRET_KEY emphasis.

The chip-style inline code treatment is clearer and visually consistent with the rest of the modal.


779-783: Clearer expectation-setting for skipped staging mapping.

This copy makes the staging impact explicit and gives users a clear recovery path via project settings.

.changeset/warm-falcons-joke.md (1)

1-5: Changeset entry looks correct.

Patch bump target and summary are aligned with the extension update.

docs/config/extensions/overview.mdx (1)

60-60: Built-in extension docs entry is clear and consistent.

The new row fits the existing overview table structure and discoverability flow.

packages/build/src/extensions/core/syncSupabaseEnvVars.ts (2)

129-212: API failure handling is well-structured here.

The staged fetch/parse checks produce clear, actionable errors and keep failure points explicit.


5-6: The security concern about sensitive Supabase values being unprotected is valid, but the proposed fix will not work.

While adding isSecret to the EnvVar type definition looks correct, the callSyncEnvVarsFn function (lines 175-189 of syncEnvVars.ts) explicitly extracts only name, value, and isParentEnv from each item—the isSecret field would be silently dropped and never propagated. Additionally, the BuildLayer.deploy.env type is defined as Record<string, string | undefined>, which has no support for metadata like isSecret.

Marking these sensitive values as secrets requires architectural changes to the build system to support secret metadata through layers. This cannot be solved by adding a type field that the system will ignore.

Likely an incorrect or invalid review comment.

@0ski 0ski force-pushed the oskar/feat-sync-supabase-env-vars-build-extension branch from 25b0834 to 7d1b93a Compare March 3, 2026 18:01
coderabbitai[bot]

This comment was marked as resolved.

@0ski 0ski marked this pull request as ready for review March 3, 2026 18:11
devin-ai-integration[bot]

This comment was marked as resolved.

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.

♻️ Duplicate comments (2)
packages/build/src/extensions/core/syncSupabaseEnvVars.ts (2)

5-5: ⚠️ Potential issue | 🟠 Major

Mark sensitive Supabase values with isSecret before emitting env vars.

Secrets are currently emitted as plain env vars. Add isSecret on EnvVar and set it for sensitive keys (DATABASE_URL, POSTGRES_URL, SUPABASE_DB_URL, PGPASSWORD, SUPABASE_JWT_SECRET, SUPABASE_SERVICE_ROLE_KEY) when pushing to newEnvVars.

Proposed fix
-type EnvVar = { name: string; value: string; isParentEnv?: boolean };
+type EnvVar = { name: string; value: string; isParentEnv?: boolean; isSecret?: boolean };

+const SECRET_SUPABASE_ENV_VARS = new Set([
+  "DATABASE_URL",
+  "POSTGRES_URL",
+  "SUPABASE_DB_URL",
+  "PGPASSWORD",
+  "SUPABASE_JWT_SECRET",
+  "SUPABASE_SERVICE_ROLE_KEY",
+]);
@@
     for (const supabaseEnvVar of outputEnvVars) {
       const prefixedKey = `${envVarPrefix}${supabaseEnvVar}`;
       if (envVarMappings[supabaseEnvVar]) {
         newEnvVars.push({
           name: prefixedKey,
           value: envVarMappings[supabaseEnvVar],
+          isSecret: SECRET_SUPABASE_ENV_VARS.has(supabaseEnvVar),
         });
       }
     }

Also ensure SyncEnvVarsBody / downstream handling preserves isSecret end-to-end.

Based on learnings, environment variables in this sync flow default to isSecret: false unless explicitly marked.

Also applies to: 259-267

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/build/src/extensions/core/syncSupabaseEnvVars.ts` at line 5, The
EnvVar type and creation flow currently lack an isSecret flag: update the EnvVar
definition to include isSecret?: boolean and when constructing/pushing to
newEnvVars (the place that builds the list of env vars in
syncSupabaseEnvVars.ts) set isSecret: true for sensitive keys DATABASE_URL,
POSTGRES_URL, SUPABASE_DB_URL, PGPASSWORD, SUPABASE_JWT_SECRET, and
SUPABASE_SERVICE_ROLE_KEY; also update the SyncEnvVarsBody type/signature and
any downstream handlers to accept and forward isSecret so the property is
preserved end-to-end.

131-133: ⚠️ Potential issue | 🟠 Major

Add request timeouts for Supabase API calls to prevent hanging builds.

All three Supabase fetch calls run without abort/timeout control, so stalled sockets can block the extension indefinitely.

Proposed fix
+const SUPABASE_API_TIMEOUT_MS = 10_000;
+
+async function fetchWithTimeout(url: string, init: RequestInit): Promise<Response> {
+  const controller = new AbortController();
+  const timeout = setTimeout(() => controller.abort(), SUPABASE_API_TIMEOUT_MS);
+  try {
+    return await fetch(url, { ...init, signal: controller.signal });
+  } finally {
+    clearTimeout(timeout);
+  }
+}
@@
-    const [branchesFetchError, branchesResponse] = await tryCatch(
-      fetch(branchesUrl, { headers })
-    );
+    const [branchesFetchError, branchesResponse] = await tryCatch(
+      fetchWithTimeout(branchesUrl, { headers })
+    );
@@
-    const [detailFetchError, branchDetailResponse] = await tryCatch(
-      fetch(branchDetailUrl, { headers })
-    );
+    const [detailFetchError, branchDetailResponse] = await tryCatch(
+      fetchWithTimeout(branchDetailUrl, { headers })
+    );
@@
-    const [apiKeysFetchError, apiKeysResponse] = await tryCatch(
-      fetch(apiKeysUrl, { headers })
-    );
+    const [apiKeysFetchError, apiKeysResponse] = await tryCatch(
+      fetchWithTimeout(apiKeysUrl, { headers })
+    );

Also applies to: 188-190, 216-218

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/build/src/extensions/core/syncSupabaseEnvVars.ts` around lines 131 -
133, The three Supabase fetch calls (e.g., the call wrapped by tryCatch that
assigns branchesFetchError/branchesResponse from fetch(branchesUrl, { headers
})) lack timeout/abort control and can hang; update each fetch (branches,
projects, variables) to use an AbortController and pass its signal to fetch, and
implement a short timeout (setTimeout that calls controller.abort()) to ensure
the request is aborted on timeout; keep using tryCatch for error handling and
ensure the abort error is handled/logged like other fetch errors so stalled
sockets cannot block the extension.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/build/src/extensions/core/syncSupabaseEnvVars.ts`:
- Line 5: The EnvVar type and creation flow currently lack an isSecret flag:
update the EnvVar definition to include isSecret?: boolean and when
constructing/pushing to newEnvVars (the place that builds the list of env vars
in syncSupabaseEnvVars.ts) set isSecret: true for sensitive keys DATABASE_URL,
POSTGRES_URL, SUPABASE_DB_URL, PGPASSWORD, SUPABASE_JWT_SECRET, and
SUPABASE_SERVICE_ROLE_KEY; also update the SyncEnvVarsBody type/signature and
any downstream handlers to accept and forward isSecret so the property is
preserved end-to-end.
- Around line 131-133: The three Supabase fetch calls (e.g., the call wrapped by
tryCatch that assigns branchesFetchError/branchesResponse from
fetch(branchesUrl, { headers })) lack timeout/abort control and can hang; update
each fetch (branches, projects, variables) to use an AbortController and pass
its signal to fetch, and implement a short timeout (setTimeout that calls
controller.abort()) to ensure the request is aborted on timeout; keep using
tryCatch for error handling and ensure the abort error is handled/logged like
other fetch errors so stalled sockets cannot block the extension.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d1b93a and d8d8729.

📒 Files selected for processing (7)
  • .changeset/warm-falcons-joke.md
  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
  • docs/config/extensions/overview.mdx
  • docs/config/extensions/syncEnvVars.mdx
  • docs/vercel-integration.mdx
  • packages/build/src/extensions/core.ts
  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/config/extensions/syncEnvVars.mdx
  • docs/config/extensions/overview.mdx
  • apps/webapp/app/components/integrations/VercelOnboardingModal.tsx
📜 Review details
⏰ 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). (20)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • 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 (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: typecheck / typecheck
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{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}: In TypeScript SDK usage, always import from @trigger.dev/sdk, never from @trigger.dev/sdk/v3 or use deprecated client.defineJob
Import from @trigger.dev/core subpaths only, never from the root
Use the Run Engine 2.0 (@internal/run-engine) and redis-worker for all new work, not legacy V1 MarQS queue or deprecated V1 functions

Files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • packages/build/src/extensions/core.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • packages/build/src/extensions/core.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:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • packages/build/src/extensions/core.ts
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier before committing

Files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • packages/build/src/extensions/core.ts
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (CLAUDE.md)

Docs in docs/ directory should use Mintlify MDX format following conventions in docs/CLAUDE.md

Files:

  • docs/vercel-integration.mdx
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Files:

  • docs/vercel-integration.mdx
🧠 Learnings (21)
📓 Common learnings
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 : Use build extensions in trigger.config.ts (additionalFiles, additionalPackages, aptGet, prismaExtension, etc.) to customize the build
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/**/*.{ts,tsx} : Access all environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env` in the Trigger.dev webapp
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.127Z
Learning: Applies to packages/cli-v3/src/build/**/* : Build system in `src/build/` should use configuration from `trigger.config.ts` in user projects to determine bundling, build extensions, and output structure
📚 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 : Use build extensions in trigger.config.ts (additionalFiles, additionalPackages, aptGet, prismaExtension, etc.) to customize the build

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • .changeset/warm-falcons-joke.md
  • packages/build/src/extensions/core.ts
📚 Learning: 2026-03-02T12:42:47.641Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: apps/supervisor/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:42:47.641Z
Learning: Applies to apps/supervisor/src/env.ts : Environment configuration should be defined in `src/env.ts`

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.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/**/*.{ts,tsx} : Access all environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env` in the Trigger.dev webapp

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • .changeset/warm-falcons-joke.md
  • packages/build/src/extensions/core.ts
  • docs/vercel-integration.mdx
📚 Learning: 2026-03-02T12:43:34.127Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.127Z
Learning: Applies to packages/cli-v3/src/build/**/* : Build system in `src/build/` should use configuration from `trigger.config.ts` in user projects to determine bundling, build extensions, and output structure

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • packages/build/src/extensions/core.ts
📚 Learning: 2026-03-02T12:43:34.127Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.127Z
Learning: Applies to packages/cli-v3/src/commands/dev.ts : Implement `dev.ts` command in `src/commands/` for local development mode

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
📚 Learning: 2026-03-02T12:43:34.127Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.127Z
Learning: Applies to packages/cli-v3/src/dev/**/* : Dev mode code should be located in `src/dev/` and runs tasks locally in the user's Node.js process without containers

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
📚 Learning: 2025-08-19T09:49:07.011Z
Learnt from: julienvanbeveren
Repo: triggerdotdev/trigger.dev PR: 2417
File: apps/webapp/app/routes/api.v1.projects.$projectRef.envvars.$slug.import.ts:56-61
Timestamp: 2025-08-19T09:49:07.011Z
Learning: In the Trigger.dev codebase, environment variables should default to `isSecret: false` when not explicitly marked as secrets in the syncEnvVars functionality. This is the intended behavior for both regular variables and parent variables.

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • .changeset/warm-falcons-joke.md
  • docs/vercel-integration.mdx
📚 Learning: 2025-08-14T18:35:44.370Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2390
File: apps/webapp/app/env.server.ts:764-765
Timestamp: 2025-08-14T18:35:44.370Z
Learning: The BoolEnv helper in apps/webapp/app/utils/boolEnv.ts uses z.preprocess with inconsistent default value types across the codebase - some usages pass boolean defaults (correct) while others pass string defaults (incorrect), leading to type confusion. The helper should enforce boolean-only defaults or have clearer documentation.

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
📚 Learning: 2025-06-06T23:55:01.933Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2155
File: hosting/docker/.env.example:4-7
Timestamp: 2025-06-06T23:55:01.933Z
Learning: In the trigger.dev project, .env.example files should contain actual example secret values rather than placeholders, as these help users understand the expected format. The files include clear warnings about not using these defaults in production and instructions for generating proper secrets.

Applied to files:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
📚 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:

  • packages/build/src/extensions/core/syncSupabaseEnvVars.ts
  • packages/build/src/extensions/core.ts
📚 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: Run `npx trigger.devlatest dev` to start the Trigger.dev development server

Applied to files:

  • .changeset/warm-falcons-joke.md
📚 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: Run `npx trigger.devlatest init` to initialize a Trigger.dev project

Applied to files:

  • .changeset/warm-falcons-joke.md
📚 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:

  • packages/build/src/extensions/core.ts
📚 Learning: 2026-03-02T12:42:41.093Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-02T12:42:41.093Z
Learning: Applies to packages/**/*.{ts,tsx,js},integrations/**/*.{ts,tsx,js} : When modifying public packages (packages/* or integrations/*), add a changeset via pnpm run changeset:add

Applied to files:

  • packages/build/src/extensions/core.ts
📚 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} : Export tasks with unique IDs within the project to enable proper task discovery and execution

Applied to files:

  • packages/build/src/extensions/core.ts
📚 Learning: 2026-03-02T12:43:48.114Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:48.114Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx,js,jsx} : Always import from `trigger.dev/sdk`. Never use `trigger.dev/sdk/v3` (deprecated path alias)

Applied to files:

  • packages/build/src/extensions/core.ts
📚 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} : Export every task, including subtasks

Applied to files:

  • packages/build/src/extensions/core.ts
📚 Learning: 2026-03-02T12:43:37.897Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/core/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:37.897Z
Learning: Applies to packages/core/**/*.{ts,tsx,js,jsx} : Never import the root package (trigger.dev/core). Always use subpath imports such as trigger.dev/core/v3, trigger.dev/core/v3/utils, trigger.dev/core/logger, or trigger.dev/core/schemas

Applied to files:

  • packages/build/src/extensions/core.ts
📚 Learning: 2026-03-02T12:42:41.093Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-02T12:42:41.093Z
Learning: Applies to **/*.{ts,tsx} : Import from trigger.dev/core subpaths only, never from the root

Applied to files:

  • packages/build/src/extensions/core.ts
📚 Learning: 2026-03-02T12:42:56.102Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: apps/webapp/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:42:56.102Z
Learning: Applies to apps/webapp/**/*.server.ts : Access environment variables via the `env` export from `app/env.server.ts`, never use `process.env` directly

Applied to files:

  • packages/build/src/extensions/core.ts
🧬 Code graph analysis (1)
packages/build/src/extensions/core/syncSupabaseEnvVars.ts (2)
packages/core/src/v3/build/extensions.ts (1)
  • BuildExtension (14-22)
packages/build/src/extensions/core/syncEnvVars.ts (1)
  • syncEnvVars (77-127)
🔇 Additional comments (3)
packages/build/src/extensions/core.ts (1)

8-8: Re-export is clean and consistent with the core extension surface.

.changeset/warm-falcons-joke.md (1)

1-5: Changeset entry is correctly scoped and versioned (patch) for @trigger.dev/build.

docs/vercel-integration.mdx (1)

107-109: Great docs addition—this guidance clearly directs users to build extensions for branch-specific DB credentials.

… mark staging ("stg") as disabled in the Vercel build settings UIwhen a custom Vercel staging environment is not mapped, and ensure UI state andserver defaults stay consistent.

- Introduce disabledEnvSlugsForBuildSettings to signal which env slugs should be forced off and show a tooltip explaining why.
- Pass disabledEnvSlugs into BuildSettingsFields and render tooltips for disabled slugs; compute enabled slugs for selections.
- When clearing the staging mapping, strip "stg" out of pullEnvVarsBeforeBuild and discoverEnvVars in config state to avoid leaving invalid selections.
- Update server-side default config to remove "stg" from pull/discover lists.
- Use wrapVercelCallWithRecovery and pass validation/recovery helpers when updating the Vercel project to better surface and convert API errors.

This prevents users from enabling staging build options unless a stagingenvironment is explicitly mapped, avoiding misconfigured builds.
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