Skip to content

Conversation

@adityakukade32
Copy link

@adityakukade32 adityakukade32 commented Nov 16, 2025

#fix 173 Feature

Summary by CodeRabbit

  • New Features
    • Client-side project filtering with search across name, description, language, stage, popularity, competition, and activity.
    • Search bar with icon, clear button, and live count of filtered vs total projects.
    • Inline no-results messaging and clear-search action shown inside the projects table.
    • Updated filter button label, icon, and responsive styling; hero/fallback copy updated to "Filter Projects".

@vercel
Copy link

vercel bot commented Nov 16, 2025

@adityakukade32677 is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 16, 2025

Walkthrough

Adds client-side project filtering to ProjectsContainer: introduces a searchQuery state, memoized filteredProjects across multiple fields, a search input with icons and live counts, a replaced "Filter Projects" action button, and an inline no-results row with a clear-search action.

Changes

Cohort / File(s) Summary
Project search and filtering enhancement
apps/web/src/components/dashboard/ProjectsContainer.tsx
Added searchQuery state and memoized filteredProjects (filters by name, description, language, stage, popularity, competition, activity). Replaced "Find projects" with "Filter Projects" + FunnelIcon. Added search input UI (MagnifyingGlassIcon, clear button), live shown/total count, conditional rendering of search UI when projects exist, and an inline no-results table row with clear-search guidance.

Sequence Diagram(s)

sequenceDiagram
  participant UI as Projects Page UI
  participant PC as ProjectsContainer
  participant F as Filter logic (memoized)
  participant T as Projects Table

  UI->>PC: user types searchQuery / clicks Filter Projects
  PC->>F: provide projects + searchQuery
  F-->>PC: return filteredProjects
  alt filteredProjects not empty
    PC->>T: render filteredProjects
    T-->>UI: show rows + count
  else no matches
    PC->>T: render no-results row with clear action
    T-->>UI: show "no results" + clear-search control
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10–15 minutes

  • Check memoization correctness and dependency array for stale results.
  • Verify string matching covers intended fields and casing.
  • Confirm UI accessibility (labels, button targets) and clear-search behavior.

Poem

🐰 I hopped through lists both near and far,

I sniffed each name, each language, each star,
A little search, a tiny funneled art—
Now projects line up, found with a hop of heart! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding filter functionality to the projects component to address issue #173.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cla-assistant
Copy link

cla-assistant bot commented Nov 16, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ adityakukade32
❌ adityakukade32677
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
apps/web/src/components/dashboard/ProjectsContainer.tsx (1)

120-140: Consider using XMarkIcon from heroicons for consistency.

The inline SVG for the clear button works correctly, but since you're already importing from @heroicons/react/24/outline, using XMarkIcon would provide better consistency with the other icons in the component.

Apply this diff to use XMarkIcon:

+import { MagnifyingGlassIcon, FunnelIcon, XMarkIcon } from "@heroicons/react/24/outline";
             {searchQuery && (
               <button
                 onClick={() => setSearchQuery("")}
                 className="absolute right-3 top-1/2 transform -translate-y-1/2 text-zinc-400 hover:text-white transition-colors"
                 aria-label="Clear search"
               >
-                <svg
-                  className="size-4"
-                  fill="none"
-                  stroke="currentColor"
-                  viewBox="0 0 24 24"
-                >
-                  <path
-                    strokeLinecap="round"
-                    strokeLinejoin="round"
-                    strokeWidth={2}
-                    d="M6 18L18 6M6 6l12 12"
-                  />
-                </svg>
+                <XMarkIcon className="size-4" />
               </button>
             )}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97e699a and 32d8e76.

📒 Files selected for processing (1)
  • apps/web/src/components/dashboard/ProjectsContainer.tsx (6 hunks)
🔇 Additional comments (5)
apps/web/src/components/dashboard/ProjectsContainer.tsx (5)

18-19: LGTM! Imports are correct for the new filtering functionality.

The added imports for heroicons icons and React hooks are appropriate and properly structured.


62-88: Excellent filtering implementation with proper edge-case handling.

