refactor: clean up imports and remove unused code across multiple components#255
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR focuses on frontend refactoring/cleanup by removing unused code paths and trimming imports to reduce technical debt and improve readability without changing intended behavior.
Changes:
- Removed unused enums and variables, and simplified some fetch/state-handling code paths.
- Cleaned up unused imports across multiple pages/components.
- Removed an obsolete backend connectivity helper from the frontend entrypoint.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/src/pages/processPage.tsx | Removes unused Fluent UI imports. |
| src/frontend/src/pages/modernizationPage.tsx | Removes unused React hook imports, deletes unused enums, and adjusts file-fetch code. |
| src/frontend/src/pages/landingPage.tsx | Removes unused upload state and simplifies the upload state-change handler. |
| src/frontend/src/pages/batchView.tsx | Narrows ../api/utils imports to (mostly) only what’s used. |
| src/frontend/src/main.jsx | Removes unused checkConnection helper. |
| src/frontend/src/components/bottomBar.tsx | Removes unused useNavigate import. |
| src/frontend/src/components/batchHistoryPanel.tsx | Cleans React imports (but currently introduces a missing useRef import). |
| src/frontend/src/commonComponents/ProgressModal/progressModal.tsx | Removes unused “blocking” extraction logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Roopan-Microsoft
approved these changes
May 29, 2026
|
🎉 This PR is included in version 2.1.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request primarily removes unused code, cleans up imports, and simplifies state handling across several frontend files. The changes aim to reduce technical debt and improve code readability without impacting core functionality.
Code cleanup and removal of unused logic:
checkConnectionfunction frommain.jsx, which was previously used for backend connectivity checks but is no longer needed.ProcessingStageandAgentsenums frommodernizationPage.tsxas they are not referenced elsewhere.modernizationPage.tsxby removing an unused variable.Import and state handling simplifications:
batchHistoryPanel.tsx,bottomBar.tsx,landingPage.tsx,modernizationPage.tsx, andprocessPage.tsxfor more concise and maintainable files.batchView.tsxto only include those in use.landingPage.tsxby removing an unused upload state and updating the handler to a placeholder for potential future use.Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information