Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 26, 2025

This PR fixes issue #6234 where Roo Code would completely lock up on startup, showing only a scrolling bar at the top and a blank screen.

Problem

The webview was returning null when didHydrateState was false, resulting in a blank screen if the extension was slow to respond with the initial state. This left users with an unresponsive plugin.

Solution

  1. Created LoadingScreen component - Shows a proper loading state with VS Code progress ring instead of blank screen
  2. Added timeout handling - Displays a message when loading takes longer than expected (10 seconds)
  3. Implemented retry logic - Both App and ExtensionStateContext now retry sending the initialization message if no response is received within 2 seconds
  4. Changed rendering behavior - App now renders LoadingScreen instead of null when waiting for state hydration

Testing

  • All existing tests pass
  • The loading screen provides immediate visual feedback
  • Retry mechanism ensures the extension eventually connects even if the initial message is missed
  • Timeout message helps users understand when something might be wrong

Fixes #6234


Important

Fixes webview lockup on startup by adding a loading screen, timeout handling, and retry logic in App.tsx, LoadingScreen.tsx, and ExtensionStateContext.tsx.

  • Behavior:
    • App.tsx: Renders LoadingScreen instead of null when didHydrateState is false.
    • LoadingScreen.tsx: New component with a progress ring and optional timeout message.
    • ExtensionStateContext.tsx: Implements retry logic for webviewDidLaunch message if no response in 2 seconds.
  • Timeout Handling:
    • App.tsx: Shows timeout message after 5 seconds if state not hydrated.
    • App.tsx: Retries sending webviewDidLaunch after 3 seconds if state not hydrated.
  • Testing:
    • All existing tests pass.
    • Loading screen provides immediate feedback.
    • Retry mechanism ensures eventual connection.
    • Timeout message informs users of potential issues.

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

…startup

- Created LoadingScreen component to show proper loading state instead of blank screen
- Added timeout handling to show message when loading takes longer than expected
- Implemented retry logic in App and ExtensionStateContext to resend initialization message
- Changed App to render LoadingScreen instead of null when waiting for state hydration

This fixes the issue where the webview would show a blank screen indefinitely if the
extension was slow to respond with the initial state.

Fixes #6234
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 26, 2025 02:32
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jul 26, 2025
@roomote roomote bot mentioned this pull request Jul 26, 2025
}

export const LoadingScreen: React.FC<LoadingScreenProps> = ({
message = "Loading Roo Code...",
Copy link
Contributor

Choose a reason for hiding this comment

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

User-facing text ('Loading Roo Code...' and 'Taking longer than expected...') is hardcoded. Consider using translation functions to support internationalization as per our guidelines.

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

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

Not sure if it works but closing for now while we scope the issue

@daniel-lxs daniel-lxs closed this Jul 28, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 28, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 28, 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:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

roo code completely locked up

4 participants