Skip to content

Commit 5d6085d

Browse files
authored
docs: Realtime skipColumns and Bun indexing troubleshooting (#3054)
Documents the skipColumns option on useRealtimeRun and useRealtimeRunsWithTag for status-only subscriptions (smaller payloads, e.g. for progress/completion UI). Adds a troubleshooting section for the “Failed to index deployment” source-map error when using the Bun runtime, with a pnpm patch workaround and link to the GitHub issue
1 parent 1d744fa commit 5d6085d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docs/realtime/react-hooks/subscribe.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,32 @@ export function MyComponent({
9393
}
9494
```
9595

96+
When you only need run status (for example, a progress bar or completion badge), you can omit large fields like `payload` and `output` by passing `skipColumns`. This reduces the data sent over the wire and avoids issues such as "Large HTTP Payload" warnings in tools like Sentry.
97+
98+
```tsx
99+
import { useRealtimeRun } from "@trigger.dev/react-hooks";
100+
101+
export function RunStatusBadge({
102+
runId,
103+
publicAccessToken,
104+
}: {
105+
runId: string;
106+
publicAccessToken: string;
107+
}) {
108+
const { run, error } = useRealtimeRun(runId, {
109+
accessToken: publicAccessToken,
110+
skipColumns: ["payload", "output"],
111+
});
112+
113+
if (error) return <span>Error</span>;
114+
if (!run) return <span>Loading…</span>;
115+
116+
return <span>Status: {run.status}</span>;
117+
}
118+
```
119+
120+
You can skip any of: `payload`, `output`, `metadata`, `startedAt`, `delayUntil`, `queuedAt`, `expiredAt`, `completedAt`, `number`, `isTest`, `usageDurationMs`, `costInCents`, `baseCostInCents`, `ttl`, `payloadType`, `outputType`, `runTags`, `error`. The `useRealtimeRunsWithTag` hook also accepts a `skipColumns` option in the same way.
121+
96122
See our [run object reference](/realtime/run-object) for the complete schema and [How it Works documentation](/realtime/how-it-works) for more technical details.
97123

98124
### useRealtimeRunsWithTag

docs/troubleshooting.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ export default defineConfig({
9797

9898
If you see this error, add pino (and any other associated packages) to your `external` build settings in your `trigger.config.ts` file. Learn more about the `external` setting in the [config docs](/config/config-file#external).
9999

100+
### `Failed to index deployment` with `Column must be greater than or equal to 0, got -1`
101+
102+
This can occur when using `runtime: "bun"` during the indexing phase (we load and execute your task files to discover exports). A short-term workaround is to [pnpm patch](https://pnpm.io/cli/patch) the `source-map` package. See [this GitHub issue](https://github.com/triggerdotdev/trigger.dev/issues/3045) for the patch details.
103+
100104
### `reactDOMServer.renderToPipeableStream is not a function` when using react-email
101105

102106
If you see this error when using `@react-email/render`:

0 commit comments

Comments
 (0)