bugfix: fix circular dep issues by creating separate enums - #8652
Closed
Yuri-510 wants to merge 1 commit into
Closed
bugfix: fix circular dep issues by creating separate enums#8652Yuri-510 wants to merge 1 commit into
Yuri-510 wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces circular-dependency risk in the Angular portal by extracting route-related enums out of app.routes.ts into dedicated enum files, and updating selected consumers to import those enums directly.
Changes:
- Moved
AppRoutesintointerfaces/portal/src/app/enums/app-routes.enum.ts. - Moved
ProgramMonitoringPathsintointerfaces/portal/src/app/enums/program-monitoring-paths.enum.ts. - Updated auth/MSAL-related code to import
AppRoutesfrom the new enum location (and re-exported enums fromapp.routes.tsfor backwards compatibility).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| interfaces/portal/src/app/services/auth/strategies/msal-auth/msal-auth.strategy.ts | Switches AppRoutes import to the extracted enum file. |
| interfaces/portal/src/app/services/auth/strategies/msal-auth/msal-auth.app-providers.ts | Switches AppRoutes import to the extracted enum file. |
| interfaces/portal/src/app/services/auth.service.ts | Switches AppRoutes import to the extracted enum file (helps break auth↔routes cycles). |
| interfaces/portal/src/app/enums/program-monitoring-paths.enum.ts | New enum file for monitoring nested route segments. |
| interfaces/portal/src/app/enums/app-routes.enum.ts | New enum file for top-level route segments. |
| interfaces/portal/src/app/app.routes.ts | Removes inline enums, imports them from new files, and re-exports them for compatibility. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+15
to
+16
| export { AppRoutes } from '~/enums/app-routes.enum'; | ||
| export { ProgramMonitoringPaths } from '~/enums/program-monitoring-paths.enum'; |
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.
AB#XXXX
Describe your changes
fix circular dep issues by creating separate enums.
Checklist before requesting a code review
Portal preview-deployment
https://happy-rock-0411d2003-8652.westeurope.3.azurestaticapps.net