Skip to content

Conversation

@hila-f-qodo
Copy link

@hila-f-qodo hila-f-qodo commented Jan 26, 2026

Benchmark PR from qodo-benchmark#415


Open with Devin

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View issue and 3 additional flags in Devin Review.

Open in Devin Review

const isSearchMode = !!searchPluginText
|| filterPluginTags.length > 0
|| (searchMode ?? (!PLUGIN_CATEGORY_WITH_COLLECTIONS.has(activePluginType)))
|| (searchMode ?? (PLUGIN_CATEGORY_WITH_COLLECTIONS.has(activePluginType)))

Choose a reason for hiding this comment

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

🔴 Inverted search mode logic causes incorrect marketplace display

The logic for determining search mode in useMarketplaceSearchMode was inverted by removing the negation operator !.

Click to expand

Original Logic

|| (searchMode ?? (!PLUGIN_CATEGORY_WITH_COLLECTIONS.has(activePluginType)))

New (Buggy) Logic

|| (searchMode ?? (PLUGIN_CATEGORY_WITH_COLLECTIONS.has(activePluginType)))

Impact

The comment at atoms.ts:29-32 states: "Not all categories have collections, so we need to force the search mode for those categories."

  • PLUGIN_CATEGORY_WITH_COLLECTIONS contains ['all', 'tool'] (categories that have collections)
  • Expected behavior: Categories WITHOUT collections (model, agent, extension, datasource, trigger, bundle) should default to search mode (isSearchMode = true)
  • Actual behavior: Categories WITH collections (all, tool) now default to search mode, while categories without collections default to collection view

This causes:

  1. For model, agent, extension, datasource, trigger, bundle categories: The UI will try to render ListWithCollection with empty collections instead of showing search results
  2. For all and tool categories: The UI will show search results instead of the curated collections view

In state.ts:22-24, when isSearchMode is false, queryParams becomes undefined, which means pluginsQuery won't fetch any plugins. The list/index.tsx:30-38 then renders ListWithCollection which expects collections data that doesn't exist for most categories.

Recommendation: Restore the negation operator: change (PLUGIN_CATEGORY_WITH_COLLECTIONS.has(activePluginType)) back to (!PLUGIN_CATEGORY_WITH_COLLECTIONS.has(activePluginType))

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants