improvement(tables): inline column creation and header-menu editing - #7048
improvement(tables): inline column creation and header-menu editing#7048j15z wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The column chevron menu gains Rename, Change type (select conversions route through the options sidebar), Set/Remove unique (registry-driven), and Configure for types with Validation and polish: Fixes: Date Reviewed by Cursor Bugbot for commit 6ece736. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR moves table-column creation and editing into inline headers and header menus while retaining sidebars for type-specific configuration.
Confidence Score: 5/5The PR appears safe to merge because the previously reported import-path issue is fixed and no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/draft-column-header.tsx | Adds the local draft-name input and now uses the requested absolute @/ import for ColumnTypeIcon. |
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx | Coordinates draft-column lifecycle, inline rename validation, persistence, type changes, layout, and undo recording. |
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-config-sidebar.tsx | Narrows the sidebar to select and currency configuration, including draft-select creation and select conversion. |
| apps/sim/hooks/queries/tables.ts | Updates table mutation cache behavior to reconcile created and edited schema data. |
| apps/sim/hooks/use-table-undo.ts | Extends undo handling to retain complete created-column definitions and type-change state. |
| apps/sim/lib/table/dates.ts | Makes date display formatting total for invalid numeric conversions and avoids recursive formatting failure. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Pick[Pick new column type] --> Draft[Create local header draft]
Draft -->|Escape or reload| Discard[Discard without persistence]
Draft -->|Commit scalar name| Create[Persist column]
Draft -->|Commit select name| Options[Open options sidebar]
Options -->|Save| Create
Options -->|Cancel or replace panel| Discard
Header[Existing column header menu] --> Rename[Rename inline]
Header --> Type[Change type]
Header --> Unique[Set or remove unique]
Header --> Configure[Configure select or currency]
Reviews (2): Last reviewed commit: "fix(tables): preserve column actions acr..." | Re-trigger Greptile
8990821 to
6ece736
Compare
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6ece736. Configure here.
| }, | ||
| onSettled: () => { | ||
| invalidateTableSchemaOnly(queryClient, tableId) | ||
| queryClient.invalidateQueries({ queryKey: tableKeys.lists() }) |
There was a problem hiding this comment.
Create drops schema refetch
Medium Severity
useAddTableColumn writes result.data.columns into the detail cache on success but no longer invalidates or cancels the detail query. An in-flight detail fetch that started earlier can finish afterward and overwrite that write with a pre-create schema, so the new column disappears until some later unrelated refetch.
Reviewed by Cursor Bugbot for commit 6ece736. Configure here.
|
|
||
| draftSelectSaveSinkRef.current = (options, multiple) => | ||
| persistDraft({ options, ...(multiple ? { multiple: true } : {}) }) | ||
| abortColumnDraftSinkRef.current = () => setColumnDraft(null) |
There was a problem hiding this comment.
Escape clears saving draft
Medium Severity
handleDraftCancel always clears columnDraft and does not consult draftPersistingRef / draftSelectSavingRef. During an in-flight select save, Escape can drop the draft while slideout CLOSE stays blocked, so a failed create leaves the options sidebar open with nothing left for Save to persist.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6ece736. Configure here.
|
Closing as superseded by the narrower sidebar-based Reference column implementation on https://github.com/simstudioai/sim/tree/feat/table-fks. Column creation and configuration now live in the sidebar; inline renaming, Edit column, and pinning remain. |


Summary
100, overflowed the stack and tripped the table error boundary); every registry formatter is now guarded by a totality test<col>in the fixed layout), and the column flicker after creation (create response is now written to the schema cache on success)Type of Change
Testing
Tested manually.
bun run lint, block-registry check,bun run check:audits, type-check, and 1,633 table/query tests pass. Playwright probes cover instant create, invalid/duplicate names, reload-before-naming, select save/cancel/abandon, type changes, and the layout/flicker cases.Checklist