11'use client'
22
33import React , { useCallback , useEffect , useMemo , useRef , useState } from 'react'
4- import { Circle , Square } from 'lucide-react'
4+ import { Square } from 'lucide-react'
55import { useParams , useRouter } from 'next/navigation'
66import { usePostHog } from 'posthog-js/react'
77import {
88 Button ,
99 Checkbox ,
10- DatePicker ,
11- DropdownMenu ,
12- DropdownMenuContent ,
13- DropdownMenuItem ,
14- DropdownMenuSeparator ,
15- DropdownMenuSub ,
16- DropdownMenuSubContent ,
17- DropdownMenuSubTrigger ,
18- DropdownMenuTrigger ,
1910 Modal ,
2011 ModalBody ,
2112 ModalContent ,
@@ -25,32 +16,17 @@ import {
2516 Upload ,
2617} from '@/components/emcn'
2718import {
28- ArrowLeft ,
29- ArrowRight ,
30- Calendar as CalendarIcon ,
31- ChevronDown ,
32- EyeOff ,
3319 Pencil ,
3420 PlayOutline ,
3521 Plus ,
3622 Table as TableIcon ,
3723 TableX ,
3824 Trash ,
39- TypeBoolean ,
40- TypeJson ,
41- TypeNumber ,
42- TypeText ,
4325} from '@/components/emcn/icons'
4426import { Loader } from '@/components/emcn/icons/loader'
4527import { cn } from '@/lib/core/utils/cn'
4628import { captureEvent } from '@/lib/posthog/client'
47- import type {
48- ColumnDefinition ,
49- Filter ,
50- SortDirection ,
51- TableRow as TableRowType ,
52- WorkflowGroup ,
53- } from '@/lib/table'
29+ import type { ColumnDefinition , Filter , SortDirection , TableRow as TableRowType } from '@/lib/table'
5430import type { ColumnOption , SortConfig } from '@/app/workspace/[workspaceId]/components'
5531import { ResourceHeader , ResourceOptionsBar } from '@/app/workspace/[workspaceId]/components'
5632import { LogDetails } from '@/app/workspace/[workspaceId]/logs/components'
@@ -77,7 +53,6 @@ import { useInlineRename } from '@/hooks/use-inline-rename'
7753import { extractCreatedRowId , useTableUndo } from '@/hooks/use-table-undo'
7854import { useLogDetailsUIStore } from '@/stores/logs/store'
7955import type { DeletedRowSnapshot } from '@/stores/table/types'
80- import type { WorkflowMetadata } from '@/stores/workflows/registry/types'
8156import { useContextMenu , useRowExecution , useTable } from '../../hooks'
8257import type { EditingCell , QueryOptions , SaveReason } from '../../types'
8358import { cleanCellValue , storageToDisplay } from '../../utils'
@@ -89,17 +64,16 @@ import { CellContent } from './cells/cell-content'
8964import { ExpandedCellPopover } from './cells/expanded-cell-popover'
9065import { COL_WIDTH , SELECTION_TINT_BG } from './constants'
9166import { ColumnHeaderMenu } from './headers/column-header-menu'
92- import { COLUMN_TYPE_ICONS , ColumnTypeIcon } from './headers/column-type-icon'
67+ import { COLUMN_TYPE_ICONS } from './headers/column-type-icon'
9368import { WorkflowGroupMetaCell } from './headers/workflow-group-meta-cell'
94- import type { BlockIconInfo , ColumnSourceInfo , DisplayColumn } from './types'
69+ import type { DisplayColumn } from './types'
9570import {
9671 areRowDepsSatisfied ,
9772 buildHeaderGroups ,
9873 type CellCoord ,
9974 collectRowSnapshots ,
10075 computeNormalizedSelection ,
10176 expandToDisplayColumns ,
102- type HeaderGroup ,
10377 moveCell ,
10478 type NormalizedSelection ,
10579 readExecution ,
@@ -1558,7 +1532,10 @@ export function Table({
15581532 if ( e . key . length === 1 && ! e . metaKey && ! e . ctrlKey && ! e . altKey ) {
15591533 if ( ! canEditRef . current ) return
15601534 const col = cols [ anchor . colIndex ]
1561- if ( ! col || col . type === 'boolean' || col . workflowGroupId ) return
1535+ // Workflow-output cells are editable: the user can override the
1536+ // workflow's value if they want. Booleans toggle on space/click —
1537+ // typeahead doesn't apply to them.
1538+ if ( ! col || col . type === 'boolean' ) return
15621539 if ( col . type === 'number' && ! / [ \d . - ] / . test ( e . key ) ) return
15631540 if ( col . type === 'date' && ! / [ \d \- / ] / . test ( e . key ) ) return
15641541 e . preventDefault ( )
@@ -2347,7 +2324,6 @@ export function Table({
23472324 )
23482325 const hasWorkflowColumns = workflowColumnNames . length > 0
23492326
2350-
23512327 const { runningByRowId, totalRunning } = useMemo ( ( ) => {
23522328 const byRow = new Map < string , number > ( )
23532329 let total = 0
@@ -3298,7 +3274,6 @@ const DataRow = React.memo(function DataRow({
32983274 )
32993275} , dataRowPropsAreEqual )
33003276
3301-
33023277const TableBodySkeleton = React . memo ( function TableBodySkeleton ( {
33033278 colCount,
33043279} : {
@@ -3331,8 +3306,6 @@ const TableBodySkeleton = React.memo(function TableBodySkeleton({
33313306 )
33323307} )
33333308
3334-
3335-
33363309interface RunStatusControlProps {
33373310 running : number
33383311 onStopAll : ( ) => void
@@ -3437,7 +3410,6 @@ const AddRowButton = React.memo(function AddRowButton({ onClick }: { onClick: ()
34373410 )
34383411} )
34393412
3440-
34413413/**
34423414 * Reuses the logs page's `LogDetails` slideout inside the tables view so a user
34433415 * can inspect a workflow run for a cell without leaving the table. The query is
0 commit comments