Skip to content

improvement(tables): restore column configuration UX - #7390

Open
j15z wants to merge 3 commits into
feat/table-fksfrom
improvement/table-column-rename-ux
Open

improvement(tables): restore column configuration UX#7390
j15z wants to merge 3 commits into
feat/table-fksfrom
improvement/table-column-rename-ux

Conversation

@j15z

@j15z j15z commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Restore inline column renaming from the column menu
  • Validate column names in place and keep invalid values editable
  • Rename plain and enrichment columns by double-clicking their headers
  • Reuse the shared clipboard helper for Copy Row ID

Stack

This PR contains the general table UX split out of #7105. It is stacked on the Reference column foundation only because Copy Row ID is introduced there.

Type of Change

  • Improvement
  • Breaking change

Testing

  • bun run type-check from apps/sim
  • 38 focused column sidebar, header, and grid utility tests

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added or updated and passing
  • No new warnings introduced

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 2, 2026 7:38am UTC

Request Review

@j15z j15z mentioned this pull request Sep 2, 2026
9 tasks
@j15z
j15z force-pushed the improvement/table-column-rename-ux branch from 5ff4e81 to f0bdfb9 Compare September 2, 2026 07:38
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Restores table-column configuration interactions, including inline header renaming with in-place validation and shared clipboard handling for row IDs.

  • Adds double-click renaming for plain and enrichment column headers.
  • Preserves editable rename state and displays validation errors after rejected submissions.
  • Adds a shared column-name validator and focused header/grid tests.
  • Replaces direct Clipboard API usage with the shared clipboard helper.

Confidence Score: 4/5

The failed-mutation path should be fixed before merging because it leaves an operation that never succeeded in the user's undo history.

Rename requests are optimistically represented in undo history before persistence, while the failure path rolls back the displayed schema without removing the corresponding undo action.

Files Needing Attention: apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx Integrates inline rename validation and clipboard handling, but records rename undo history before persistence succeeds.
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx Adds rename error presentation and double-click rename behavior while protecting workflow-output columns.
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/utils.ts Adds column-name validation aligned with the backend pattern, length, and duplicate-name rules.

Reviews (1): Last reviewed commit: 5ff4e81 | Re-trigger Greptile

// restores the label (not the id) and targets the right column.
onSave: (columnName, newName) => {
const oldName = columnsRef.current.find((c) => c.key === columnName)?.name ?? columnName
pushUndoRef.current({ type: 'rename-column', oldName, newName, columnId: columnName })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Failed rename pollutes undo history

When a rename request fails after passing local validation, the undo action has already been recorded even though the mutation rolls back the schema. The next undo therefore replays an operation that never succeeded, consuming the user's undo or unexpectedly applying the previously rejected name.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 8 files

Confidence score: 3/5

  • In table-grid.tsx, clearing a column name can let submitRename exit edit mode without an error, leaving the user unable to correct the invalid empty value; validate the trimmed value before exiting edit mode.
  • In table-grid.tsx, a rejected save for a previous column can mark the currently edited column's input invalid, confusing users during overlapping rename operations; update renameError only when the active editing id still matches the failed column.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx">

<violation number="1" location="apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx:1522">
P2: When a previous column's save rejects after a new column enters rename mode, this unconditional update marks the new input invalid. Set `renameError` only when the active editing id still matches the failed `columnName`.</violation>

<violation number="2" location="apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx:1540">
P2: When the user clears a column name, this guard skips `columnNameIssue`, and `submitRename` exits edit mode without an error. Validate the empty trimmed value here so the input remains active and editable.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

if (isValidationError(error)) {
toast.error(extractValidationIssues(error)[0]?.message ?? getErrorMessage(error))
}
setRenameError(true)

@cubic-dev-ai cubic-dev-ai Bot Sep 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When a previous column's save rejects after a new column enters rename mode, this unconditional update marks the new input invalid. Set renameError only when the active editing id still matches the failed columnName.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx, line 1522:

<comment>When a previous column's save rejects after a new column enters rename mode, this unconditional update marks the new input invalid. Set `renameError` only when the active editing id still matches the failed `columnName`.</comment>

<file context>
@@ -1502,16 +1504,60 @@ export function TableGrid({
+          if (isValidationError(error)) {
+            toast.error(extractValidationIssues(error)[0]?.message ?? getErrorMessage(error))
+          }
+          setRenameError(true)
+          throw error
+        })
</file context>
Suggested change
setRenameError(true)
if (columnRenameRef.current.editingId === columnName) setRenameError(true)
Fix with cubic

const { editingId, editValue, submitRename } = columnRenameRef.current
const trimmedName = editValue.trim()
const currentColumn = columnsRef.current.find((column) => column.key === editingId)
if (trimmedName && currentColumn && trimmedName !== currentColumn.name) {

@cubic-dev-ai cubic-dev-ai Bot Sep 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When the user clears a column name, this guard skips columnNameIssue, and submitRename exits edit mode without an error. Validate the empty trimmed value here so the input remains active and editable.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx, line 1540:

<comment>When the user clears a column name, this guard skips `columnNameIssue`, and `submitRename` exits edit mode without an error. Validate the empty trimmed value here so the input remains active and editable.</comment>

<file context>
@@ -1502,16 +1504,60 @@ export function TableGrid({
+    const { editingId, editValue, submitRename } = columnRenameRef.current
+    const trimmedName = editValue.trim()
+    const currentColumn = columnsRef.current.find((column) => column.key === editingId)
+    if (trimmedName && currentColumn && trimmedName !== currentColumn.name) {
+      const issue = columnNameIssue(
+        trimmedName,
</file context>
Suggested change
if (trimmedName && currentColumn && trimmedName !== currentColumn.name) {
if (currentColumn && trimmedName !== currentColumn.name) {
Fix with cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant