Skip to content

Commit 24804b1

Browse files
authored
Fix UI freeze when rendering CodeScan CVE popups (#4812)
1 parent 9f31cda commit 24804b1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Fix UI freeze that occurs when viewing an Amazon Q code security scanning finding"
4+
}

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/listeners/CodeWhispererCodeScanEditorMouseMotionListener.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import com.intellij.psi.PsiDocumentManager
2323
import com.intellij.ui.JBColor
2424
import com.intellij.ui.awt.RelativePoint
2525
import com.intellij.ui.components.JBScrollPane
26-
import com.intellij.util.TimeoutUtil.sleep
2726
import icons.AwsIcons
2827
import software.amazon.awssdk.services.codewhispererruntime.model.CodeWhispererRuntimeException
2928
import software.aws.toolkits.core.utils.convertMarkdownToHTML
@@ -39,7 +38,6 @@ import software.aws.toolkits.jetbrains.services.codewhisperer.language.CodeWhisp
3938
import software.aws.toolkits.jetbrains.services.codewhisperer.language.programmingLanguage
4039
import software.aws.toolkits.jetbrains.services.codewhisperer.telemetry.CodeWhispererTelemetryService
4140
import software.aws.toolkits.jetbrains.services.codewhisperer.util.CodeWhispererColorUtil.getHexString
42-
import software.aws.toolkits.jetbrains.services.codewhisperer.util.CodeWhispererConstants.CODE_SCAN_ISSUE_POPUP_DELAY_IN_SECONDS
4341
import software.aws.toolkits.jetbrains.services.codewhisperer.util.CodeWhispererConstants.CODE_SCAN_ISSUE_TITLE_MAX_LENGTH
4442
import software.aws.toolkits.jetbrains.services.codewhisperer.util.runIfIdcConnectionOrTelemetryEnabled
4543
import software.aws.toolkits.jetbrains.utils.applyPatch
@@ -377,7 +375,6 @@ class CodeWhispererCodeScanEditorMouseMotionListener(private val project: Projec
377375
// Only add popup if the issue is still valid. If the issue has gone stale or invalid because
378376
// the user has made some edits, we don't need to show the popup for the stale or invalid issues.
379377
if (!issuesInRange.first().isInvalid) {
380-
sleep(CODE_SCAN_ISSUE_POPUP_DELAY_IN_SECONDS)
381378
showPopup(issuesInRange, e)
382379
}
383380
}

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererConstants.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ object CodeWhispererConstants {
6666
const val TOTAL_SECONDS_IN_MINUTE: Long = 60L
6767
const val ACCOUNTLESS_START_URL = "accountless"
6868
const val FEATURE_CONFIG_POLL_INTERVAL_IN_MS: Long = 30 * 60 * 1000L // 30 mins
69-
const val CODE_SCAN_ISSUE_POPUP_DELAY_IN_SECONDS: Long = 1500 // 1.5 seconds
7069
const val USING: String = "using"
7170
const val GLOBAL_USING: String = "global using"
7271
const val STATIC: String = "static"

0 commit comments

Comments
 (0)