-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: always preserve marketplace search state in URL #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: coderabbit_combined_20260121_augment_sentry_coderabbit_1_base_refactor_always_preserve_marketplace_search_state_in_url_pr415
Are you sure you want to change the base?
Conversation
WalkthroughThe changes remove atom-based state management from the marketplace plugin system and eliminate the HydrateMarketplaceAtoms wrapper. Public atoms for search text, active plugin type, and filter tags are deleted. State accessors now source directly from query state. A context hook selector parameter type is also relaxed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
web/app/components/plugins/marketplace/atoms.ts (1)
35-44: Search-mode default is inverted relative to the comment.
The comment says categories without collections should force search mode, but the current expression forces it when the category has collections.🐛 Fix the inversion
- const isSearchMode = !!searchPluginText - || filterPluginTags.length > 0 - || (searchMode ?? (PLUGIN_CATEGORY_WITH_COLLECTIONS.has(activePluginType))) + const isSearchMode = !!searchPluginText + || filterPluginTags.length > 0 + || (searchMode ?? !PLUGIN_CATEGORY_WITH_COLLECTIONS.has(activePluginType))
🧹 Nitpick comments (1)
web/app/components/plugins/plugin-page/context.tsx (1)
51-52: Restore a type-safe selector signature.
Relaxing toanydrops inference and can mask selector misuse. Consider a generic signature to keep strict typing.♻️ Suggested change
-export function usePluginPageContext(selector: any) { - return useContextSelector(PluginPageContext, selector) -} +export function usePluginPageContext<T>( + selector: (value: PluginPageContextValue) => T, +): T { + return useContextSelector(PluginPageContext, selector) +}
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
web/app/components/plugins/marketplace/atoms.tsweb/app/components/plugins/marketplace/hydration-client.tsxweb/app/components/plugins/marketplace/index.tsxweb/app/components/plugins/plugin-page/context.tsx
💤 Files with no reviewable changes (1)
- web/app/components/plugins/marketplace/hydration-client.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
web/app/components/plugins/marketplace/atoms.ts (2)
web/app/components/plugins/marketplace/search-params.ts (1)
marketplaceSearchParamsParsers(5-9)web/app/components/plugins/marketplace/constants.ts (1)
PLUGIN_CATEGORY_WITH_COLLECTIONS(25-30)
🔇 Additional comments (2)
web/app/components/plugins/marketplace/index.tsx (1)
12-31: LGTM — simplified tree without altering behavior.
The hydration flow remains intact underHydrateQueryClient, and the UI structure is clearer.web/app/components/plugins/marketplace/atoms.ts (1)
19-27: Confirm the URL query key for active plugin type.
If the contract still expectscategory, switching totabwill break back/forward compatibility and URL restoration. If that’s not intentional, keep the key consistent.🔧 If `category` is still the contract
export function useActivePluginType() { - return useQueryState('tab', marketplaceSearchParamsParsers.category) + return useQueryState('category', marketplaceSearchParamsParsers.category) }
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Benchmark PR from qodo-benchmark#415
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.