Skip to content

Specification: Legacy Cleanup

Implementation specification for Part 1 of Component Preparation. Requirements: requirements.md. Verification: verification.md.

  • Working directory: arda-frontend-app worktree
  • Branch created from main
  • npm install completed successfully
  • All checks pass on the unmodified branch (baseline)

Before deleting anything, confirm that ItemTable has no active consumers:

Terminal window
grep -rn 'ItemTable' src/ --include='*.ts' --include='*.tsx' \
| grep -v 'ItemTableAGGrid' \
| grep -v 'itemTableConfig'

Expected results: only ItemTable.tsx itself, itemTable.test.tsx, a jest.mock in items.test.tsx, and comment references. No active imports.

Terminal window
grep -rn '@tanstack/react-table' src/

Expected results: only ItemTable.tsx.

STOP: If any unexpected consumer is found, do not proceed. Report the finding and reassess scope.

  1. Delete src/app/items/ItemTable.tsx (REQ-LC-001)
  2. Delete src/tests/itemTable.test.tsx (REQ-LC-002)
  3. Remove the stale jest.mock entry referencing ItemTable in src/tests/items.test.tsx (REQ-LC-003)
Terminal window
npm uninstall @tanstack/react-table

This updates both package.json and package-lock.json (REQ-LC-004).

Terminal window
grep -rn 'ItemTable' src/ --include='*.ts' --include='*.tsx' \
| grep -v 'ItemTableAGGrid' \
| grep -v 'itemTableConfig'
grep -rn '@tanstack/react-table' src/
grep '@tanstack/react-table' package.json

All three commands must return no results (comment references in itemTableConfig.ts and columnPresets.test.tsx are acceptable as they reference ItemTableAGGrid context, not the deleted component).

Terminal window
npm run lint
npx tsc --noEmit
npx jest --no-coverage --watchAll=false --forceExit
npm run build

All must exit 0 (REQ-LC-005, REQ-LC-006).

STOP: If any check fails, diagnose and fix before proceeding. Do not move to the CHANGELOG step with failing checks.

Add an entry under [Unreleased] with a Removed category:

### Removed
- Removed legacy `ItemTable` component (`src/app/items/ItemTable.tsx`) and
associated test, superseded by `ItemTableAGGrid`
- Removed `@tanstack/react-table` dependency (no remaining consumers)

(REQ-LC-007)

Stage all changes and commit. This is a single atomic commit covering the complete legacy cleanup.

  • Do not modify any file other than those listed in steps 2-3 and 6 (plus the mock cleanup in items.test.tsx).
  • Do not reformat or restructure surrounding code.
  • The itemTableConfig.ts file is used by ItemTableAGGrid — do not remove it.
  • src/app/items/ItemTable.tsx deleted
  • src/tests/itemTable.test.tsx deleted
  • Stale jest.mock removed from src/tests/items.test.tsx
  • @tanstack/react-table removed from package.json
  • No remaining imports of @tanstack/react-table in src/
  • ItemTableAGGrid tests pass
  • lint, typecheck, unit tests, build all pass
  • CHANGELOG updated with Removed entry
#QuestionOptionsRecommendationDecision
1Should comment references to ItemTable in itemTableConfig.ts and columnPresets.test.tsx be cleaned up?a) Remove comments, b) Leave as-isLeave as-is — they provide historical context and reference ItemTableAGGrid, not the deleted componentpending

Copyright: (c) Arda Systems 2025-2026, All rights reserved