Skip to content
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
42b9999
feat(tables): add column selection, missing keyboard shortcuts, and S…
waleedlatif1 Apr 18, 2026
67e4d03
fix(tables): chevron opens dropdown, drag header to reorder columns
waleedlatif1 Apr 18, 2026
7aa6507
fix(tables): full-column highlight during drag reorder
waleedlatif1 Apr 18, 2026
3641862
fix(tables): handle drag reorder edge cases, dim source column
waleedlatif1 Apr 18, 2026
174fd48
feat(tables): add column reorder undo/redo, body drop targets, and es…
waleedlatif1 Apr 18, 2026
31df0e9
fix(tables): merge partial updates in updateRow to prevent column dat…
waleedlatif1 Apr 18, 2026
459c929
test(tables): add updateRow partial merge tests
waleedlatif1 Apr 18, 2026
2ea5d14
feat(tables): add delete-column undo/redo, rename metadata sync, and …
waleedlatif1 Apr 18, 2026
abafacb
fix(tables): remove source column dimming during drag reorder
waleedlatif1 Apr 18, 2026
0aef36b
fix(tables): preserve selection on right-click, auto-resize on double…
waleedlatif1 Apr 18, 2026
8fac875
fix(tables): add aria-hidden value and aria-label for column header a…
waleedlatif1 Apr 18, 2026
7ea7e34
fix(tables): tighten auto-resize padding to match Google Sheets
waleedlatif1 Apr 18, 2026
d90d90e
fix(tables): clean drag ghost and clear selection on drag start
waleedlatif1 Apr 18, 2026
a7f94a4
feat(tables): add Shift+Space row selection and Ctrl+D fill down
waleedlatif1 Apr 18, 2026
f0b5ad6
fix(tables): show toast on incompatible column type change
waleedlatif1 Apr 18, 2026
ebf6938
fix(tables): scroll-into-view for selection focus, Home/End origin, d…
waleedlatif1 Apr 18, 2026
d05bb81
fix: resolve duplicate declarations from rebase against staging
waleedlatif1 Apr 18, 2026
4005a15
fix file upload
waleedlatif1 Apr 18, 2026
5c03acc
fix(tables): merge column widths on delete-column undo, try/finally f…
waleedlatif1 Apr 18, 2026
46df490
fix: revert accidental home.tsx change from rebase conflict resolution
waleedlatif1 Apr 18, 2026
8eb28da
fix(tables): clear isColumnSelection on double-click and right-click,…
waleedlatif1 Apr 18, 2026
d132985
fix(tables): remove inline font override in auto-resize, guard undefi…
waleedlatif1 Apr 18, 2026
c4e5abf
fix(tables): capture columnRequired in delete-column undo for full re…
waleedlatif1 Apr 18, 2026
81f6791
fix(tables): restore width independently of order on delete-column un…
waleedlatif1 Apr 18, 2026
754b39d
fix(tables): multi-column delete, select-all cell model, cut flash, c…
waleedlatif1 Apr 18, 2026
0e720d7
fix(tables): restore column width locally on delete-column undo
waleedlatif1 Apr 18, 2026
f4c8017
fix(tables): prevent Ctrl+D bookmark dialog, batch Delete/Backspace m…
waleedlatif1 Apr 18, 2026
0fd6fa9
fix(tables): adjust column positions for multi-column delete undo
waleedlatif1 Apr 18, 2026
ffe754d
fix(tables): only multi-delete when clicked column is within selection
waleedlatif1 Apr 18, 2026
d7a5212
fix(tables): prevent duplicate undo entry on column drag-drop
waleedlatif1 Apr 18, 2026
fa29a6f
fix(tables): clean up width on delete-column redo, suppress click dur…
waleedlatif1 Apr 18, 2026
0d9c57f
fix(tables): remove unstable mutation object from useCallback deps
waleedlatif1 Apr 18, 2026
ecbb5c8
fix(tables): fix auto-resize header padding, deduplicate rename metad…
waleedlatif1 Apr 18, 2026
659e02e
fix(tables): log error on cell data restoration failure during undo
waleedlatif1 Apr 18, 2026
4f1e44e
fix(tables): address audit findings across table, undo hook, and store
waleedlatif1 Apr 18, 2026
b82a062
fix(tables): reset didDragRef in handleDragEnd to prevent stale flag
waleedlatif1 Apr 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions apps/sim/app/api/table/[tableId]/rows/[rowId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,32 +135,11 @@ export async function PATCH(request: NextRequest, { params }: RowRouteParams) {
return NextResponse.json({ error: 'Invalid workspace ID' }, { status: 400 })
}

const [existingRow] = await db
.select({ data: userTableRows.data })
.from(userTableRows)
.where(
and(
eq(userTableRows.id, rowId),
eq(userTableRows.tableId, tableId),
eq(userTableRows.workspaceId, validated.workspaceId)
)
)
Comment thread
waleedlatif1 marked this conversation as resolved.
.limit(1)

if (!existingRow) {
return NextResponse.json({ error: 'Row not found' }, { status: 404 })
}

const mergedData = {
...(existingRow.data as RowData),
...(validated.data as RowData),
}

const updatedRow = await updateRow(
{
tableId,
rowId,
data: mergedData,
data: validated.data as RowData,
workspaceId: validated.workspaceId,
},
table,
Expand Down
24 changes: 1 addition & 23 deletions apps/sim/app/api/v1/tables/[tableId]/rows/[rowId]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,33 +137,11 @@ export async function PATCH(request: NextRequest, { params }: RowRouteParams) {
return NextResponse.json({ error: 'Invalid workspace ID' }, { status: 400 })
}

// Fetch existing row to merge partial update
const [existingRow] = await db
.select({ data: userTableRows.data })
.from(userTableRows)
.where(
and(
eq(userTableRows.id, rowId),
eq(userTableRows.tableId, tableId),
eq(userTableRows.workspaceId, validated.workspaceId)
)
)
.limit(1)

if (!existingRow) {
return NextResponse.json({ error: 'Row not found' }, { status: 404 })
}

const mergedData = {
...(existingRow.data as RowData),
...(validated.data as RowData),
}

const updatedRow = await updateRow(
{
tableId,
rowId,
data: mergedData,
data: validated.data as RowData,
workspaceId: validated.workspaceId,
},
table,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export const UserInput = forwardRef<UserInputHandle, UserInputProps>(function Us
isLoading: isSending,
})
const hasFiles = files.attachedFiles.some((f) => !f.uploading && f.key)
const hasUploadingFiles = files.attachedFiles.some((f) => f.uploading)

const contextManagement = useContextManagement({ message: value })

Expand Down Expand Up @@ -232,7 +233,7 @@ export const UserInput = forwardRef<UserInputHandle, UserInputProps>(function Us
setSelectedContexts: contextManagement.setSelectedContexts,
})

const canSubmit = (value.trim().length > 0 || hasFiles) && !isSending
const canSubmit = (value.trim().length > 0 || hasFiles) && !isSending && !hasUploadingFiles

const valueRef = useRef(value)
valueRef.current = value
Expand Down Expand Up @@ -507,6 +508,8 @@ export const UserInput = forwardRef<UserInputHandle, UserInputProps>(function Us

if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
e.preventDefault()
// Mirror canSubmit's uploading guard; Enter reads refs, not rendered state.
if (filesRef.current.attachedFiles.some((f) => f.uploading)) return
const hasSubmitPayload =
valueRef.current.trim().length > 0 ||
filesRef.current.attachedFiles.some((file) => !file.uploading && file.key)
Expand Down
Loading
Loading