Skip to content

feat(tools): remove sample data buttons from drill simulator and data import - #3619

Merged
PetrefiedThunder merged 2 commits into
mainfrom
claude/sel-474-remove-sample-data
Oct 26, 2026
Merged

PetrefiedThunder merged 2 commits into
mainfrom
claude/sel-474-remove-sample-data

Conversation

@PetrefiedThunder

@PetrefiedThunder PetrefiedThunder commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Removes both sample data entry points, as approved by C.Lee in Approvals (A-2051: "Remove both sample data buttons").

  • Drill simulator: removed the Load Sample Data button, its handler, and generateSampleCSV in record-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".
  • Data import: the Load Sample Dataset card was already removed on main in fix(copy): real-data follow-up to #3471 (v3) #3544, and the existing test still asserts it is absent. The empty drop zone now leads with "Upload a CSV to get started".
  • Copy lint baseline: dropped the now resolved sample-demo entry.

No tests covered only the removed code. No leftover references to generateSampleCSV or Load Sample remain outside that negative assertion.

Testing

  • vitest run src/__tests__/pages/data-import.test.tsx: 12 passed
  • eslint on both tool folders: clean
  • Copy gate with main baseline: pass

Refs 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 in record-validator.ts are 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-demo flag for DrillSimulatorClient.

Reviewed by Cursor Bugbot for commit 2898029. Bugbot is set up for automated code reviews on this repo. Configure here.

… 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>
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
regengine Ready Ready Preview Oct 26, 2026 7:54am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T07:53:25.258858Z 2898029 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f1fea1e and 2898029.

Files selected for processing: 4
  • frontend/src/app/tools/data-import/components/DataImportClient.tsx
  • frontend/src/app/tools/drill-simulator/components/DrillSimulatorClient.tsx
  • frontend/src/app/tools/drill-simulator/lib/record-validator.ts
  • scripts/copy-lint/baseline.json
Files with no reviewable changes: 2
  • frontend/src/app/tools/drill-simulator/lib/record-validator.ts
  • scripts/copy-lint/baseline.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Walkthrough

The data-import and drill-simulator upload prompts now use updated text. The drill simulator no longer includes a sample CSV generator or sample-data loading helper. Its secondary upload button opens the file picker. The associated lint baseline entry was removed.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to 28980

The PR is mergeable with no concrete current-head risk identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: removing sample-data buttons from the drill simulator and data import tools.
Description check Passed The description provides a clear summary, implementation details, related issue, and specific test results. It does not reproduce the template checkboxes for change type and checklist, but the substan…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description provides a clear summary, implementation details, related issue, and specific test results. It does not reproduce the template checkboxes for change type and checklist, but the substantive information is mostly complete.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Bundle Size Report

Metric Size
Total JS 5562.0KB (5.43MB)
Total CSS 132.2KB
Limit 10.0MB

Bundle is within the 10.0MB limit.

@github-actions

Copy link
Copy Markdown
Contributor

PR Blocker Checklist

Head SHA: 2898029035ae6d685daf36a16ae0304abeed387a

Status: Ready

  • All review threads resolved
  • No reviews requesting changes
  • No blocked review engines

@PetrefiedThunder PetrefiedThunder left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Vercel preview access note removed (A-2177 secret-hygiene cleanup).
Access is via Vercel login (Deployment Protection).

@PetrefiedThunder
PetrefiedThunder merged commit 93f9801 into main Oct 26, 2026
109 of 116 checks passed
@PetrefiedThunder
PetrefiedThunder deleted the claude/sel-474-remove-sample-data branch October 26, 2026 14:10

This branch was successfully deployed

1 active deployment
Preview — 28980290 Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant