-
-
Notifications
You must be signed in to change notification settings - Fork 772
Restructured the realtime docs #2317
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
base: main
Are you sure you want to change the base?
Conversation
|
WalkthroughThis update substantially restructures the documentation for the Trigger.dev Realtime API. The navigation is reorganized, consolidating and renaming sections such as "Frontend usage" to "Realtime," and introducing new subgroups for React hooks and backend usage. Several documentation files are added, including detailed guides for authentication, backend API usage, the run object schema, and React hooks for subscribing to real-time updates, streams, and SWR data fetching. Numerous files are deleted or replaced to remove outdated or redundant content, with detailed examples and code samples moved or revised. Many internal and external links are updated to reflect the new structure, and URL redirects are adjusted to maintain navigation continuity. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15–25 minutes
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ 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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
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
🔭 Outside diff range comments (1)
docs/realtime/react-hooks/triggering.mdx (1)
80-93
: Early return short-circuits realtime updatesThe
if (handle) { return … }
block renders immediately after a task is triggered, preventing the component from ever reaching the realtime subscription branch whererun
is updated. A minimal re-ordering keeps the UI responsive while still showing progress.- if (handle) { - return <div>Run ID: {handle.id}</div>; - } - - if (realtimeError) { + if (realtimeError) { return <div>Error: {realtimeError.message}</div>; } - if (run) { - return <div>Run ID: {run.id}</div>; - } + if (run) { + return <div>Run ID: {run.id}</div>; + } + + if (handle) { + return <div>Run ID: {handle.id}</div>; + }
🧹 Nitpick comments (15)
docs/realtime/react-hooks/triggering.mdx (1)
189-189
: Drop the stray{" "}
The added JSX fragment renders an unnecessary space and clutters the markup.
-<RealtimeExamplesCards />{" "} +<RealtimeExamplesCards />docs/realtime/react-hooks/swr.mdx (1)
36-44
: Add'use client';
to the typed example for consistencyThe first example includes the directive but the typed version does not. Including it avoids confusion for readers using the Next.js App Router.
+"use client"; import { useRun } from "@trigger.dev/react-hooks"; import type { myTask } from "@/trigger/myTask";
docs/realtime/react-hooks/overview.mdx (1)
25-27
: Correct Yarn install command
yarn add
is the canonical way to add a dependency;yarn install
installs all existing deps.-```bash yarn -yarn install @trigger.dev/react-hooks +```bash yarn +yarn add @trigger.dev/react-hooksdocs/realtime/backend/subscribe.mdx (1)
31-37
: Show a clean exit strategy for infinite iterators
subscribeToRunsWithTag
never completes, but the example omits a break mechanism. Demonstrating anAbortController
or manualbreak
makes the pattern production-ready and prevents runaway loops.docs/realtime/backend/metadata.mdx (2)
11-15
: Broken anchor in link – update target path
/realtime/react-hooks/realtime#using-metadata
doesn’t exist after the restructure (the page was renamed to/realtime/react-hooks/realtime
and the heading became## Using metadata
). Either drop the#using-metadata
fragment or confirm the section id still resolves.
222-223
: Extraneous JSX fragment
{" "}
after theRealtimeExamplesCards
component renders an empty text node and is unnecessary.-<RealtimeExamplesCards />{" "} +<RealtimeExamplesCards />docs/realtime/run-object.mdx (1)
55-60
: Typo in enum description
it's maxDuration
→its maxDuration
.-| `TIMED_OUT` | Run has reached it's maxDuration and has been stopped | +| `TIMED_OUT` | Run has reached its maxDuration and has been stopped |docs/realtime/react-hooks/streams.mdx (1)
225-226
: Superfluous spacing nodeSame JSX fragment issue as in the backend metadata doc.
-<RealtimeExamplesCards />{" "} +<RealtimeExamplesCards />docs/realtime/overview.mdx (1)
9-10
: Minor grammar fix
allows you subscribe to runs
→allows you to subscribe to runs
.-Trigger.dev Realtime allows you subscribe to runs and get real-time updates as they execute. +Trigger.dev Realtime allows you to subscribe to runs and get real-time updates as they execute.docs/realtime/how-it-works.mdx (2)
47-66
: Clarify generic-union syntax to avoid TypeScript parsing edge-casesThe union passed to
subscribeToRunsWithTag
is technically valid but can confuse the TS parser or ESLint rules because the|
has very low precedence inside a type argument list. Adding parentheses improves readability and eliminates any ambiguity.-for await (const run of runs.subscribeToRunsWithTag<typeof myTask | typeof myOtherTask>("my-tag")) { +for await (const run of runs.subscribeToRunsWithTag<(typeof myTask | typeof myOtherTask)>("my-tag")) {
89-92
: Nit: tighten wording of the known-issue disclaimer“are stored in object store” → “are stored in object storage” reads more naturally.
-... that has a large payload or large output and are stored in object store instead of the database. +... that has a large payload or output stored in object storage instead of the database.docs/realtime/react-hooks/realtime.mdx (2)
180-184
: Grammar fix – drop the extra article-The `useRealtimeBatch` hook allows you to subscribe to a batch of runs by its the batch ID. +The `useRealtimeBatch` hook allows you to subscribe to a batch of runs by its batch ID.
598-604
: Minor readability improvementThere is a stray leading space after
<RealtimeExamplesCards />
causing{" "}
to be rendered in MDX/JSX output. Removing it avoids an empty text node.-<RealtimeExamplesCards />{" "} +<RealtimeExamplesCards />docs/realtime/auth.mdx (1)
18-34
: Call out security best-practice for “no-scope” token exampleThe first example creates a token with zero scopes. Consider adding a one-line warning so readers do not mistakenly ship a useless (or worse, later broadened) token to production.
-const publicToken = await auth.createPublicToken(); // 👈 this public access token has no permissions, so is pretty useless! +// ⚠️ Creates a token with **no** permissions – useful only for demonstration. +const publicToken = await auth.createPublicToken();docs/realtime/backend/streams.mdx (1)
124-129
: Node-compatibility footnote forTextDecoderStream
TextDecoderStream
is available only in Node ≥ 20 or in browsers. If users run tasks on older Node versions they will hit a runtimeReferenceError
. A short note here (or in prerequisites) will prevent surprises.Suggestion:
> **Note** > `TextDecoderStream` requires Node 20+ or a global polyfill when running in earlier environments.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (20)
docs/docs.json
(2 hunks)docs/frontend/react-hooks/overview.mdx
(0 hunks)docs/frontend/react-hooks/realtime.mdx
(0 hunks)docs/realtime/auth.mdx
(3 hunks)docs/realtime/backend/metadata.mdx
(1 hunks)docs/realtime/backend/overview.mdx
(1 hunks)docs/realtime/backend/streams.mdx
(13 hunks)docs/realtime/backend/subscribe.mdx
(1 hunks)docs/realtime/how-it-works.mdx
(1 hunks)docs/realtime/overview.mdx
(1 hunks)docs/realtime/react-hooks.mdx
(0 hunks)docs/realtime/react-hooks/overview.mdx
(1 hunks)docs/realtime/react-hooks/realtime.mdx
(1 hunks)docs/realtime/react-hooks/streams.mdx
(1 hunks)docs/realtime/react-hooks/swr.mdx
(1 hunks)docs/realtime/react-hooks/triggering.mdx
(2 hunks)docs/realtime/run-object.mdx
(1 hunks)docs/realtime/subscribe-to-batch.mdx
(0 hunks)docs/realtime/subscribe-to-run.mdx
(0 hunks)docs/realtime/subscribe-to-runs-with-tag.mdx
(0 hunks)
💤 Files with no reviewable changes (6)
- docs/realtime/react-hooks.mdx
- docs/realtime/subscribe-to-runs-with-tag.mdx
- docs/realtime/subscribe-to-run.mdx
- docs/realtime/subscribe-to-batch.mdx
- docs/frontend/react-hooks/realtime.mdx
- docs/frontend/react-hooks/overview.mdx
⏰ 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: Analyze (javascript-typescript)
🔇 Additional comments (3)
docs/realtime/react-hooks/triggering.mdx (1)
65-65
: Verify that the anchor slug actually resolves
#userealtimerun
may not match the slug generated by Docusaurus/MDX (typically lower-case words separated by dashes, i.e.#use-realtime-run
). A broken link here will silently 404.docs/realtime/backend/overview.mdx (1)
47-58
: Double-check SDK callmetadata.stream
The snippet uses
metadata.stream("openai", openaiCompletion)
, but the public v3 SDK examples usually expose streaming throughstreams.*
helpers, notmetadata
. Ifmetadata.stream
is indeed correct, ignore this; otherwise update to avoid confusing readers.docs/docs.json (1)
575-581
: Redirect may point to an auth overview rather than to the React-hooks landing
"/frontend/overview"
is redirected to"/realtime/auth"
.
If the intent was to send users to the new Realtime landing page, use"/realtime/overview"
instead; otherwise verify the old page really belonged to authentication docs.
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: 0
🧹 Nitpick comments (4)
docs/realtime/auth.mdx (4)
2-4
: Unify “Realtime” vs “Real-time” terminologyAcross the docs we switch between “Realtime” (no hyphen) and “real-time” (hyphenated). Pick one spelling and stick to it in titles, sidebar entries, and body copy to avoid confusing users and to keep navigation search-friendly.
13-17
: Wrap top-levelawait
in an async contextThe snippet uses
await
at module top level, which only works in ESM contexts and can throw readers off. Wrapping the call in anasync
IIFE makes the example copy-paste-safe in both CJS and ESM projects.-import { auth } from "@trigger.dev/sdk/v3"; - -const publicToken = await auth.createPublicToken(); +import { auth } from "@trigger.dev/sdk/v3"; + +(async () => { + const publicToken = await auth.createPublicToken(); + // … +})();
106-123
: Minor grammar + possessive fixLine 108: “Public Access Token's expire” → “Public Access Tokens expire”.
While touching this paragraph, consider trimming the long sentence that enumeratesjose
units into a bullet list for easier scanning.
221-225
: Call out Node version requirement forfor await…of
for await…of
on an async iterator requires Node 10+ and an ES2018 target. Adding a short note (“Requires Node 10+ / modern browsers”) prevents confusion for readers on older runtimes.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
docs/guides/example-projects/batch-llm-evaluator.mdx
(1 hunks)docs/guides/example-projects/human-in-the-loop-workflow.mdx
(1 hunks)docs/guides/example-projects/vercel-ai-sdk-deep-research.mdx
(1 hunks)docs/guides/example-projects/vercel-ai-sdk-image-generator.mdx
(2 hunks)docs/introduction.mdx
(5 hunks)docs/management/authentication.mdx
(2 hunks)docs/realtime/auth.mdx
(3 hunks)docs/runs/metadata.mdx
(1 hunks)docs/snippets/realtime-learn-more.mdx
(1 hunks)docs/triggering.mdx
(1 hunks)docs/video-walkthrough.mdx
(1 hunks)docs/wait-for-token.mdx
(1 hunks)
✅ Files skipped from review due to trivial changes (11)
- docs/guides/example-projects/vercel-ai-sdk-image-generator.mdx
- docs/triggering.mdx
- docs/guides/example-projects/human-in-the-loop-workflow.mdx
- docs/runs/metadata.mdx
- docs/guides/example-projects/vercel-ai-sdk-deep-research.mdx
- docs/wait-for-token.mdx
- docs/video-walkthrough.mdx
- docs/snippets/realtime-learn-more.mdx
- docs/management/authentication.mdx
- docs/introduction.mdx
- docs/guides/example-projects/batch-llm-evaluator.mdx
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing schema tasks, use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : NEVER generate deprecated code patterns using `client.defineJob` and related deprecated APIs, as shown in the prohibited code block.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function contains your task logic in Trigger.dev tasks.
docs/realtime/auth.mdx (11)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : When using Realtime features, use the runs.subscribeToRun
, runs.subscribeToRunsWithTag
, and runs.subscribeToBatch
APIs as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : You MUST use @trigger.dev/sdk/v3
when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : When triggering a task from backend code, use tasks.trigger
, tasks.batchTrigger
, or tasks.triggerAndPoll
as shown in the examples.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : When implementing schema tasks, use schemaTask
from @trigger.dev/sdk/v3
and validate payloads as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use schedules.task
from @trigger.dev/sdk/v3
and follow the shown patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : When using lifecycle hooks (init
, cleanup
, onStart
, onSuccess
, onFailure
, handleError
), implement them as shown in the examples for Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the task
function from @trigger.dev/sdk/v3
and export them as shown in the correct pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : When using idempotency, use the idempotencyKeys
API and idempotencyKey
/idempotencyKeyTTL
options as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : The run
function contains your task logic in Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : When using metadata in tasks, use the metadata
API as shown, and only inside run functions or task lifecycle hooks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to /trigger//*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use yourTask.trigger
, yourTask.batchTrigger
, yourTask.triggerAndWait
, yourTask.batchTriggerAndWait
, batch.triggerAndWait
, batch.triggerByTask
, or batch.triggerByTaskAndWait
as shown.
⏰ 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: Analyze (javascript-typescript)
🔇 Additional comments (1)
docs/realtime/auth.mdx (1)
139-152
: Verifytasks.trigger
parameter orderingThe example passes four positional arguments:
tasks.trigger("my-task", payload, { tags }, { publicAccessToken: { … } })Current SDK (
@trigger.dev/sdk/v3
) exposestasks.trigger(taskId, payload, options?)
, whereoptions
already contains bothtags
andpublicAccessToken
. If that’s still the case, the snippet will not compile.Please cross-check the live signature and update the example (or mention the breaking change) before publishing.
I think this issue is fixed now and can be removed: https://trigger-docs-realtime-docs-updates.mintlify.app/realtime/how-it-works#known-issues |
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: 0
🧹 Nitpick comments (6)
docs/realtime/auth.mdx (3)
13-15
: Bullet sentences need a subject for correctnessEach bullet starts with a verb but is missing a subject, triggering style-check warnings.
Rewrite to include a subject and merge the follow-up sentence for clarity.-- **[Public Access Tokens](#public-access-tokens-for-subscribing-to-runs)** - Used to read and subscribe to run data. Can be used in both the frontend and backend. -- **[Trigger Tokens](#trigger-tokens-for-frontend-triggering-only)** - Used to trigger tasks from your frontend. These are more secure, single-use tokens that can only be used in the frontend. +- **[Public Access Tokens](#public-access-tokens-for-subscribing-to-runs)** – Public tokens let you read and subscribe to run data and can be used in both the frontend and backend. +- **[Trigger Tokens](#trigger-tokens-for-frontend-triggering-only)** – Trigger tokens let the frontend trigger tasks; they are single-use and more secure than public tokens.
24-30
: Top-levelawait
may confuse readers
await
at the top level only works in an ES-module context and inside an async function in most Node setups. Wrapping the call in an async function (or mentioning the requirement) avoids copy-paste friction.-import { auth } from "@trigger.dev/sdk/v3"; - -const publicToken = await auth.createPublicToken(); // 👈 this public access token has no permissions, so is pretty useless! +import { auth } from "@trigger.dev/sdk/v3"; + +async function createToken() { + // No scopes = no permissions (probably not what you want) + const publicToken = await auth.createPublicToken(); + return publicToken; +}
118-123
: Apostrophe misuse in “Token's”Plural noun shouldn’t take the possessive apostrophe.
-By default, Public Access Token's expire after 15 minutes. +By default, Public Access Tokens expire after 15 minutes.docs/realtime/backend/subscribe.mdx (1)
57-58
: Comma splice – split into two clausesThe sentence joins two independent clauses with just a comma.
-The iterator does not complete on its own, you must manually `break` the loop when you want to stop listening for updates. +The iterator does not complete on its own; you must manually `break` the loop when you want to stop listening for updates.docs/realtime/react-hooks/subscribe.mdx (2)
9-11
: Duplicate level-2 headings confuse hierarchyYou have
## Hooks
immediately followed by another##
heading.
Either remove the first heading or downgrade it to###
so navigation isn’t cluttered.
175-176
: Grammar – extraneous word “the”-The `useRealtimeBatch` hook allows you to subscribe to a batch of runs by its the batch ID. +The `useRealtimeBatch` hook allows you to subscribe to a batch of runs by its batch ID.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
docs/docs.json
(2 hunks)docs/realtime/auth.mdx
(1 hunks)docs/realtime/backend/overview.mdx
(1 hunks)docs/realtime/backend/subscribe.mdx
(1 hunks)docs/realtime/how-it-works.mdx
(1 hunks)docs/realtime/overview.mdx
(1 hunks)docs/realtime/react-hooks/overview.mdx
(1 hunks)docs/realtime/react-hooks/streams.mdx
(1 hunks)docs/realtime/react-hooks/subscribe.mdx
(1 hunks)docs/realtime/react-hooks/triggering.mdx
(3 hunks)docs/realtime/run-object.mdx
(1 hunks)docs/snippets/realtime-examples-cards.mdx
(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- docs/snippets/realtime-examples-cards.mdx
- docs/realtime/react-hooks/overview.mdx
- docs/realtime/react-hooks/streams.mdx
- docs/realtime/run-object.mdx
🚧 Files skipped from review as they are similar to previous changes (5)
- docs/docs.json
- docs/realtime/overview.mdx
- docs/realtime/how-it-works.mdx
- docs/realtime/backend/overview.mdx
- docs/realtime/react-hooks/triggering.mdx
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing schema tasks, use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : NEVER generate deprecated code patterns using `client.defineJob` and related deprecated APIs, as shown in the prohibited code block.
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using realtime features, use the `runs.subscribeto...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using metadata in tasks, use the `metadata` api as...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using metadata in tasks, use the `metadata` API as shown, and only inside run functions or task lifecycle hooks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : the `run` function contains your task logic in trigger....
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function contains your task logic in Trigger.dev tasks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from backend code, use `tasks.tr...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from inside another task, use `y...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use `yourTask.trigger`, `yourTask.batchTrigger`, `yourTask.triggerAndWait`, `yourTask.batchTriggerAndWait`, `batch.triggerAndWait`, `batch.triggerByTask`, or `batch.triggerByTaskAndWait` as shown.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when implementing scheduled (cron) tasks, use `schedule...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using retry, queue, machine, or maxduration option...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using lifecycle hooks (`init`, `cleanup`, `onstart...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : you must use `@trigger.dev/sdk/v3` when writing trigger...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when implementing schema tasks, use `schematask` from `...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing schema tasks, use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads as shown.
Applied to files:
docs/realtime/backend/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : always generate trigger.dev tasks using the `task` func...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : you must `export` every task, including subtasks, in tr...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST `export` every task, including subtasks, in Trigger.dev task files.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using idempotency, use the `idempotencykeys` api a...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
docs/realtime/auth.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : each task needs a unique id within your project....
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Each task needs a unique ID within your project.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
🪛 LanguageTool
docs/realtime/auth.mdx
[style] ~13-~13: To form a complete sentence, be sure to include a subject.
Context: ...Used to read and subscribe to run data. Can be used in both the frontend and backen...
(MISSING_IT_THERE)
🔇 Additional comments (1)
docs/realtime/react-hooks/subscribe.mdx (1)
15-17
: Verify anchor targets for combo-hook linksCheck that the headings in
triggering.mdx
actually expose
#userealtimetasktrigger
and#userealtimetasktriggerwithstreams
anchors; if the headings differ (e.g., title-case), these links will 404 in Mintlify.
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: 0
🔭 Outside diff range comments (1)
docs/runs/metadata.mdx (1)
111-114
: Typo: “accept” → “except”Line 113 should read “except for
flush
andstream
” to convey the intended exclusion.-All metadata update methods (accept for `flush` and `stream`) are synchronous +All metadata update methods (except for `flush` and `stream`) are synchronous
🧹 Nitpick comments (2)
docs/realtime/backend/subscribe.mdx (1)
13-20
: Clarify top-levelfor-await
usageThe examples use a top-level
for await … of
loop. That only compiles when:
- the file is treated as an ES2022 module with
moduleResolution
that allows top-level await, or- the snippet is wrapped in an
async
function / IIFE.Explicitly calling that out avoids confusion for users still on CommonJS or earlier TS targets.
docs/runs/metadata.mdx (1)
519-519
: Minor wording simplification“Using metadata updates together with our Realtime React hooks …” is a bit leaner than “in conjunction with” and reads more naturally.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
docs/realtime/backend/subscribe.mdx
(1 hunks)docs/realtime/overview.mdx
(1 hunks)docs/realtime/react-hooks/subscribe.mdx
(1 hunks)docs/runs/metadata.mdx
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/realtime/overview.mdx
- docs/realtime/react-hooks/subscribe.mdx
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing schema tasks, use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : NEVER generate deprecated code patterns using `client.defineJob` and related deprecated APIs, as shown in the prohibited code block.
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using realtime features, use the `runs.subscribeto...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using metadata in tasks, use the `metadata` api as...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using metadata in tasks, use the `metadata` API as shown, and only inside run functions or task lifecycle hooks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : the `run` function contains your task logic in trigger....
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function contains your task logic in Trigger.dev tasks.
Applied to files:
docs/realtime/backend/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from backend code, use `tasks.tr...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from inside another task, use `y...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use `yourTask.trigger`, `yourTask.batchTrigger`, `yourTask.triggerAndWait`, `yourTask.batchTriggerAndWait`, `batch.triggerAndWait`, `batch.triggerByTask`, or `batch.triggerByTaskAndWait` as shown.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when implementing scheduled (cron) tasks, use `schedule...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using lifecycle hooks (`init`, `cleanup`, `onstart...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using retry, queue, machine, or maxduration option...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : you must use `@trigger.dev/sdk/v3` when writing trigger...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : always generate trigger.dev tasks using the `task` func...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Applied to files:
docs/realtime/backend/subscribe.mdx
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : if you are able to generate an example payload for a ta...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : If you are able to generate an example payload for a task, do so.
Applied to files:
docs/runs/metadata.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when implementing schema tasks, use `schematask` from `...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing schema tasks, use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads as shown.
Applied to files:
docs/runs/metadata.mdx
🪛 LanguageTool
docs/runs/metadata.mdx
[style] ~519-~519: ‘in conjunction with’ might be wordy. Consider a shorter alternative.
Context: ...a task examples Using metadata updates in conjunction with our [Realtime React hooks](/realtime/re...
(EN_WORDINESS_PREMIUM_IN_CONJUNCTION_WITH)
⏰ 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: Analyze (javascript-typescript)
🔇 Additional comments (1)
docs/runs/metadata.mdx (1)
267-268
: Verify cross-reference pathThe link now points to the React-hooks-specific page
/realtime/react-hooks/streams
, while a backend-oriented streams doc (/realtime/backend/streams
) also exists. Double-check that this is the intended target for readers of the backend-agnostic metadata page.
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/realtime/backend/overview.mdx
(1 hunks)docs/realtime/overview.mdx
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/realtime/backend/overview.mdx
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing schema tasks, use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : NEVER generate deprecated code patterns using `client.defineJob` and related deprecated APIs, as shown in the prohibited code block.
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using realtime features, use the `runs.subscribeto...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : always generate trigger.dev tasks using the `task` func...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : you must use `@trigger.dev/sdk/v3` when writing trigger...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to trigger.config.ts : global lifecycle hooks, telemetry, runtime, machine settings, log lev...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to trigger.config.ts : Global lifecycle hooks, telemetry, runtime, machine settings, log level, max duration, and build configuration must be set in `trigger.config.ts` as shown.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when implementing scheduled (cron) tasks, use `schedule...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : never generate deprecated code patterns using `client.d...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : NEVER generate deprecated code patterns using `client.defineJob` and related deprecated APIs, as shown in the prohibited code block.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : the `run` function contains your task logic in trigger....
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function contains your task logic in Trigger.dev tasks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: when suggesting changes to documentation, note that the team prefers to keep them simple to avoid co...
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#1306
File: docs/github-actions.mdx:59-59
Timestamp: 2024-10-12T01:08:24.066Z
Learning: When suggesting changes to documentation, note that the team prefers to keep them simple to avoid confusion.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from backend code, use `tasks.tr...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using metadata in tasks, use the `metadata` api as...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using metadata in tasks, use the `metadata` API as shown, and only inside run functions or task lifecycle hooks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using retry, queue, machine, or maxduration option...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using lifecycle hooks (`init`, `cleanup`, `onstart...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: in apps/webapp/app/services/runsrepository.server.ts, the in-memory status filtering after fetching ...
Learnt from: matt-aitken
PR: triggerdotdev/trigger.dev#2264
File: apps/webapp/app/services/runsRepository.server.ts:172-174
Timestamp: 2025-07-12T18:06:04.133Z
Learning: In apps/webapp/app/services/runsRepository.server.ts, the in-memory status filtering after fetching runs from Prisma is intentionally used as a workaround for ClickHouse data delays. This approach is acceptable because the result set is limited to a maximum of 100 runs due to pagination, making the performance impact negligible.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from inside another task, use `y...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use `yourTask.trigger`, `yourTask.batchTrigger`, `yourTask.triggerAndWait`, `yourTask.batchTriggerAndWait`, `batch.triggerAndWait`, `batch.triggerByTask`, or `batch.triggerByTaskAndWait` as shown.
Applied to files:
docs/realtime/overview.mdx
⏰ 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: Analyze (javascript-typescript)
🔇 Additional comments (1)
docs/realtime/overview.mdx (1)
18-24
: Verify internal links & anchors introduced by the restructureThe following links / anchors might no longer exist after the documentation re-shuffle:
/realtime/run-object
/realtime/how-it-works#run-changes
- Anchor targets inside the React-hooks and backend pages referenced in Lines 21-23.
Please double-check that the pages and hash anchors survived the move or update the paths accordingly.
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: 0
🧹 Nitpick comments (2)
docs/realtime/overview.mdx (2)
29-34
: Non-ASCII arrow (“→”) can break MDX buildsThe Mintlify parser occasionally trips on the Unicode arrow and renders a stray character in HTML. A regular list item or
:::tip
block avoids that while keeping the CTA obvious.-→ **[See our React hooks guide](/realtime/react-hooks/)** +**Next:** [React hooks guide](/realtime/react-hooks/)
37-40
: Minor consistency nit—terminologyHere we use “Backend” (capital B) while the sidebar group was renamed to “backend”. Aligning the casing avoids duplicated sidebar entries on some themes.
-→ **[See our Backend guide](/realtime/backend)** +→ **[See our backend guide](/realtime/backend)**
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/realtime/overview.mdx
(1 hunks)
🧰 Additional context used
🧠 Learnings (17)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing schema tasks, use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : NEVER generate deprecated code patterns using `client.defineJob` and related deprecated APIs, as shown in the prohibited code block.
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using realtime features, use the `runs.subscribeto...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : you must use `@trigger.dev/sdk/v3` when writing trigger...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : always generate trigger.dev tasks using the `task` func...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to trigger.config.ts : global lifecycle hooks, telemetry, runtime, machine settings, log lev...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to trigger.config.ts : Global lifecycle hooks, telemetry, runtime, machine settings, log level, max duration, and build configuration must be set in `trigger.config.ts` as shown.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : never generate deprecated code patterns using `client.d...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : NEVER generate deprecated code patterns using `client.defineJob` and related deprecated APIs, as shown in the prohibited code block.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when implementing scheduled (cron) tasks, use `schedule...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : the `run` function contains your task logic in trigger....
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function contains your task logic in Trigger.dev tasks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using idempotency, use the `idempotencykeys` api a...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from backend code, use `tasks.tr...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: when suggesting changes to documentation, note that the team prefers to keep them simple to avoid co...
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#1306
File: docs/github-actions.mdx:59-59
Timestamp: 2024-10-12T01:08:24.066Z
Learning: When suggesting changes to documentation, note that the team prefers to keep them simple to avoid confusion.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to apps/webapp/**/*.{ts,tsx} : when importing from `@trigger.dev/core` in the webapp, never ...
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:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using metadata in tasks, use the `metadata` api as...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using metadata in tasks, use the `metadata` API as shown, and only inside run functions or task lifecycle hooks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using retry, queue, machine, or maxduration option...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using lifecycle hooks (`init`, `cleanup`, `onstart...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: in apps/webapp/app/services/runsrepository.server.ts, the in-memory status filtering after fetching ...
Learnt from: matt-aitken
PR: triggerdotdev/trigger.dev#2264
File: apps/webapp/app/services/runsRepository.server.ts:172-174
Timestamp: 2025-07-12T18:06:04.133Z
Learning: In apps/webapp/app/services/runsRepository.server.ts, the in-memory status filtering after fetching runs from Prisma is intentionally used as a workaround for ClickHouse data delays. This approach is acceptable because the result set is limited to a maximum of 100 runs due to pagination, making the performance impact negligible.
Applied to files:
docs/realtime/overview.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from inside another task, use `y...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use `yourTask.trigger`, `yourTask.batchTrigger`, `yourTask.triggerAndWait`, `yourTask.batchTriggerAndWait`, `batch.triggerAndWait`, `batch.triggerByTask`, or `batch.triggerByTaskAndWait` as shown.
Applied to files:
docs/realtime/overview.mdx
⏰ 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: Analyze (javascript-typescript)
🔇 Additional comments (2)
docs/realtime/overview.mdx (2)
11-14
: Validate/tags
and batch-runs docs routes
/tags
and/realtime/how-it-works#run-changes
must exist after the nav restructure; otherwise these bullets will turn into 404s and Mintlify will fail the link-checker step.
Please run the docs build locally (or CI preview) and update the paths if they moved to/concepts/tags
,/guides/tags
, etc.
16-22
: Anchor fragment#run-changes
may have been renamedThe original “How it works” doc changed a lot; double-check that the
run-changes
heading still exists. Broken fragment links silently pass the link check but hurt UX.
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: 2
♻️ Duplicate comments (1)
docs/realtime/react-hooks/subscribe.mdx (1)
124-132
: Sameimport type
issue for union exampleBoth
myTask1
andmyTask2
must be imported as values, not withimport type
, fortypeof
to compile.
🧹 Nitpick comments (2)
docs/realtime/react-hooks/subscribe.mdx (2)
171-179
: Typo in description“by its the batch ID” → “by its batch ID”.
547-569
: Minor wording improvement“This allows you to conditionally disable using the hook” → “This allows you to conditionally enable or disable the hook”.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/realtime/react-hooks/subscribe.mdx
(1 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing schema tasks, use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2155
File: docs/docs.json:179-183
Timestamp: 2025-06-06T16:54:23.316Z
Learning: In the docs.json configuration for the Trigger.dev documentation (Mintlify system), both "tags": ["v4"] and "tag": "v4" properties can be used together and work correctly, even though this behavior is undocumented and may not work in local development environments.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to trigger.config.ts : The `trigger.config.ts` file must use `defineConfig` from `@trigger.dev/sdk/v3` and follow the configuration structure shown.
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using realtime features, use the `runs.subscribeto...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using Realtime features, use the `runs.subscribeToRun`, `runs.subscribeToRunsWithTag`, and `runs.subscribeToBatch` APIs as shown.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using lifecycle hooks (`init`, `cleanup`, `onstart...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`), implement them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using metadata in tasks, use the `metadata` api as...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using metadata in tasks, use the `metadata` API as shown, and only inside run functions or task lifecycle hooks.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : always generate trigger.dev tasks using the `task` func...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and export them as shown in the correct pattern.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : the `run` function contains your task logic in trigger....
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function contains your task logic in Trigger.dev tasks.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from backend code, use `tasks.tr...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` as shown in the examples.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : you must use `@trigger.dev/sdk/v3` when writing trigger...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when triggering a task from inside another task, use `y...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use `yourTask.trigger`, `yourTask.batchTrigger`, `yourTask.triggerAndWait`, `yourTask.batchTriggerAndWait`, `batch.triggerAndWait`, `batch.triggerByTask`, or `batch.triggerByTaskAndWait` as shown.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when implementing scheduled (cron) tasks, use `schedule...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing scheduled (cron) tasks, use `schedules.task` from `@trigger.dev/sdk/v3` and follow the shown patterns.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : you must `export` every task, including subtasks, in tr...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST `export` every task, including subtasks, in Trigger.dev task files.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using idempotency, use the `idempotencykeys` api a...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using idempotency, use the `idempotencyKeys` API and `idempotencyKey`/`idempotencyKeyTTL` options as shown.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : when using retry, queue, machine, or maxduration option...
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them as shown in the examples for Trigger.dev tasks.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
📚 Learning: applies to **/trigger/**/*.{ts,tsx,js,jsx} : each task needs a unique id within your project....
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-07-18T17:50:25.014Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Each task needs a unique ID within your project.
Applied to files:
docs/realtime/react-hooks/subscribe.mdx
⏰ 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: Analyze (javascript-typescript)
🔇 Additional comments (1)
docs/realtime/react-hooks/subscribe.mdx (1)
417-425
: Handle unknown stage to avoid-1
index logic errorsIf
status
isn’t one of the predefined stages,currentStageIndex
will be-1
, causingisCompleted
to betrue
for every earlier stage.Consider early-returning or defaulting:
-const currentStageIndex = DEPLOYMENT_STAGES.indexOf(status as any); +const currentStageIndex = DEPLOYMENT_STAGES.indexOf(status as any); +if (currentStageIndex === -1) { + // Unknown stage – show generic UI or fallback + return null; +}
```tsx | ||
"use client"; // This is needed for Next.js App Router or other RSC frameworks | ||
|
||
import { useRealtimeRun } from "@trigger.dev/react-hooks"; | ||
|
||
export function MyComponent({ | ||
runId, | ||
publicAccessToken, | ||
}: { | ||
runId: string; | ||
publicAccessToken: string; | ||
}) { | ||
const { run, error } = useRealtimeRun(runId, { | ||
accessToken: publicAccessToken, | ||
}); | ||
|
||
if (error) return <div>Error: {error.message}</div>; | ||
|
||
return <div>Run: {run.id}</div>; | ||
} | ||
``` |
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.
🛠️ Refactor suggestion
Avoid potential runtime crash – guard against run
being undefined
run
is initially undefined
until the first realtime payload arrives, but the example dereferences run.id
unconditionally. In real apps this will throw.
- return <div>Run: {run.id}</div>;
+ if (!run) return null; // or a loading skeleton
+ return <div>Run: {run.id}</div>;
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```tsx | |
"use client"; // This is needed for Next.js App Router or other RSC frameworks | |
import { useRealtimeRun } from "@trigger.dev/react-hooks"; | |
export function MyComponent({ | |
runId, | |
publicAccessToken, | |
}: { | |
runId: string; | |
publicAccessToken: string; | |
}) { | |
const { run, error } = useRealtimeRun(runId, { | |
accessToken: publicAccessToken, | |
}); | |
if (error) return <div>Error: {error.message}</div>; | |
return <div>Run: {run.id}</div>; | |
} | |
``` |
🤖 Prompt for AI Agents
In docs/realtime/react-hooks/subscribe.mdx between lines 24 and 44, the example
code accesses run.id without checking if run is defined, which can cause a
runtime crash when run is initially undefined. Update the component to
conditionally render or guard access to run.id by verifying run is not undefined
before dereferencing its properties, ensuring the UI handles the loading or
undefined state safely.
```tsx | ||
import { useRealtimeRun } from "@trigger.dev/react-hooks"; | ||
import type { myTask } from "@/trigger/myTask"; | ||
|
||
export function MyComponent({ | ||
runId, | ||
publicAccessToken, | ||
}: { | ||
runId: string; | ||
publicAccessToken: string; | ||
}) { | ||
const { run, error } = useRealtimeRun<typeof myTask>(runId, { | ||
accessToken: publicAccessToken, |
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.
import type
can’t be used with typeof myTask
import type
only brings types into scope.
myTask
is a value export, so typeof myTask
is unavailable when you import it with type
.
The snippet won’t type-check.
-import type { myTask } from "@/trigger/myTask";
+import { myTask } from "@/trigger/myTask"; // import as a value
Everything still tree-shakes because myTask
is used only in a type position.
🤖 Prompt for AI Agents
In docs/realtime/react-hooks/subscribe.mdx around lines 48 to 60, the import
statement uses 'import type' for 'myTask', but 'myTask' is a value export needed
for 'typeof myTask'. Change the import to a regular import (remove 'type') so
that 'myTask' is available as a value for 'typeof' usage while still allowing
tree-shaking since it is only used in a type position.
No description provided.