The table's maintained, unfiltered `rowCount` from the detail cache (or * `null` when the detail hasn't loaded). This is the right scope for a Run-all * estimate: the dispatcher runs every row regardless of the active view * filter, whereas the rows query's `totalCount` is filter-scoped.
( queryClient: ReturnType<typeof useQueryClient>, tableId: string )
| 334 | * estimate: the dispatcher runs every row regardless of the active view |
| 335 | * filter, whereas the rows query's `totalCount` is filter-scoped. */ |
| 336 | function readTableRowCount( |
| 337 | queryClient: ReturnType<typeof useQueryClient>, |
| 338 | tableId: string |
| 339 | ): number | null { |
| 340 | const def = queryClient.getQueryData<TableDefinition>(tableKeys.detail(tableId)) |
| 341 | return typeof def?.rowCount === 'number' ? def.rowCount : null |
| 342 | } |
| 343 | |
| 344 | /** Optimistically reflect a run on the "X running" badge + per-row gutter Stop |
| 345 | * instantly (the optimistic stamp eats the dispatcher's `pending` SSE, so |