Copilot commented on code in PR #3653:
URL: https://github.com/apache/texera/pull/3653#discussion_r2268517606
##########
core/gui/src/app/dashboard/component/dashboard.component.ts:
##########
@@ -220,6 +221,11 @@ export class DashboardComponent implements OnInit {
}
}
+ isWorkflowTabActive(): boolean {
+ const currentRoute = this.router.url;
+ return currentRoute.includes(DASHBOARD_USER_WORKFLOW) ||
currentRoute.includes(DASHBOARD_USER_WORKSPACE);
Review Comment:
Using `includes()` for route matching can lead to false positives. For
example, if DASHBOARD_USER_WORKFLOW is '/workflow' and the current route is
'/my-workflow-test', it would incorrectly match. Consider using `startsWith()`
or more precise route matching logic.
```suggestion
return currentRoute.startsWith(DASHBOARD_USER_WORKFLOW) ||
currentRoute.startsWith(DASHBOARD_USER_WORKSPACE);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]