improvement(tables): clean up duplicate types, unnecessary memos, and barrel imports#4205
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Removes duplicated Reviewed by Cursor Bugbot for commit b023d45. Configure here. |
Greptile SummaryThis PR is a code quality cleanup across four Confidence Score: 5/5Safe to merge — all changes are semantically identical refactors with no behaviour change. The only finding is a P2 style inconsistency: one @/lib/table/types sub-module import was missed in user-table.ts despite being listed in the PR description as a target. All other changes are correct and beneficial. apps/sim/lib/copilot/tools/server/table/user-table.ts — one remaining sub-path import at line 44. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[import-csv-dialog.tsx] -->|CsvImportMode, useImportCsvIntoTable| B[hooks/queries/tables.ts]
A -->|TableDefinition, parseCsvBuffer| C[lib/table barrel]
B -->|CsvHeaderMapping, Filter, RowData| C
D[user-table.ts] -->|buildAutoMapping, CsvHeaderMapping, etc| C
D -->|RowData, TableDefinition - subpath still used| E[lib/table/types]
F[use-query-builder.ts] -->|reads constants| G[query-builder/constants]
F -->|module-level arrays| H[comparisonOptions / logicalOptions / sortDirectionOptions]
C --> E
Reviews (2): Last reviewed commit: "improvement(tables): clean up duplicate ..." | Re-trigger Greptile |
a23bbbe to
b023d45
Compare
|
@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 b023d45. Configure here.
…ng server-only deps
Summary
CsvHeaderMappingtype fromhooks/queries/tables.ts, import from canonical@/lib/tablesource@/lib/table/csv-import,@/lib/table/constants,@/lib/table/types) with barrel@/lib/tableuseMemofor trivial arithmetic (appendCapacityDeficit,replaceCapacityDeficit) in import-csv-dialogcomparisonOptions,logicalOptions,sortDirectionOptions) fromuseMemoto module-level constants inuse-query-builder.tsimportMutation.mutateAsyncdirectly instead of extracting to intermediate variable (stable in TanStack Query v5)Type of Change
Testing
Verified TypeScript compilation passes with zero errors. All changes are semantically identical — no behavior change.
Checklist