Skip to content

refactor: always preserve marketplace search state in URL - #22

Open
hila-f-qodo wants to merge 2 commits into
devin_pr_code_review_bench_100_devin2_base_refactor_always_preserve_marketplace_search_state_in_url_pr415from
devin_pr_code_review_bench_100_devin2_head_refactor_always_preserve_marketplace_search_state_in_url_pr415
Open

refactor: always preserve marketplace search state in URL#22
hila-f-qodo wants to merge 2 commits into
devin_pr_code_review_bench_100_devin2_base_refactor_always_preserve_marketplace_search_state_in_url_pr415from
devin_pr_code_review_bench_100_devin2_head_refactor_always_preserve_marketplace_search_state_in_url_pr415

Conversation

@hila-f-qodo

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

Copy link
Copy Markdown

Benchmark PR from qodo-benchmark#415


Open with Devin

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

Copy link
Copy Markdown

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)))

Copy link
Copy Markdown

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.

3 participants