@@ -117,6 +117,11 @@ export class NxCloudFixComponent extends LitElement {
117
117
flex-shrink: 0;
118
118
}
119
119
120
+ .cipe-link {
121
+ cursor: pointer;
122
+ color: var(--vscode-button-primaryForeground);
123
+ }
124
+
120
125
.branch-badge {
121
126
background-color: var(--vscode-button-secondaryBackground);
122
127
color: var(--vscode-button-secondaryForeground);
@@ -649,6 +654,8 @@ export class NxCloudFixComponent extends LitElement {
649
654
}
650
655
651
656
.loading-dots {
657
+ width: 24px;
658
+ text-align: left;
652
659
display: inline-block;
653
660
}
654
661
@@ -741,7 +748,7 @@ export class NxCloudFixComponent extends LitElement {
741
748
< p class ="explanation-text " style ="margin-top: 8px; ">
742
749
You can
743
750
< span class ="diff-link " @click ="${ ( ) => this . handleShowDiff ( ) } ">
744
- review the resulting git diff of the suggested changes </ span
751
+ review the resulting git diff of the suggested changes</ span
745
752
> and choose to apply or reject them.
746
753
</ p >
747
754
</ div >
@@ -786,6 +793,14 @@ export class NxCloudFixComponent extends LitElement {
786
793
> </ path >
787
794
</ svg >
788
795
Nx Cloud AI Fix
796
+ < a
797
+ class ="cipe-link "
798
+ target ="_blank "
799
+ href ="${ cipe . cipeUrl } "
800
+ title ="View CI Pipeline Execution "
801
+ >
802
+ < icon-element icon ="link-external "> </ icon-element >
803
+ </ a >
789
804
</ h1 >
790
805
< div class ="branch-badge ">
791
806
< icon-element icon ="git-branch "> </ icon-element >
@@ -861,19 +876,7 @@ export class NxCloudFixComponent extends LitElement {
861
876
return html `
862
877
< div class ="creating-fix-section ">
863
878
< div class ="creating-fix-icon ">
864
- < svg
865
- class ="codicon-modifier-spin "
866
- role ="img "
867
- xmlns ="http://www.w3.org/2000/svg "
868
- stroke ="currentColor "
869
- fill ="none "
870
- stroke-width ="2 "
871
- viewBox ="0 0 24 24 "
872
- >
873
- < path
874
- d ="M12 2v4m0 12v4m10-10h-4M6 12H2m15.364-6.364l-2.828 2.828M9.464 14.536l-2.828 2.828m12.728 0l-2.828-2.828M9.464 9.464L6.636 6.636 "
875
- />
876
- </ svg >
879
+ < i class ="codicon codicon-loading codicon-modifier-spin "> </ i >
877
880
</ div >
878
881
< h2 class ="creating-fix-title ">
879
882
Creating Fix< span class ="loading-dots "> </ span >
@@ -971,30 +974,40 @@ export class NxCloudFixComponent extends LitElement {
971
974
}
972
975
973
976
private getStatusSection ( aiFix : NxAiFix ) : TemplateResult {
974
- if ( ! aiFix . suggestedFix ) {
977
+ const hasAiFix = ! ! aiFix . suggestedFix ;
978
+
979
+ if ( ! hasAiFix && aiFix . validationStatus === 'NOT_STARTED' ) {
975
980
// Show creating fix state
976
981
return this . getCreatingFixSection ( ) ;
977
982
}
978
983
984
+ // if the fix creation failed, show the proper error state
985
+ if ( ! hasAiFix && aiFix . validationStatus === 'FAILED' ) {
986
+ return html `
987
+ < div class ="creating-fix-section ">
988
+ < div class ="creating-fix-icon ">
989
+ < i
990
+ class ="codicon codicon-error "
991
+ style ="color: var(--error-color); "
992
+ > </ i >
993
+ </ div >
994
+ < h2 class ="creating-fix-title "> Fix Creation Failed</ h2 >
995
+ < p class ="creating-fix-description ">
996
+ Nx Cloud was unable to generate a fix for the error. You can try
997
+ running the task again or investigate the issue manually on the Nx
998
+ Cloud UI
999
+ </ p >
1000
+ </ div >
1001
+ ` ;
1002
+ }
1003
+
979
1004
// Fix exists, show verification status
980
1005
switch ( aiFix . validationStatus ) {
981
1006
case 'IN_PROGRESS' :
982
1007
return html `
983
1008
< div class ="creating-fix-section ">
984
1009
< div class ="creating-fix-icon ">
985
- < svg
986
- class ="codicon-modifier-spin "
987
- role ="img "
988
- xmlns ="http://www.w3.org/2000/svg "
989
- stroke ="currentColor "
990
- fill ="none "
991
- stroke-width ="2 "
992
- viewBox ="0 0 24 24 "
993
- >
994
- < path
995
- d ="M12 2v4m0 12v4m10-10h-4M6 12H2m15.364-6.364l-2.828 2.828M9.464 14.536l-2.828 2.828m12.728 0l-2.828-2.828M9.464 9.464L6.636 6.636 "
996
- />
997
- </ svg >
1010
+ < i class ="codicon codicon-loading codicon-modifier-spin "> </ i >
998
1011
</ div >
999
1012
< h2 class ="creating-fix-title ">
1000
1013
Verifying Fix< span class ="loading-dots "> </ span >
0 commit comments