Skip to content

Commit 5d4ec8d

Browse files
committed
feat: Update timer display behavior to remain visible permanently in UiProvider and adjust CodeQL commands for performance
1 parent fadfd19 commit 5d4ec8d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/providers/uiProvider.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,14 +1800,14 @@ export class UiProvider implements vscode.WebviewViewProvider {
18001800
<span class="scan-icon">🔍</span>
18011801
<span>Run Local CodeQL Scanner</span>
18021802
</button>
1803-
<span id="scanTimer" class="timer-display" style="display: none;"></span>
1803+
<span id="scanTimer" class="timer-display" style="display: inline;">--</span>
18041804
</div>
18051805
<div class="button-row">
18061806
<button onclick="fetchRemoteAlerts()" id="fetchButton" class="action-button">
18071807
<span class="fetch-icon">🌐</span>
18081808
<span>Fetch Remote Security Alerts</span>
18091809
</button>
1810-
<span id="fetchTimer" class="timer-display" style="display: none;"></span>
1810+
<span id="fetchTimer" class="timer-display" style="display: inline;">--</span>
18111811
</div>
18121812
</div>
18131813
</div>
@@ -2228,7 +2228,8 @@ export class UiProvider implements vscode.WebviewViewProvider {
22282228
const timerEl = document.getElementById(timerId);
22292229
if (timerEl) {
22302230
timerEl.textContent = '';
2231-
timerEl.style.display = 'none';
2231+
// Don't hide the timer display anymore
2232+
timerEl.style.display = 'inline';
22322233
}
22332234
}
22342235
@@ -2455,7 +2456,7 @@ export class UiProvider implements vscode.WebviewViewProvider {
24552456
// Show final duration in timer display
24562457
if (message.duration !== undefined) {
24572458
updateTimerDisplay('scanTimer', message.duration);
2458-
setTimeout(() => clearTimerDisplay('scanTimer'), 5000);
2459+
// Timer will stay visible permanently (no timeout to clear it)
24592460
}
24602461
24612462
showMessage(message.message, !message.success);
@@ -2510,7 +2511,7 @@ export class UiProvider implements vscode.WebviewViewProvider {
25102511
// Show final duration in timer display
25112512
if (message.duration !== undefined) {
25122513
updateTimerDisplay('fetchTimer', message.duration);
2513-
setTimeout(() => clearTimerDisplay('fetchTimer'), 5000);
2514+
// Timer will stay visible permanently (no timeout to clear it)
25142515
}
25152516
25162517
showMessage(message.message, !message.success);

src/services/codeqlService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ export class CodeQLService {
850850
const databasePath = this.getCodeQLDatabase(language);
851851
let source = this.getWorkspaceFolder();
852852

853-
var command = `${codeqlPath} database create --overwrite --language ${language} -s "${source}"`;
853+
var command = `${codeqlPath} database create --overwrite -j 0 --language ${language} -s "${source}"`;
854854
// Add BMN
855855
if (language === "cpp" || language === "csharp" || language === "java") {
856856
command += ` --build-mode=none`;
@@ -925,7 +925,7 @@ export class CodeQLService {
925925
queries += `:codeql-suites/${language}-code-scanning.qls`;
926926
}
927927

928-
var command = `${codeqlPath} database analyze --output "${outputPath}" --format sarif-latest`;
928+
var command = `${codeqlPath} database analyze -j 0 --output "${outputPath}" --format sarif-latest`;
929929
if (threatModel !== "remote") {
930930
command += ` --threat-model ${threatModel}`;
931931
}

0 commit comments

Comments
 (0)