feat(tables): add rich column types — select, url, email, phone, currency, percent, rating#5006
feat(tables): add rich column types — select, url, email, phone, currency, percent, rating#5006waleedlatif1 wants to merge 7 commits into
Conversation
…ency, percent, rating
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Select columns gain bounded Grid & editing: colored select tags (hash-based palette), mailto/tel links, locale currency/percent formatters, star ratings, filterable inline select editor, row-modal fields, and column sidebar option list. Workflow input mapping and LLM enrichment resolve types through storage primitives. Tests cover options validation, rich-type rows, SQL casts/sorts, and CSV coercion. Reviewed by Cursor Bugbot for commit 5d5160c. Configure here. |
Greptile SummaryThis PR adds seven rich column types —
Confidence Score: 5/5Safe to merge — the storage-primitive abstraction is consistent across all layers, and the previously flagged type+options atomicity gap is correctly resolved in a single locked transaction. The COLUMN_TYPE_STORAGE map is applied uniformly across SQL casting, CSV coercion, row validation, inline editors, and the undo system. Both route files received the same atomic fix. No data-loss or schema-corruption path was identified in the new code. No files require special attention. The two inline comments are minor UX polish items that do not affect data correctness. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PATCH /columns] --> B{updates.type?}
B -- yes --> C[updateColumnType\n+ options if present\none locked tx]
B -- no --> D{updates.options?}
D -- yes --> E[updateColumnOptions\none locked tx]
D -- no --> F[other updates]
C --> G[schema: type + options\nstored atomically]
E --> H[schema: options only\nupdated]
subgraph Rich Type Resolution
I[column.type] --> J[getColumnStorageType]
J --> K{storage primitive}
K -- string --> L[SQL text / CSV / validate]
K -- number --> M[SQL numeric / CSV / validate]
K -- other --> N[existing paths]
end
Reviews (8): Last reviewed commit: "fix(tables): resolve highlighted option ..." | Re-trigger Greptile |
…it-pick select save, locale-aware currency/percent
|
@greptile |
|
@cursor review |
…lect tag match, options support in v1 column PATCH
|
@greptile |
|
@cursor review |
…, case-insensitive select match in row modal
|
@greptile |
|
@cursor review |
…even with empty filter
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 00181cd. Configure here.
…iome format in contract refine
|
Addressed the remaining 4/5 concern: |
|
@greptile |
|
@cursor review |
…ough type-change redo
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5d5160c. Configure here.
Summary
COLUMN_TYPE_STORAGEmap inlib/table/constants.tsis the single source of truth: validation, coercion, SQL casts (::numericfor currency/percent/rating), CSV import, and type-change compatibility all key off the storage primitive, so rich types behave exactly like their primitive everywhere except display/editingoptions: string[]on the column definition (soft constraint — values outside the list stay valid and render as gray tags, so removing an option never strands row data); options editable in the column config sidebar, with a filterable option-list inline editor in the gridcolumnOptionsSchema(count/length/uniqueness bounds + options-only-on-select refine) on create/update column bodies; newupdateColumnOptionsservice fn;normalizeColumnand delete-column undo carry optionsType of Change
Testing
bunx tsc --noEmit,biome check, andbun run check:api-validation:strictall passNotes
COLUMN_TYPESso it already accepts the new ones — catalog bump is a follow-upChecklist