-
-
Notifications
You must be signed in to change notification settings - Fork 891
chore(webapp): fix @trigger.dev/database imports so it doesn't end up in the frontend bundle #2452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… in the frontend bundle
|
WalkthroughThe PR standardizes TypeScript imports by converting multiple value imports to type-only imports across components and routes (e.g., User, Prisma, TaskRunStatus, BatchTaskRunStatus, WorkerDeploymentStatus, RuntimeEnvironmentType, ProjectAlert types). Several unused imports are removed. In bulk action-related routes and stream handlers, enum references (BulkActionStatus, BulkActionType) are replaced with string literal comparisons ("PENDING", "CANCEL", "REPLAY"), updating related conditionals and switch cases. No exported/public API signatures change, and no runtime control flow is altered outside of the enum-to-string comparison adjustments. Estimated code review effortMostly homogeneous type-only import refactors and unused import removals, with minor logic adjustments where enums were swapped for string literals in a few files. Limited surface area for behavioral changes and low logic density. 🎯 2 (Simple) | ⏱️ ~12 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/webapp/app/components/BulkActionFilterSummary.tsx (1)
1-68: Remove all value imports from ‘@trigger.dev/database’ in apps/webapp
The guardrail script found prohibited value imports in numerous files (e.g. app/db.server.ts, app/hooks/useEnvironmentSwitcher.ts, app/models/orgIntegration.server.ts, etc.). Convert these to type-only imports (import type { … }) or move any runtime database logic into server-only modules. Enforce automatically with an ESLint rule such as@typescript-eslint/consistent-type-imports.
🧹 Nitpick comments (2)
apps/webapp/app/components/runs/v3/DeploymentStatus.tsx (1)
122-122: Typo in comment: “ommited” → “omitted”Minor polish.
-// PENDING and CANCELED are not used so are ommited from the UI +// PENDING and CANCELED are not used so are omitted from the UIapps/webapp/app/components/runs/v3/TaskTriggerSource.tsx (1)
13-22: Make switch exhaustive to future-proof against new sources.Add a
defaultarm with aneverexhaustiveness check to fail fast at compile time if a newTaskTriggerSourceis introduced.export function TaskTriggerSourceIcon({ source, className, }: { source: TaskTriggerSource; className?: string; }) { switch (source) { case "STANDARD": { return <TaskIconSmall className="size-[1.125rem] min-w-[1.125rem] text-tasks" />; } case "SCHEDULED": { return ( <ClockIcon className={cn("size-[1.125rem] min-w-[1.125rem] text-schedules", className)} /> ); } + default: { + const _exhaustive: never = source; + return null; + } } } export function taskTriggerSourceDescription(source: TaskTriggerSource) { switch (source) { case "STANDARD": { return "Standard task"; } case "SCHEDULED": { return "Scheduled task"; } + default: { + const _exhaustive: never = source; + return "Task"; + } } }Also applies to: 25-34
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (16)
apps/webapp/app/components/BulkActionFilterSummary.tsx(1 hunks)apps/webapp/app/components/navigation/AccountSideMenu.tsx(1 hunks)apps/webapp/app/components/primitives/Avatar.tsx(1 hunks)apps/webapp/app/components/runs/v3/BatchStatus.tsx(1 hunks)apps/webapp/app/components/runs/v3/BulkAction.tsx(1 hunks)apps/webapp/app/components/runs/v3/DeploymentStatus.tsx(1 hunks)apps/webapp/app/components/runs/v3/ScheduleFilters.tsx(0 hunks)apps/webapp/app/components/runs/v3/TaskRunStatus.tsx(1 hunks)apps/webapp/app/components/runs/v3/TaskTriggerSource.tsx(1 hunks)apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsx(1 hunks)apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts/route.tsx(1 hunks)apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.bulk-actions.$bulkActionParam/route.tsx(5 hunks)apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsx(1 hunks)apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx(1 hunks)apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.$bulkActionParam.stream.tsx(3 hunks)apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.tsx(2 hunks)
💤 Files with no reviewable changes (1)
- apps/webapp/app/components/runs/v3/ScheduleFilters.tsx
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Always prefer using isomorphic code like fetch, ReadableStream, etc. instead of Node.js specific code
For TypeScript, we usually use types over interfaces
Avoid enums
No default exports, use function declarations
Files:
apps/webapp/app/components/BulkActionFilterSummary.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsxapps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.tsxapps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.$bulkActionParam.stream.tsxapps/webapp/app/components/primitives/Avatar.tsxapps/webapp/app/components/runs/v3/DeploymentStatus.tsxapps/webapp/app/components/runs/v3/BatchStatus.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts/route.tsxapps/webapp/app/components/runs/v3/BulkAction.tsxapps/webapp/app/components/runs/v3/TaskRunStatus.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsxapps/webapp/app/components/navigation/AccountSideMenu.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.bulk-actions.$bulkActionParam/route.tsx
{packages/core,apps/webapp}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
We use zod a lot in packages/core and in the webapp
Files:
apps/webapp/app/components/BulkActionFilterSummary.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsxapps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.tsxapps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.$bulkActionParam.stream.tsxapps/webapp/app/components/primitives/Avatar.tsxapps/webapp/app/components/runs/v3/DeploymentStatus.tsxapps/webapp/app/components/runs/v3/BatchStatus.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts/route.tsxapps/webapp/app/components/runs/v3/BulkAction.tsxapps/webapp/app/components/runs/v3/TaskRunStatus.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsxapps/webapp/app/components/navigation/AccountSideMenu.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.bulk-actions.$bulkActionParam/route.tsx
apps/webapp/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
apps/webapp/**/*.{ts,tsx}: In the webapp, all environment variables must be accessed through theenvexport ofenv.server.ts, instead of directly accessingprocess.env.
When importing from@trigger.dev/corein the webapp, never import from the root@trigger.dev/corepath; always use one of the subpath exports as defined in the package's package.json.
Files:
apps/webapp/app/components/BulkActionFilterSummary.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsxapps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.tsxapps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.$bulkActionParam.stream.tsxapps/webapp/app/components/primitives/Avatar.tsxapps/webapp/app/components/runs/v3/DeploymentStatus.tsxapps/webapp/app/components/runs/v3/BatchStatus.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts/route.tsxapps/webapp/app/components/runs/v3/BulkAction.tsxapps/webapp/app/components/runs/v3/TaskRunStatus.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsxapps/webapp/app/components/navigation/AccountSideMenu.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.bulk-actions.$bulkActionParam/route.tsx
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-07-18T17:49:47.180Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from `trigger.dev/core` in the webapp, never import from the root `trigger.dev/core` path; always use one of the subpath exports as defined in the package's package.json.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-07-18T17:49:24.468Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : We use prisma in internal-packages/database for our database interactions using PostgreSQL
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Define tasks using task({ id, run, ... }) with a unique id per project
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsx
📚 Learning: 2025-07-18T17:49:47.180Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-07-18T17:49:47.180Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from `trigger.dev/core` in the webapp, never import from the root `trigger.dev/core` path; always use one of the subpath exports as defined in the package's package.json.
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts/route.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Import Trigger.dev APIs from "trigger.dev/sdk/v3" when writing tasks or related utilities
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsxapps/webapp/app/components/runs/v3/TaskRunStatus.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsxapps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Do not use client.defineJob or any deprecated v2 patterns (e.g., eventTrigger) when defining tasks
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export every task (including subtasks) defined with task(), schedules.task(), or schemaTask()
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsx
📚 Learning: 2025-07-18T17:49:24.468Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-07-18T17:49:24.468Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : We use prisma in internal-packages/database for our database interactions using PostgreSQL
Applied to files:
apps/webapp/app/components/primitives/Avatar.tsx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: When triggering tasks from backend code, prefer tasks.trigger/tasks.batchTrigger/batch.trigger with type-only imports for type safety
Applied to files:
apps/webapp/app/components/runs/v3/BatchStatus.tsxapps/webapp/app/components/runs/v3/TaskTriggerSource.tsx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use schedules.task(...) for scheduled (cron) tasks; do not implement schedules as plain task() with external cron logic
Applied to files:
apps/webapp/app/components/runs/v3/TaskTriggerSource.tsx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use schemaTask({ schema, run, ... }) to validate payloads when input validation is required
Applied to files:
apps/webapp/app/components/runs/v3/TaskTriggerSource.tsx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use triggerAndWait() only from within a task context (not from generic app code) and handle result.ok or use unwrap() with error handling
Applied to files:
apps/webapp/app/components/runs/v3/TaskTriggerSource.tsx
📚 Learning: 2025-08-18T10:07:17.368Z
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-08-18T10:07:17.368Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use metadata API (metadata.current/get/set/append/stream, etc.) only inside run functions or lifecycle hooks
Applied to files:
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx
⏰ 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). (23)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 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 (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: typecheck / typecheck
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (23)
apps/webapp/app/components/BulkActionFilterSummary.tsx (1)
17-17: Type-only import prevents bundling @trigger.dev/database — LGTMThis aligns with the PR goal; no runtime value pulled into the client.
apps/webapp/app/components/primitives/Avatar.tsx (1)
9-9: Good switch to type-only Prisma importparseAvatar only needs Prisma.JsonValue as a type; this keeps DB code out of the client bundle.
apps/webapp/app/components/runs/v3/DeploymentStatus.tsx (1)
7-7: Type-only import for WorkerDeploymentStatus — LGTMNo runtime dependency; comparisons use string literals, matching our “avoid enums” guideline.
apps/webapp/app/components/navigation/AccountSideMenu.tsx (1)
3-3: Type-only User import — LGTMProp types only; no runtime import pulled into the client.
apps/webapp/app/components/runs/v3/BulkAction.tsx (1)
2-2: Type-only imports for BulkAction types — LGTMSwitch/case remains on string literals; no runtime DB enum usage.
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx (1)
23-23: Scope verification to client-side code
Adjust the repo-wide check to only scan client bundles (e.g.apps/webapp/app/routes/**/*.tsxandapps/webapp/app/components/**/*.tsx) or explicitly exclude server-only files (**/*.server.ts,app/services/**,app/models/**), then confirm there are zero non-type imports from@trigger.dev/databasein those client files.apps/webapp/app/components/runs/v3/TaskTriggerSource.tsx (1)
2-2: Good: switched toimport typeto keep DB package out of the client bundle.apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam._index/route.tsx (1)
17-17: Good:TaskRunStatusis now a type-only import.Used purely for typing in
CustomTooltip, so this reduces client bundle surface without runtime changes.apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsx (1)
20-20: Good:RuntimeEnvironmentTypeswitched to a type import.It’s only used in props for
EnvironmentPauseResumeButton, so no runtime dependency on the DB package.apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts/route.tsx (1)
16-16: Good:ProjectAlertChannelTypeandProjectAlertTypeas type-only imports.Matches the PR objective and keeps DB out of the client. The file already uses runtime-safe string literals and
assert-neverfor exhaustiveness.apps/webapp/app/components/runs/v3/TaskRunStatus.tsx (2)
14-14: Type-only import aligns with PR goal (prevents bundling).
Looks good and keeps @trigger.dev/database out of the client bundle.
14-14: Remove non-type @trigger.dev/database imports, replace root @trigger.dev/core imports with subpaths, and convert enum usages to literals
- Prefix all imports from "@trigger.dev/database" with
type(e.g. changeimport { TaskRun }toimport type { TaskRun }) – currently ~80 non-type imports across apps/webapp (see grep output).- Swap all
import { … } from "@trigger.dev/core"to the package’s subpath exports (e.g.@trigger.dev/core/tryCatch).- In app/v3/services/bulk/BulkActionV2.server.ts, replace every
BulkActionStatus.*andBulkActionType.*occurrence with its string literal equivalent.⛔ Skipped due to learnings
Learnt from: CR PR: triggerdotdev/trigger.dev#0 File: .cursor/rules/webapp.mdc:0-0 Timestamp: 2025-07-18T17:49:47.180Z Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from `trigger.dev/core` in the webapp, never import from the root `trigger.dev/core` path; always use one of the subpath exports as defined in the package's package.json.Learnt from: CR PR: triggerdotdev/trigger.dev#0 File: .cursor/rules/writing-tasks.mdc:0-0 Timestamp: 2025-08-18T10:07:17.368Z Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Import Trigger.dev APIs from "trigger.dev/sdk/v3" when writing tasks or related utilitiesLearnt from: CR PR: triggerdotdev/trigger.dev#0 File: .cursor/rules/writing-tasks.mdc:0-0 Timestamp: 2025-08-18T10:07:17.368Z Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Do not use client.defineJob or any deprecated v2 patterns (e.g., eventTrigger) when defining tasksLearnt from: CR PR: triggerdotdev/trigger.dev#0 File: .cursor/rules/writing-tasks.mdc:0-0 Timestamp: 2025-08-18T10:07:17.368Z Learning: When triggering tasks from backend code, prefer tasks.trigger/tasks.batchTrigger/batch.trigger with type-only imports for type safetyLearnt from: CR PR: triggerdotdev/trigger.dev#0 File: .cursor/rules/writing-tasks.mdc:0-0 Timestamp: 2025-08-18T10:07:17.368Z Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Define tasks using task({ id, run, ... }) with a unique id per projectapps/webapp/app/components/runs/v3/BatchStatus.tsx (1)
2-2: Good: type-only import eliminates runtime dependency.
Keeps database package out of the client bundle.apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.bulk-actions.$bulkActionParam/route.tsx (5)
5-5: Type-only BulkActionType import is correct.
Prevents pulling @trigger.dev/database into the bundle.
242-242: Correct mapping to UI action prop.
Lowercasing derived from type is consistent with BulkActionFilterSummary API.
330-331: Copy check: suffix for CANCEL failures.
Verify this matches product wording (“already finished”) and appears only for CANCEL.
340-344: Switch on string literals is fine.
Reads cleanly after removing runtime enum; no issues.
138-146: BulkActionStatus string literal matches DB enum
Confirmed that theBulkActionStatusenum inschema.prismais defined with uppercase values (PENDING,COMPLETED,ABORTED), so comparingbulkAction.status !== "PENDING"is correct. No changes needed.apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.$bulkActionParam.stream.tsx (3)
6-6: Import cleanup LGTM.
Limiting to EnvironmentParamSchema keeps the module lean.
83-85: OK: status gating uses string literal "PENDING".
Matches the route page logic.
92-94: OK: iterator early-exit mirrors init condition.
Consistent with the string-literal migration.apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.bulkaction.tsx (2)
2-2: Import change is fine.
No behavioral impact.
43-43: Good: type-only import for TaskRunListSearchFilters.
Prevents bundling unused runtime from the filters module.
No description provided.