Backup commit before executing remove-unused-code proposal. This includes all pending changes and new features. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
62 lines
3.0 KiB
Markdown
62 lines
3.0 KiB
Markdown
## REMOVED Requirements
|
|
|
|
### Requirement: Legacy OCR Service Implementation
|
|
|
|
**Reason**: `ocr_service_original.py` was the original OCR service implementation that has been completely superseded by the current `ocr_service.py`. The legacy file is no longer referenced by any part of the codebase.
|
|
|
|
**Migration**: No migration needed. The current `ocr_service.py` provides all required functionality with improved architecture.
|
|
|
|
#### Scenario: Legacy service file removal
|
|
- **WHEN** the legacy `ocr_service_original.py` file is removed
|
|
- **THEN** the system continues to function normally using `ocr_service.py`
|
|
- **AND** no import errors occur in any service or router
|
|
|
|
### Requirement: Unused Preprocessor Service
|
|
|
|
**Reason**: `preprocessor.py` was a document preprocessor that is no longer used. Its functionality has been absorbed by `layout_preprocessing_service.py`.
|
|
|
|
**Migration**: No migration needed. The preprocessing functionality is available through `layout_preprocessing_service.py`.
|
|
|
|
#### Scenario: Preprocessor file removal
|
|
- **WHEN** the unused `preprocessor.py` file is removed
|
|
- **THEN** the system continues to function normally
|
|
- **AND** layout preprocessing works correctly via `layout_preprocessing_service.py`
|
|
|
|
### Requirement: Unused PDF Font Manager
|
|
|
|
**Reason**: `pdf_font_manager.py` was intended for font management but is not referenced by `pdf_generator_service.py` or any other service.
|
|
|
|
**Migration**: No migration needed. Font handling is managed within `pdf_generator_service.py` directly.
|
|
|
|
#### Scenario: Font manager file removal
|
|
- **WHEN** the unused `pdf_font_manager.py` file is removed
|
|
- **THEN** PDF generation continues to work correctly
|
|
- **AND** fonts are rendered properly in generated PDFs
|
|
|
|
### Requirement: Legacy Frontend Components
|
|
|
|
**Reason**: `MarkdownPreview.tsx` and `ResultsTable.tsx` are frontend components that are not referenced by any page or component in the application.
|
|
|
|
**Migration**: No migration needed. `MarkdownPreview` functionality is not currently used. `ResultsTable` functionality has been replaced by `TaskHistoryPage`.
|
|
|
|
#### Scenario: Unused frontend component removal
|
|
- **WHEN** the unused `MarkdownPreview.tsx` and `ResultsTable.tsx` files are removed
|
|
- **THEN** the frontend application compiles successfully
|
|
- **AND** all pages render and function correctly
|
|
|
|
### Requirement: Legacy API Client Migration
|
|
|
|
**Reason**: `services/api.ts` and `types/api.ts` are legacy API client files with only 2 remaining references. These should be migrated to `apiV2` for consistency.
|
|
|
|
**Migration**:
|
|
1. Move `ExportRule` type to `types/apiV2.ts`
|
|
2. Add export rules API functions to `services/apiV2.ts`
|
|
3. Update `SettingsPage.tsx` and `Layout.tsx` to use apiV2
|
|
4. Remove legacy api.ts files
|
|
|
|
#### Scenario: Legacy API client removal after migration
|
|
- **WHEN** the legacy `api.ts` files are removed after migration
|
|
- **THEN** all API calls use the unified `apiV2` client
|
|
- **AND** `SettingsPage` export rules functionality works correctly
|
|
- **AND** `Layout` logout functionality works correctly
|