* 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)
| 689 | * first SSE event. |
| 690 | */ |
| 691 | function 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 |
no test coverage detected