Skip to content

refactor: clean up imports and remove unused code across multiple components#255

Merged
Roopan-Microsoft merged 2 commits into
devfrom
code-quality
May 29, 2026
Merged

refactor: clean up imports and remove unused code across multiple components#255
Roopan-Microsoft merged 2 commits into
devfrom
code-quality

Conversation

@Kanchan-Microsoft

Copy link
Copy Markdown
Contributor

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:

  • Removed the checkConnection function from main.jsx, which was previously used for backend connectivity checks but is no longer needed.
  • Deleted the ProcessingStage and Agents enums from modernizationPage.tsx as they are not referenced elsewhere.
  • Simplified the file fetch logic in modernizationPage.tsx by removing an unused variable.
  • Removed the extraction of blocking info from the progress modal, as the value was not being used.

Import and state handling simplifications:

  • Cleaned up unused imports in batchHistoryPanel.tsx, bottomBar.tsx, landingPage.tsx, modernizationPage.tsx, and processPage.tsx for more concise and maintainable files.
  • Updated utility imports in batchView.tsx to only include those in use.
  • Refactored state handling in landingPage.tsx by removing an unused upload state and updating the handler to a placeholder for potential future use.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Copilot AI review requested due to automatic review settings May 22, 2026 11:31
@Kanchan-Microsoft Kanchan-Microsoft changed the title refactor: clean up imports and remove unused code across multiple com… refactor: clean up imports and remove unused code across multiple components May 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread src/frontend/src/components/batchHistoryPanel.tsx Outdated
Comment thread src/frontend/src/pages/batchView.tsx Outdated
Comment thread src/frontend/src/pages/modernizationPage.tsx Outdated
@Roopan-Microsoft Roopan-Microsoft merged commit dcd6040 into dev May 29, 2026
10 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.1.1 🎉

The release is available on GitHub release

Your semantic-release 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.

3 participants