fix(amazonq): improve file change notifications and error handling#6176
Open
amit-lulla wants to merge 4 commits intoaws:mainfrom
Open
fix(amazonq): improve file change notifications and error handling#6176amit-lulla wants to merge 4 commits intoaws:mainfrom
amit-lulla wants to merge 4 commits intoaws:mainfrom
Conversation
Fixes aws#6039 This commit addresses two related issues: 1. IllegalStateException: "You don't have access to the resource" - Modified listRegionProfiles() to return null for empty profiles instead of throwing an IllegalStateException - Updated callers to handle null/empty profiles gracefully 2. EDT Threading Violation when selecting Q profile - Wrapped QRegionProfileDialog.show() in runInEdt to ensure dialog is shown on Event Dispatch Thread - Made AsyncComboBox.repaint() calls EDT-safe using invokeLater Files changed: - QRegionProfileManager.kt: Return null for empty profiles - ChatCommunicationManager.kt: Add runInEdt wrapper for dialog - CodeWhispererModelConfigurator.kt: Handle null profiles gracefully - QRegionProfileDialog.kt: Handle empty profiles with telemetry - AsyncComboBox.kt: EDT-safe repaint calls
- Fix VFS refresh in LspEditorUtil to save documents and refresh IDE after workspace edits are applied - Use synchronous VFS refresh in AmazonQLanguageClientImpl for immediate file change detection - Add handleChatResponse helper in BrowserConnector to properly log errors instead of silently ignoring them
ashishrp-aws
approved these changes
Jan 13, 2026
manodnyab
reviewed
Jan 14, 2026
| removeAllItems() | ||
| repaint() | ||
| // Ensure repaint happens on EDT for thread safety | ||
| ApplicationManager.getApplication().invokeLater { repaint() } |
Contributor
There was a problem hiding this comment.
Can we please add to the description what is the error that we get here?
| ?: error("Attempted to fetch profiles while there does not exist") | ||
| // Return empty list when no profiles available instead of throwing | ||
| if (profiles.isNullOrEmpty()) { | ||
| return@calculateIfIamIdentityCenterConnection emptyList() |
Contributor
There was a problem hiding this comment.
This is not expected behavior. We need a profile to proceed
Contributor
There was a problem hiding this comment.
What happens in the case of null profiles?
| mappedProfiles.takeIf { it.isNotEmpty() }?.also { | ||
| connectionIdToProfileCount[connection.id] = it.size | ||
| } ?: error("You don't have access to the resource") | ||
| // Return null for empty profiles instead of throwing, let callers handle gracefully |
Contributor
There was a problem hiding this comment.
We need profiles for using the feature
…ments - Add descriptive comments to AsyncComboBox explaining EDT threading errors - Add debug logging when no profiles available for customization listing - Improve null profile handling in QRegionProfileManager with clear logging - Document that profiles are required for Q features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
File change notifications:
Error handling:
handleChatResponsehelper to log errors instead of silently ignoring themTest plan