File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -910,8 +910,8 @@ export class QueryHistoryManager extends DisposableObject {
910910 // show original query file on double click
911911 await this . handleOpenQuery ( finalSingleItem , [ finalSingleItem ] ) ;
912912 } else {
913- // show results on single click only if query is completed successfully.
914- if ( finalSingleItem . status === QueryStatus . Completed ) {
913+ // show results on single click ( if results view is available)
914+ if ( finalSingleItem . t === 'variant-analysis' || finalSingleItem . status === QueryStatus . Completed ) {
915915 await this . openQueryResults ( finalSingleItem ) ;
916916 }
917917 }
@@ -1439,9 +1439,10 @@ the file in the file explorer and dragging it into the workspace.`
14391439 private async openQueryResults ( item : QueryHistoryInfo ) {
14401440 if ( item . t === 'local' ) {
14411441 await this . localQueriesResultsView . showResults ( item as CompletedLocalQueryInfo , WebviewReveal . Forced , false ) ;
1442- }
1443- else if ( item . t === 'remote' ) {
1442+ } else if ( item . t === 'remote' ) {
14441443 await this . remoteQueriesManager . openRemoteQueryResults ( item . queryId ) ;
1444+ } else if ( item . t === 'variant-analysis' ) {
1445+ await this . variantAnalysisManager . showView ( item . variantAnalysis . id ) ;
14451446 }
14461447 }
14471448}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import { CodeQLCliServer } from '../cli';
2525import { getControllerRepo } from './run-remote-query' ;
2626import { processUpdatedVariantAnalysis } from './variant-analysis-processor' ;
2727import PQueue from 'p-queue' ;
28- import { createTimestampFile } from '../helpers' ;
28+ import { createTimestampFile , showAndLogErrorMessage } from '../helpers' ;
2929import { QueryStatus } from '../query-status' ;
3030import * as fs from 'fs-extra' ;
3131
@@ -73,6 +73,9 @@ export class VariantAnalysisManager extends DisposableObject implements VariantA
7373 }
7474
7575 public async showView ( variantAnalysisId : number ) : Promise < void > {
76+ if ( ! this . variantAnalyses . get ( variantAnalysisId ) ) {
77+ void showAndLogErrorMessage ( `No variant analysis found with id: ${ variantAnalysisId } .` ) ;
78+ }
7679 if ( ! this . views . has ( variantAnalysisId ) ) {
7780 // The view will register itself with the manager, so we don't need to do anything here.
7881 this . push ( new VariantAnalysisView ( this . ctx , variantAnalysisId , this ) ) ;
You can’t perform that action at this time.
0 commit comments