MCPcopy Index your code
hub / github.com/simstudioai/sim / withOptimisticAutoFireExec

Function withOptimisticAutoFireExec

apps/sim/hooks/queries/tables.ts:691–695  ·  view source on GitHub ↗

* Pre-stamp `pending` for any auto-fire-eligible workflow groups on a row that * was just inserted server-side. Mirrors the server's `mode: 'new'` dispatch: * the server will fire these groups in the background; the optimistic stamp * shows the user a `queued` badge immediately rather than waitin

(groups: WorkflowGroup[], row: TableRow)

Source from the content-addressed store, hash-verified

689 * first SSE event.
690 */
691function withOptimisticAutoFireExec(groups: WorkflowGroup[], row: TableRow): TableRow {
692 const nextExecutions = optimisticallyScheduleNewlyEligibleGroups(groups, row, {})
693 if (!nextExecutions) return row
694 return { ...row, executions: nextExecutions }
695}
696
697/**
698 * Apply a row-level transformation to all cached infinite row queries for this

Callers 1

useCreateTableRowFunction · 0.85

Tested by

no test coverage detected