@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChange
22import { ActivatedRoute , Router } from '@angular/router' ;
33import { ToggleSwitchChangeEvent } from 'primeng/toggleswitch' ;
44import { getQueryParams } from 'src/app/_helpers/router-helpers' ;
5- import { CodeLineRowNavigationDirection , FULL_DIFF_STYLE , getAIReviewNotifiationInfo , mapLanguageAliases , TREE_DIFF_STYLE } from 'src/app/_helpers/common-helpers' ;
5+ import { CodeLineRowNavigationDirection , FULL_DIFF_STYLE , getAIReviewNotificationInfo , mapLanguageAliases , TREE_DIFF_STYLE } from 'src/app/_helpers/common-helpers' ;
66import { Review } from 'src/app/_models/review' ;
77import { APIRevision } from 'src/app/_models/revision' ;
88import { ConfigService } from 'src/app/_services/config/config.service' ;
@@ -577,7 +577,7 @@ export class ReviewPageOptionsComponent implements OnInit, OnChanges {
577577 this . aiReviewGenerationState = 'Failed' ;
578578 this . generateAIReviewButtonText = 'Failed to generate copilot review' ;
579579 }
580- const notificationInfo = getAIReviewNotifiationInfo ( aiReviewUpdate , window . location . origin ) ;
580+ const notificationInfo = getAIReviewNotificationInfo ( aiReviewUpdate , window . location . origin ) ;
581581 if ( notificationInfo ) {
582582 if ( aiReviewUpdate . apirevisionId === this . activeAPIRevision ?. id ) {
583583 this . messageService . add ( notificationInfo [ 1 ] ) ;
@@ -642,7 +642,10 @@ export class ReviewPageOptionsComponent implements OnInit, OnChanges {
642642 }
643643
644644 getPullRequestsOfAssociatedAPIRevisionsUrl ( pr : PullRequestModel ) {
645- return `${ window . location . origin } /review/${ pr . reviewId } ?activeApiRevisionId=${ pr . apiRevisionId } ` ;
645+ const baseHref = document . querySelector ( 'base' ) ?. getAttribute ( 'href' ) || '/' ;
646+ const cleanOrigin = window . location . origin . replace ( / \/ $ / , '' ) ;
647+ const cleanBaseHref = baseHref . replace ( / \/ $ / , '' ) ;
648+ return `${ cleanOrigin } ${ cleanBaseHref } /review/${ pr . reviewId } ?activeApiRevisionId=${ pr . apiRevisionId } ` ;
646649 }
647650
648651 /**
0 commit comments