fix(tables): key filter UI by stable column id; show column name in delete confirm#4930
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@greptile review |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit f9aee7e. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR fixes two related regressions following the stable-column-ids change in #4898: filter rules now use
Confidence Score: 5/5Safe to merge; the changes are narrow, targeted, and correctly restore filter matching and the delete-column modal UX after the stable-id migration. Both changed code paths have the correct logic: filter rules now carry stable column ids so queries match row data, and the delete modal performs a proper id→name lookup with a sensible fallback. Backward compatibility with legacy name-keyed columns is preserved because getColumnId falls back to the column name when no id is present. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[TableFilter receives ColumnDefinition array] --> B[columnOptions: value=getColumnId, label=col.name]
B --> C[FilterRuleRow dropdown keyed by stable id]
C --> D{User selects column}
D --> E[rule.column = stable col id]
E --> F[Display: find col where value matches rule.column]
F --> G[filterRulesToFilter builds Filter keyed by col id]
G --> H[API query matches row data keys correctly]
I[Delete column triggered] --> J[deletingColumns holds stable col id]
J --> K[Confirm modal: find column where getColumnId matches]
K --> L[Shows human-readable column name]
Reviews (4): Last reviewed commit: "fix(tables): import getColumnId from col..." | Re-trigger Greptile |
Greptile SummaryThis PR fixes two regressions introduced by the stable-column-ids change (#4898): filter rules were still keying on column display names instead of stable ids (so no rows ever matched), and the delete-column confirm modal was surfacing raw
Confidence Score: 4/5Safe to merge. Both changed files make targeted, self-contained fixes that restore expected behaviour without touching any shared utilities or data layer. The filter key fix and the delete-modal name resolution are both correct. The one remaining rough edge — No files require special attention beyond the minor naming note in table.tsx. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["ColumnDefinition[]\n(id?, name, type)"] --> B["getColumnId(col)\n→ col.id ?? col.name"]
B --> C["columnOptions\n{ value: colId, label: colName }"]
C --> D["FilterRuleRow dropdown\nonSelect → rule.column = colId"]
D --> E["FilterRule\n{ column: colId, operator, value }"]
E --> F["filterRulesToFilter(rules)\n→ Filter { colId: condition }"]
F --> G["Query layer\nmatches row.data[colId] ✓"]
H["Existing filter prop\n(Filter keyed by colId)"] --> I["filterToRules(filter)\n→ FilterRule[] { column: colId }"]
I --> D
J["Display in dropdown trigger"] --> K{"columns.find(col =>\ncol.value === rule.column)"}
K -->|found| L["show col.label (display name)"]
K -->|not found| M["show rule.column as fallback"]
|
30be31d to
08db147
Compare
|
@greptile review |
1 similar comment
|
@greptile review |
…er-tainted barrel
2d56092 to
f9aee7e
Compare
Summary
TableFilterid-native: dropdown option values usegetColumnId, names stay as display labels, selected column renders the label via lookupcol_…id — now resolves it back to the column's display nameType of Change
Testing
Tested manually.
tsc --noEmit,bun run lint:check, andbun run check:api-validation:strictall passChecklist