fix: wizard UI stops updating when opened as modal dialog (CRW-12139) - #358
fix: wizard UI stops updating when opened as modal dialog (CRW-12139)#358vrubezhny wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe changes replace IntelliJ UI scheduling helpers with explicit EDT dispatch and ChangesEDT modality scheduling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #358 +/- ##
==========================================
+ Coverage 0.00% 34.14% +34.14%
==========================================
Files 4 113 +109
Lines 26 4809 +4783
Branches 0 920 +920
==========================================
+ Hits 0 1642 +1642
- Misses 26 2931 +2905
- Partials 0 236 +236 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/kotlin/com/redhat/devtools/gateway/devworkspace/DevWorkspaceWatcher.kt`:
- Line 60: Move the createFilter(namespace) call out of the
withContext(Dispatchers.EDT + ModalityState.any().asContextElement()) block in
DevWorkspaceWatcher, ensuring createIdeaEditorFilter and its blocking
getTemplateMap lookup run on a background context before the EDT UI update. Keep
only the UI mutation inside the EDT context and preserve the existing
ADDED-event behavior.
In
`@src/main/kotlin/com/redhat/devtools/gateway/view/steps/DevSpacesWorkspacesStepView.kt`:
- Around line 537-560: Update refreshDevWorkspace so the background
DevWorkspaces.get() call remains off the EDT, but dispatch all listDWDataModel
index lookups, assignments, and dependent enableButtons() calls through
ApplicationManager.getApplication().invokeLater(...). Keep the existing worker
error handling and ensure model writes cannot overlap watch callbacks or full
refresh operations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6b12bdbd-0acf-4e74-a08b-31ca2d3aa819
📒 Files selected for processing (3)
src/main/kotlin/com/redhat/devtools/gateway/devworkspace/DevWorkspaceWatcher.ktsrc/main/kotlin/com/redhat/devtools/gateway/view/steps/DevSpacesServerStepView.ktsrc/main/kotlin/com/redhat/devtools/gateway/view/steps/DevSpacesWorkspacesStepView.kt
The server selection and workspace selection wizard pages use EDT dispatch (invokeLater, runInEdt, withContext(Dispatchers.EDT)) to update UI components — cluster dropdown, DevWorkspace list, button states, and workspace status icons. These calls default to ModalityState.nonModal(), which defers execution until the modal dialog closes. This causes the UI to freeze when the wizard runs as a modal dialog (File -> Remote Development -> Connect to Dev Spaces), while working fine in non-modal mode (Run Plugin task). Use ModalityState.any() for all EDT dispatch in the wizard steps and the DevWorkspaceWatcher so that UI updates execute regardless of the current modal context. Also move the blocking createFilter(namespace) call in DevWorkspaceWatcher out of the EDT context to avoid freezing the UI on ADDED events, and dispatch refreshDevWorkspace model writes to EDT to prevent races with watch callbacks. Fixes: https://redhat.atlassian.net/browse/CRW-12139 Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com> Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
6ca7089 to
d2e12a6
Compare
The server selection and workspace selection wizard pages use EDT dispatch (invokeLater, runInEdt, withContext(Dispatchers.EDT)) to update UI components — cluster dropdown, DevWorkspace list, button states, and workspace status icons. These calls default to ModalityState.nonModal(), which defers execution until the modal dialog closes. This causes the UI to freeze when the wizard runs as a modal dialog (File -> Remote Development -> Connect to Dev Spaces), while working fine in non-modal mode (Run Plugin task).
Use ModalityState.any() for all EDT dispatch in the wizard steps and the DevWorkspaceWatcher so that UI updates execute regardless of the current modal context.
Fixes: https://redhat.atlassian.net/browse/CRW-12139
Assisted-By: Claude Opus 4.6 noreply@anthropic.com