Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Jun 20, 2025

Description

Fixes #4817

This PR resolves the marketplace timeout issues that were causing UI freezes and preventing installed MCPs from being displayed correctly.

Changes Made

  • Separated marketplace data fetching from main state updates in ClineProvider.ts

    • Removed direct calls to marketplace fetching from getStateToPostToWebview()
    • Added new fetchMarketplaceData() method for async marketplace data retrieval
  • Implemented lazy loading for marketplace items

    • Marketplace data is now fetched only when the marketplace tab is accessed
    • Added fetchMarketplaceData message type to trigger data loading
  • Fixed marketplaceInstalledMetadata display issue

    • Added proper state management in ExtensionStateContext.tsx
    • Ensured metadata is correctly propagated to components
  • Enhanced error handling

    • Marketplace timeouts no longer block core functionality
    • UI remains responsive even in restricted network environments

Testing

  • All existing tests pass
  • Added tests for marketplace functionality
  • Manual testing completed:
    • Verified marketplace loads only when tab is accessed
    • Confirmed installed MCPs are displayed correctly
    • Tested in restricted network environment - no UI freezes
    • Verified core functionality works without marketplace access

Verification of Acceptance Criteria

  • Marketplace timeout errors no longer freeze the UI
  • Installed MCPs are correctly displayed with their metadata
  • Marketplace data is fetched lazily only when needed
  • Core functionality remains unaffected by marketplace issues

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic
  • No breaking changes
  • All tests passing
  • Linting and type checking pass

Important

This PR resolves marketplace timeout issues by separating data fetching from state updates, implementing lazy loading, and enhancing error handling to ensure UI responsiveness and correct display of installed MCPs.

  • Behavior:
    • Separate marketplace data fetching from main state updates in ClineProvider.ts.
    • Add fetchMarketplaceData() for async data retrieval.
    • Implement lazy loading for marketplace items, fetching data only when the tab is accessed.
    • Add fetchMarketplaceData message type to trigger data loading.
  • State Management:
    • Fix marketplaceInstalledMetadata display issue in ExtensionStateContext.tsx.
    • Ensure metadata is correctly propagated to components.
  • Error Handling:
    • Enhance error handling to prevent marketplace timeouts from blocking core functionality.
    • Maintain UI responsiveness in restricted network environments.
  • Testing:
    • Add tests for marketplace functionality.
    • Verify marketplace loads only when tab is accessed and installed MCPs display correctly.
    • Test in restricted network environments to ensure no UI freezes.

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

…4817)

- Separate marketplace data fetching from main state updates
- Add lazy loading for marketplace items to prevent UI freezes
- Fix marketplaceInstalledMetadata not being displayed correctly
- Add dedicated fetchMarketplaceData mechanism triggered only when needed
- Ensure marketplace timeouts don't block core functionality

This prevents the 'timeout of 10000ms exceeded' error and UI freezes in restricted network environments by fetching marketplace data asynchronously only when the marketplace tab is accessed.
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners June 20, 2025 15:52
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jun 20, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 20, 2025
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

Loading on demand does seem a lot nicer, thanks!

Not a blocker, but it might be nice to have a loading state that showed a spinner on the first load.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 20, 2025
@daniel-lxs
Copy link
Member Author

@mrubens
Let me do that!

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 20, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Jun 20, 2025
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 20, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jun 20, 2025
@daniel-lxs daniel-lxs moved this from PR [Draft / In Progress] to PR [Needs Review] in Roo Code Roadmap Jun 20, 2025
@mrubens mrubens merged commit 9a5f6ce into main Jun 20, 2025
12 of 13 checks passed
@mrubens mrubens deleted the fix/issue-4817-marketplace-timeout branch June 20, 2025 17:20
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 20, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jun 20, 2025
@indiesewell
Copy link

Hello, do we still need to request the MCP market API every time we talk to AI? I haven't used the MCP function yet, so I'm confused. After installing MCP from the market, isn't it local? Do we still need to request the Roocode API every time we talk to it? If not, can the installation of the MCP market be completely separated from our main workflow? Otherwise, it will put a lot of pressure on the Roocode server and slow down the response speed of each chat.

@daniel-lxs
Copy link
Member Author

Hey @indiesewell, that's what this PR aimed to do, the state of the marketplace is now fetched on demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review 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.

Failed to load marketplace items: AxiosError: timeout of 10000ms exceeded

5 participants