Skip to content

Commit 9f565dc

Browse files
chore(table): apply biome formatting fixes
CI lint job flagged import order in two files and over-wrapped union in lib/table/events.ts. No behavior change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 039bef2 commit 9f565dc

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

apps/sim/app/api/table/[tableId]/events/stream/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { type NextRequest, NextResponse } from 'next/server'
55
import { tableEventStreamContract } from '@/lib/api/contracts/tables'
66
import { parseRequest } from '@/lib/api/server'
77
import { checkSessionOrInternalAuth } from '@/lib/auth/hybrid'
8-
import { SSE_HEADERS } from '@/lib/core/utils/sse'
98
import { generateRequestId } from '@/lib/core/utils/request'
9+
import { SSE_HEADERS } from '@/lib/core/utils/sse'
1010
import { withRouteHandler } from '@/lib/core/utils/with-route-handler'
1111
import { readTableEventsSince, type TableEventEntry } from '@/lib/table/events'
1212
import { accessError, checkAccess } from '@/app/api/table/utils'

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/hooks/use-table-event-stream.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import { useEffect } from 'react'
44
import { createLogger } from '@sim/logger'
55
import { useQueryClient } from '@tanstack/react-query'
6-
import { snapshotAndMutateRows, tableKeys } from '@/hooks/queries/tables'
7-
import type { TableEvent, TableEventEntry } from '@/lib/table/events'
86
import type { RowData, RowExecutionMetadata, RowExecutions } from '@/lib/table'
7+
import type { TableEvent, TableEventEntry } from '@/lib/table/events'
8+
import { snapshotAndMutateRows, tableKeys } from '@/hooks/queries/tables'
99

1010
const logger = createLogger('useTableEventStream')
1111

@@ -72,7 +72,17 @@ export function useTableEventStream({
7272
let reconnectAttempt = 0
7373

7474
const applyCell = (event: Extract<TableEvent, { kind: 'cell' }>): void => {
75-
const { rowId, groupId, status, executionId, jobId, error, outputs, runningBlockIds, blockErrors } = event
75+
const {
76+
rowId,
77+
groupId,
78+
status,
79+
executionId,
80+
jobId,
81+
error,
82+
outputs,
83+
runningBlockIds,
84+
blockErrors,
85+
} = event
7686
void snapshotAndMutateRows(
7787
queryClient,
7888
tableId,
@@ -93,9 +103,7 @@ export function useTableEventStream({
93103
...(row.executions ?? {}),
94104
[groupId]: nextExec,
95105
}
96-
const nextData: RowData = outputs
97-
? ({ ...row.data, ...outputs } as RowData)
98-
: row.data
106+
const nextData: RowData = outputs ? ({ ...row.data, ...outputs } as RowData) : row.data
99107
return { ...row, executions: nextExecutions, data: nextData }
100108
},
101109
{ cancelInFlight: false }

apps/sim/lib/table/events.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,7 @@ function getMetaKey(tableId: string) {
6666
return `${REDIS_PREFIX}${tableId}:meta`
6767
}
6868

69-
export type TableCellStatus =
70-
| 'pending'
71-
| 'queued'
72-
| 'running'
73-
| 'completed'
74-
| 'cancelled'
75-
| 'error'
69+
export type TableCellStatus = 'pending' | 'queued' | 'running' | 'completed' | 'cancelled' | 'error'
7670

7771
export interface TableEvent {
7872
kind: 'cell'

0 commit comments

Comments
 (0)