Repository navigation
feat(tools): remove sample data buttons from drill simulator and data import - #3619
Conversation
… import Both tools now start empty with an upload prompt. Removes generateSampleCSV and the Load Sample Data handler. Approved by C.Lee (A-2051). Refs SEL-474 Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
Refs SEL-474 Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
✅ Bundle Size Report
Bundle is within the 10.0MB limit. |
PR Blocker ChecklistHead SHA: Status: Ready
|
PetrefiedThunder
left a comment
There was a problem hiding this comment.
Codex review on the exact head 2898029 (SEL-474, approved by C.Lee in A-2051: "Remove both sample data buttons").
- DrillSimulatorClient.tsx:18,185 and record-validator.ts:910: generateSampleCSV and handleLoadSampleData are fully removed. That took out the invented LOT-2024-*, GLN and GTIN rows, and nothing in frontend/src still references them.
- DrillSimulatorClient.tsx:423-426: Upload CSV opens the same validated file input. Extension is checked at :112 and the 10MB limit at :124.
- DataImportClient.tsx:301: the empty state is now "Upload a CSV to get started". The Load Sample Dataset card was already gone on main. Upload still validates the .csv extension and 5MB limit at :106-123.
- The copy-lint baseline entry is removed. No dead imports remain.
Non-blocking, older behavior this PR doesn't change:
- DrillSimulatorClient.tsx:111/363 accepts .tsv and .xlsx, and the copy says "CSV, TSV, or XLSX", but parseCSV (record-validator.ts:264) only parses comma-separated text. An empty or malformed file goes through handleAnalyze (:150) with no visible error. Suggest a follow-up: limit uploads to .csv and reject empty or no-record files with a toast.
- frontend/src/lib/api-client.ts:696 still defaults source='sample_data'.
- tests/pages/data-import.test.tsx has fixed lot and event ids. Real-data follow-up.
State: up to date with main, 0 threads unresolved. PR Gate: Backend is pending, and many checks are still pending. Failing checks are Engine Review Pass, Head SHA Check Guard and PR Blocker Checklist, which should re-run after this review.
REVIEW: PASS codex 2898029
|
Vercel preview access note removed (A-2177 secret-hygiene cleanup). |
Summary
Removes both sample data entry points, as approved by C.Lee in Approvals (A-2051: "Remove both sample data buttons").
generateSampleCSVinrecord-validator.ts. The secondary button is now Upload CSV, which opens the file picker. The empty drop zone reads "Upload a CSV to get started".No tests covered only the removed code. No leftover references to
generateSampleCSVorLoad Sampleremain outside that negative assertion.Testing
vitest run src/__tests__/pages/data-import.test.tsx: 12 passedRefs SEL-474. Do not merge until Codex review.
Note
Low Risk
Copy and UX-only changes plus removal of client-side demo CSV generation; no ingestion, auth, or API behavior changes.
Overview
Removes sample data entry points from the drill simulator and aligns empty-state upload copy on Data Import and Drill Simulator (per approval to drop both sample buttons).
On the drill simulator, Load Sample Data is gone:
handleLoadSampleData,generateSampleCSV, and the fabricated traceability rows inrecord-validator.tsare deleted. The secondary action is now Upload CSV, which opens the file picker; the drop zone leads with Upload a CSV to get started and moves drag/browse to supporting text. Download CSV template (generateCsvTemplate, headers only) is unchanged.Data Import only updates the empty drop zone to the same headline plus a separate drag-and-drop line. The copy-lint baseline drops the resolved
sample-demoflag forDrillSimulatorClient.Reviewed by Cursor Bugbot for commit 2898029. Bugbot is set up for automated code reviews on this repo. Configure here.