Specification: Legacy Cleanup
Implementation specification for Part 1 of Component Preparation. Requirements: requirements.md. Verification: verification.md.
Pre-conditions
Section titled “Pre-conditions”- Working directory:
arda-frontend-appworktree - Branch created from
main npm installcompleted successfully- All checks pass on the unmodified branch (baseline)
Implementation Steps
Section titled “Implementation Steps”Step 1: Verify No Active Consumers
Section titled “Step 1: Verify No Active Consumers”Before deleting anything, confirm that ItemTable has no active consumers:
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.
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.
Step 2: Delete Dead Code
Section titled “Step 2: Delete Dead Code”- Delete
src/app/items/ItemTable.tsx(REQ-LC-001) - Delete
src/tests/itemTable.test.tsx(REQ-LC-002) - Remove the stale
jest.mockentry referencingItemTableinsrc/tests/items.test.tsx(REQ-LC-003)
Step 3: Remove Dependency
Section titled “Step 3: Remove Dependency”npm uninstall @tanstack/react-tableThis updates both package.json and package-lock.json
(REQ-LC-004).
Step 4: Verify No Remaining References
Section titled “Step 4: Verify No Remaining References”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.jsonAll 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).
Step 5: Run All Checks
Section titled “Step 5: Run All Checks”npm run lintnpx tsc --noEmitnpx jest --no-coverage --watchAll=false --forceExitnpm run buildAll 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.
Step 6: Update CHANGELOG
Section titled “Step 6: Update CHANGELOG”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)Step 7: Commit
Section titled “Step 7: Commit”Stage all changes and commit. This is a single atomic commit covering the complete legacy cleanup.
Quality Guidelines
Section titled “Quality Guidelines”- 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.tsfile is used byItemTableAGGrid— do not remove it.
Acceptance Checklist
Section titled “Acceptance Checklist”-
src/app/items/ItemTable.tsxdeleted -
src/tests/itemTable.test.tsxdeleted - Stale
jest.mockremoved fromsrc/tests/items.test.tsx -
@tanstack/react-tableremoved frompackage.json - No remaining imports of
@tanstack/react-tableinsrc/ -
ItemTableAGGridtests pass - lint, typecheck, unit tests, build all pass
- CHANGELOG updated with
Removedentry
Open Questions and Decisions
Section titled “Open Questions and Decisions”| # | Question | Options | Recommendation | Decision |
|---|---|---|---|---|
| 1 | Should comment references to ItemTable in itemTableConfig.ts and columnPresets.test.tsx be cleaned up? | a) Remove comments, b) Leave as-is | Leave as-is — they provide historical context and reference ItemTableAGGrid, not the deleted component | pending |
Copyright: (c) Arda Systems 2025-2026, All rights reserved
Copyright: © Arda Systems 2025-2026, All rights reserved