Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 28, 2025

This PR fixes the grey screen issue reported in #6283 where the Roo Code interface becomes unresponsive with a grey overlay.

Problem

The issue occurs when dialog components (HumanRelayDialog, DeleteMessageDialog, or EditMessageDialog) get stuck in an open state without their content rendering properly, leaving only the semi-transparent grey overlay visible.

Solution

Implemented a multi-layered recovery mechanism:

  1. Automatic Recovery: Added a 30-second timeout that automatically closes any stuck dialogs
  2. Error Boundaries: Created DialogErrorBoundary component to catch and handle errors in dialog content
  3. Manual Recovery: Added Escape key handler for users to manually close stuck dialogs
  4. Telemetry: Added logging to track when dialog recovery is triggered for debugging

Changes

  • Modified webview-ui/src/App.tsx to add recovery mechanisms
  • Created webview-ui/src/components/ui/DialogErrorBoundary.tsx for error handling
  • Wrapped all dialog components with error boundaries

Testing

  • All existing tests pass ✅
  • Linting and type checking pass ✅
  • The recovery mechanism will activate if any dialog remains open for 30 seconds
  • Users can press Escape to manually recover from stuck dialogs

Fixes #6283


Important

Introduces a dialog recovery mechanism in App.tsx to prevent grey screen issues by adding automatic, manual, and error boundary-based solutions.

  • Behavior:
    • Adds a 30-second timeout in App.tsx to automatically close stuck dialogs (HumanRelayDialog, DeleteMessageDialog, EditMessageDialog).
    • Implements DialogErrorBoundary in DialogErrorBoundary.tsx to catch and handle errors in dialog content.
    • Adds Escape key handler in App.tsx for manual dialog closure.
    • Logs telemetry events when dialog recovery is triggered.
  • Components:
    • Wraps MemoizedHumanRelayDialog, MemoizedDeleteMessageDialog, and MemoizedEditMessageDialog with DialogErrorBoundary in App.tsx.
  • Testing:
    • All existing tests pass.
    • Linting and type checking pass.

This description was created by Ellipsis for c0d462b. You can customize this summary. It will automatically update as commits are pushed.

- Added 30-second timeout to automatically close stuck dialogs
- Added DialogErrorBoundary component to catch errors in dialog content
- Added Escape key handler for manual dialog recovery
- Wrapped all dialog components with error boundaries

This prevents the grey screen issue when dialogs get stuck in an open state
without their content rendering properly.

Fixes #6283
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 28, 2025 05:42
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jul 28, 2025
@roomote roomote bot mentioned this pull request Jul 28, 2025
setEditMessageDialogState({ isOpen: false, messageTs: 0, text: "", images: [] })

// Log telemetry for debugging
telemetryClient.capture("dialog_recovery_triggered", {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Telemetry Logging Order: Consider moving the telemetryClient.capture call before resetting the dialog states so that you log the actual stuck state values. This can help in debugging issues more precisely.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 28, 2025
@daniel-lxs
Copy link
Member

Issue is not properly scoped

@daniel-lxs daniel-lxs closed this Jul 29, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Roo Screen goes grey

4 participants