The filtering logic correctly uses:

  • Optional chaining for nullable fields (preventing runtime errors)
  • Case-insensitive matching across multiple project attributes
  • Memoization with correct dependencies for performance
  • Early return when search query is empty

98-104: LGTM! Button UI improvements enhance UX.

The addition of the FunnelIcon and responsive text display ("Filter Projects" on desktop, "Filter" on mobile) provides clear visual feedback and better mobile experience.


184-256: LGTM! Table rendering correctly uses filtered data with excellent no-results UX.

The implementation properly:

  • Renders filteredProjects instead of projects
  • Provides a clear no-results state with helpful messaging
  • Includes an inline action to clear the search, reducing user friction

267-267: LGTM! Copy updated for consistency.

The hero text now correctly references the "Filter Projects" button label, maintaining consistency across the UI.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (3)
apps/web/src/components/dashboard/ProjectsContainer.tsx (3)

128-171: Well-implemented search UI with good accessibility.

The search input provides a good user experience with:

  • Proper accessibility attributes
  • Clear visual feedback
  • Inline result count
  • Easy-to-use clear functionality

Minor optimization: Line 165's check for filteredProjects !== undefined is unnecessary since useMemo always returns a defined value. You can simplify to:

-          {searchQuery && filteredProjects !== undefined && (
+          {searchQuery && (

207-281: Excellent user experience for empty search results.

The implementation correctly renders filtered results and provides helpful guidance when no matches are found. The inline clear-search action makes it easy for users to recover from unsuccessful searches.

Minor optimization: Line 207's check for filteredProjects && is unnecessary since the memoized value is always defined. You can simplify to:

-              {filteredProjects && filteredProjects.length > 0 ? (
+              {filteredProjects.length > 0 ? (

118-124: Dual filtering system already provides adequate scope clarity.

The implementation correctly separates two complementary filtering mechanisms:

  1. "Filter Projects" button: Server-side filtering via FiltersContainer that makes an API call and replaces the full dataset
  2. Search input: Client-side filtering on the current project results

The existing UI already addresses the core UX concern from the original review:

  • The search placeholder text explicitly states the scope: "Search projects by name, description, language, stage, popularity..."
  • The result counter displays "Showing X of Y projects", making it clear that filtering applies to the current set

While the optional improvements suggested (renaming button to "Advanced Filters", adding tooltips) could enhance clarity further, the current implementation is functionally clear and uses standard UX patterns. These refinements are not necessary but could be considered as future enhancements for increased discoverability.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32d8e76 and 3cf0cb2.

📒 Files selected for processing (1)
  • apps/web/src/components/dashboard/ProjectsContainer.tsx (6 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/src/components/dashboard/ProjectsContainer.tsx (3)
apps/web/src/components/ui/FiltersContainer.tsx (2)
  • FiltersContainer (21-150)
  • toggleShowFilters (35-57)
apps/web/src/components/dashboard/DashboardContainer.tsx (1)
  • DashboardContainer (12-44)
apps/web/src/app/(main)/dashboard/projects/page.tsx (2)
  • useRenderProjects (9-21)
  • setRenderProjects (14-18)
🔇 Additional comments (5)
apps/web/src/components/dashboard/ProjectsContainer.tsx (5)

18-19: LGTM!

The imports are correctly added and all symbols are properly utilized throughout the component.


62-62: LGTM!

State initialization is correct and follows React best practices.


64-108: Comprehensive and well-implemented filtering logic.

The memoized filtering implementation is correct and efficient:

  • Proper dependency array prevents unnecessary recalculations
  • Safe handling of undefined/null values with optional chaining
  • Case-insensitive search across all relevant fields
  • Early return optimization when no search query is present

118-124: LGTM!

The button updates improve clarity and user understanding. The FunnelIcon is semantically appropriate, and the responsive text display provides a good mobile experience.


292-292: LGTM!

The copy update maintains consistency with the button text change and accurately describes the feature.

@adityakukade32
Copy link
Author

ok what changes i want to make

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.

2 participants