Skip to content

Conversation

@MuslimeKaya
Copy link
Contributor

@MuslimeKaya MuslimeKaya commented Jul 23, 2025

This PR introduces a fully functional "Quick Wins" section in the sidebar. It integrates a tabbed layout using the Tabs component to separate and display "Good Issues" and "Easy Fixes" from GitHub repositories.
Additionally:

Search page and sidebar logic were enhanced for better UX.

TanStack Table (@tanstack/react-table) was properly configured and reordered in dependencies.

A reusable Alert component was implemented with support for variants and utility functions.
Redundant components and code have been removed to keep the structure clean and focused.

#49

Summary by CodeRabbit

  • New Features

    • Introduced a "Quick Wins" section with a dedicated page for discovering open source issues suitable for new contributors, featuring "Good First Issues" and "Easy Fixes" tabs.
    • Added interactive, filterable, and sortable tables to browse and explore GitHub issues, including pagination and advanced filtering options.
    • Implemented statistics cards, a dynamic greeting, and a warning alert for GitHub token requirements.
    • Added a persistent search modal for improved navigation.
  • UI Components

    • Added new alert UI components for consistent and accessible feedback.
    • Enhanced the sidebar with active navigation for "Quick Wins" and improved visual grouping.
  • Chores

    • Added the "@tanstack/react-table" dependency for advanced table features.
  • Refactor

    • Updated sidebar navigation structure for better clarity and user experience.
  • Style

    • Improved formatting and consistency across components.
  • Tests

    • No user-facing test changes included.
  • Documentation

    • No user-facing documentation changes included.

- Refactored search page to improve performance and readability.
- Updated sidebar component to include collapsible sections for better navigation.
- Added QuickWinsTable component for displaying quick wins with sorting and filtering capabilities.
- Created columns definition for QuickWinsTable to manage data display.
- Implemented hooks for managing quick wins count and state.
- Established a new Zustand store for quick wins management.
- Defined TypeScript interfaces for GitHub issues and quick wins state.
@coderabbitai
Copy link

coderabbitai bot commented Jul 23, 2025

Warning

Rate limit exceeded

@MuslimeKaya has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 59 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 765cd59 and 24858ed.

📒 Files selected for processing (4)
  • src/components/layout/Layout.tsx (1 hunks)
  • src/components/layout/Sidebar.tsx (3 hunks)
  • src/components/quick-wins/hooks/useQuickWins.ts (1 hunks)
  • src/stores/quickWins.ts (1 hunks)

Walkthrough

This update introduces a new "Quick Wins" feature for open source contributions, including new UI components, table functionality using @tanstack/react-table, supporting hooks and Zustand store, TypeScript types, and sidebar navigation integration. It also includes minor refactoring and formatting adjustments in related files.

Changes

File(s) Change Summary
package.json Added "@tanstack/react-table" dependency.
src/app/quick-wins/page.tsx Added main "QuickWinsPage" React client component with tabbed UI and integration of quick wins data and tables.
src/app/search/page.tsx Minor formatting and indentation adjustments; no logic changes.
src/components/layout/Sidebar.tsx Refactored sidebar: replaced disabled "Quick Wins" with active collapsible and links for new quick wins tabs.
src/components/quick-wins/QuickWinsTable.tsx Added new QuickWinsTable component: paginated, sortable, filterable issues table using tanstack/react-table.
src/components/quick-wins/columns.tsx Added column definitions for QuickWinsTable, with custom renderers and sorting.
src/components/quick-wins/hooks/useQuickWins.ts Added hooks: useQuickWins and useQuickWinsCount (static/mock data).
src/components/ui/alert.tsx Added new Alert, AlertTitle, and AlertDescription UI components.
src/components/ui/tabs.tsx Added an empty string after import; no functional changes.
src/stores/index.ts Removed commented-out exports for non-existent stores; minor whitespace cleanup.
src/stores/quickWins.ts Added Zustand store useQuickWinsStore for quick wins state and actions (mock implementations).
src/types/quickWins.ts Added TypeScript interfaces: GitHubIssue and QuickWinsState.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant QuickWinsPage
    participant useQuickWins
    participant QuickWinsTable
    participant useQuickWinsStore

    User->>QuickWinsPage: Navigates to /quick-wins
    QuickWinsPage->>useQuickWins: Fetch quick wins data
    useQuickWins->>useQuickWinsStore: (future: fetch from store)
    QuickWinsPage->>QuickWinsTable: Passes issues data, loading, error, refresh
    QuickWinsTable->>User: Renders paginated, sortable table with filters
    User->>QuickWinsTable: Interacts (sorts, paginates, filters)
    QuickWinsTable->>QuickWinsPage: Calls onRefresh if requested
    QuickWinsPage->>useQuickWins: Refresh data
Loading

Estimated code review effort

4 (~90 minutes)

Possibly related issues

Poem

Hopping fast on open source trails,
Quick wins appear in sorted details!
Tables and tabs, with badges that gleam,
A sidebar refreshed—what a coder’s dream!
🐇✨
With every commit, new carrots to find—
Let’s celebrate progress, of the quick-win kind!

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 10

🧹 Nitpick comments (12)
src/components/ui/tabs.tsx (1)

8-8: Remove unnecessary empty string literal.

The empty string "" on line 8 appears to be accidental and serves no purpose. Please remove it to keep the code clean.

-""
src/types/quickWins.ts (1)

8-9: Consider more specific typing for date fields.

The date fields are typed as string, which is correct for JSON APIs, but consider adding documentation or using a more specific type to indicate they should be ISO date strings.

-    created_at: string
-    updated_at: string
+    /** ISO date string */
+    created_at: string
+    /** ISO date string */
+    updated_at: string

Alternatively, you could use a branded type:

type ISODateString = string & { __brand: 'ISODateString' }
src/stores/index.ts (3)

1-1: Use English for code comments consistently.

The Turkish comment should be in English to maintain consistency with the rest of the codebase.

-// stores/index.ts - Sadece mevcut olanları export et
+// stores/index.ts - Export only existing stores

9-9: Use English for code comments consistently.

The Turkish comment should be in English for better maintainability and team collaboration.

-// Re-export all stores (sadece mevcut olanlar)
+// Re-export all stores (only existing ones)

17-19: Remove commented code instead of leaving it as documentation.

Dead code comments should be removed entirely rather than kept as examples of what was removed.

-// BU SATIRLARI KALDIRDIK - henüz dosyalar yok
-// export { useActionItemsStore } from './actionItems'  ❌ KALDIRDIK
-// export { useQuickWinsStore } from './quickWins'       ❌ KALDIRDIK
src/components/quick-wins/hooks/useQuickWins.ts (1)

5-8: Replace magic numbers with meaningful constants or explain their purpose.

The hardcoded numbers (12, 8, 20) should either be explained with comments or moved to constants with descriptive names.

+// TODO: Replace with actual API data
+const MOCK_GOOD_ISSUES_COUNT = 12
+const MOCK_EASY_FIXES_COUNT = 8
+const MOCK_TOTAL_COUNT = 20
+
 export function useQuickWinsCount() {
     return {
-        goodIssuesCount: 12,
-        easyFixesCount: 8,
-        count: 20,
+        goodIssuesCount: MOCK_GOOD_ISSUES_COUNT,
+        easyFixesCount: MOCK_EASY_FIXES_COUNT,
+        count: MOCK_TOTAL_COUNT,
         isLoading: false
     }
 }
src/stores/quickWins.ts (1)

18-26: Improve mock implementations with proper loading states.

The mock functions should simulate realistic loading behavior and include proper error handling structure.

 fetchGoodIssues: () => {
-    // Mock data for now
-    set({ goodIssues: [] })
+    // TODO: Replace with actual API call
+    set(state => ({ loading: { ...state.loading, goodIssues: true } }))
+    
+    // Simulate API delay
+    setTimeout(() => {
+        set(state => ({ 
+            goodIssues: [], // Mock empty data
+            loading: { ...state.loading, goodIssues: false }
+        }))
+    }, 1000)
 },

 fetchEasyFixes: () => {
-    // Mock data for now  
-    set({ easyFixes: [] })
+    // TODO: Replace with actual API call
+    set(state => ({ loading: { ...state.loading, easyFixes: true } }))
+    
+    // Simulate API delay
+    setTimeout(() => {
+        set(state => ({ 
+            easyFixes: [], // Mock empty data
+            loading: { ...state.loading, easyFixes: false }
+        }))
+    }, 1000)
 }
src/components/layout/Sidebar.tsx (1)

201-201: Consider using a different icon for Quick Wins to avoid confusion.

Both "Action Required" and "Quick Wins" sections use the Target icon, which might confuse users about the distinction between these sections.

-<Target className="w-5 h-5" />
+<Lightbulb className="w-5 h-5" />
src/app/quick-wins/page.tsx (1)

31-242: Consider breaking down this large component into smaller, focused components.

The QuickWinsPage component is quite large (200+ lines) and handles multiple responsibilities. Consider extracting sub-components for better maintainability.

Suggested breakdown:

  • QuickWinsHeader - for the header section (lines 85-120)
  • QuickWinsHero - for the hero section (lines 122-133)
  • QuickWinsStats - for the statistics cards (lines 150-192)
  • QuickWinsContent - for the main tabs content (lines 196-234)

This would improve readability, testability, and reusability.

src/components/quick-wins/columns.tsx (3)

1-1: Fix the file extension in the comment.

The comment shows .ts but this is a .tsx file since it contains JSX.

-// src/components/quick-wins/columns.ts
+// src/components/quick-wins/columns.tsx

149-165: Reduce duplication in difficulty display logic.

The difficulty check is performed twice. Consider extracting the display configuration.

 cell: ({ row }) => {
     const difficulty = row.original.difficulty
+    const config = difficulty === 'easy' 
+        ? { variant: 'default' as const, text: '✨ Easy' }
+        : { variant: 'secondary' as const, text: '⚡ Medium' }
     return (
         <Badge
-            variant={difficulty === 'easy' ? 'default' : 'secondary'}
+            variant={config.variant}
             className="text-xs"
         >
-            {difficulty === 'easy' ? '✨ Easy' : '⚡ Medium'}
+            {config.text}
         </Badge>
     )
 }

179-193: Improve readability of the relative date formatting.

The nested ternary operators make the date formatting logic hard to follow. Consider extracting this to a helper function.

+const formatRelativeDate = (date: Date): string => {
+    const now = new Date()
+    const diffInDays = Math.floor((now.getTime() - date.getTime()) / (1000 * 60 * 60 * 24))
+    
+    if (diffInDays === 0) return 'Today'
+    if (diffInDays === 1) return 'Yesterday'
+    if (diffInDays < 7) return `${diffInDays}d ago`
+    if (diffInDays < 30) return `${Math.floor(diffInDays / 7)}w ago`
+    return `${Math.floor(diffInDays / 30)}mo ago`
+}

 cell: ({ row }) => {
     const date = new Date(row.original.created_at)
-    const now = new Date()
-    const diffInDays = Math.floor((now.getTime() - date.getTime()) / (1000 * 60 * 60 * 24))

     return (
         <div className="text-sm text-gray-600">
-            {diffInDays === 0 ? 'Today' :
-                diffInDays === 1 ? 'Yesterday' :
-                    diffInDays < 7 ? `${diffInDays}d ago` :
-                        diffInDays < 30 ? `${Math.floor(diffInDays / 7)}w ago` :
-                            `${Math.floor(diffInDays / 30)}mo ago`
-            }
+            {formatRelativeDate(date)}
         </div>
     )
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6ffc31e and 92f6e76.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • package.json (1 hunks)
  • src/app/quick-wins/page.tsx (1 hunks)
  • src/app/search/page.tsx (1 hunks)
  • src/components/layout/Sidebar.tsx (3 hunks)
  • src/components/quick-wins/QuickWinsTable.tsx (1 hunks)
  • src/components/quick-wins/columns.tsx (1 hunks)
  • src/components/quick-wins/hooks/useQuickWins.ts (1 hunks)
  • src/components/ui/alert.tsx (1 hunks)
  • src/components/ui/tabs.tsx (1 hunks)
  • src/stores/index.ts (1 hunks)
  • src/stores/quickWins.ts (1 hunks)
  • src/types/quickWins.ts (1 hunks)
🧬 Code Graph Analysis (2)
src/components/ui/alert.tsx (1)
src/lib/utils.ts (1)
  • cn (4-6)
src/components/quick-wins/columns.tsx (4)
src/types/quickWins.ts (1)
  • GitHubIssue (1-24)
src/components/ui/button.tsx (1)
  • Button (59-59)
src/components/ui/badge.tsx (1)
  • Badge (46-46)
src/components/ui/avatar.tsx (3)
  • Avatar (53-53)
  • AvatarImage (53-53)
  • AvatarFallback (53-53)
🧰 Additional context used
🧬 Code Graph Analysis (2)
src/components/ui/alert.tsx (1)
src/lib/utils.ts (1)
  • cn (4-6)
src/components/quick-wins/columns.tsx (4)
src/types/quickWins.ts (1)
  • GitHubIssue (1-24)
src/components/ui/button.tsx (1)
  • Button (59-59)
src/components/ui/badge.tsx (1)
  • Badge (46-46)
src/components/ui/avatar.tsx (3)
  • Avatar (53-53)
  • AvatarImage (53-53)
  • AvatarFallback (53-53)
🔇 Additional comments (15)
package.json (1)

19-19: @tanstack/react-table v8.21.3 is current and secure

Verified that version 8.21.3 (released April 14, 2025) is the latest available and has no known security vulnerabilities or active CVEs.

• Version 8.21.3 is the most recent release
• No reported security issues in reputable databases or Snyk scans

src/app/search/page.tsx (1)

613-618: LGTM! Improved code formatting.

The indentation adjustment improves readability of the multiline ternary expression while preserving the correct logic for finding the most active day.

src/components/ui/alert.tsx (1)

1-67: Well-implemented Alert component with good accessibility.

The Alert component is well-structured with:

  • Proper TypeScript typing and variant management via cva
  • Accessibility support with role="alert"
  • Grid-based layout that adapts to icon presence
  • Consistent styling patterns

The complex CSS grid configuration with has-[>svg] pseudo-class is sophisticated and handles icon placement elegantly.

src/types/quickWins.ts (1)

1-37: Well-structured interfaces for the Quick Wins feature.

The interfaces provide a solid foundation for the Quick Wins feature with good separation of concerns and proper state management structure.

src/stores/index.ts (1)

15-15: Verify export consistency with summary.

The AI summary mentions that useActionItemsStore export was removed, but it's still present on line 15. This creates confusion about the actual changes.

#!/bin/bash
# Verify if useActionItemsStore file actually exists
fd "actionItems" --type f --extension ts --extension tsx

Likely an incorrect or invalid review comment.

src/components/layout/Sidebar.tsx (1)

108-273: LGTM! Well-structured navigation refactoring.

The Quick Wins section integration is well-implemented with consistent styling, proper collapsible behavior, and appropriate sub-navigation. The code follows existing patterns and maintains good accessibility with proper link structures.

src/components/quick-wins/columns.tsx (4)

10-51: LGTM!

The title column implementation is well-structured with proper security attributes on external links and good UX with truncation and hover titles.


84-106: LGTM!

Good implementation with proper null handling for the language field.


107-148: LGTM!

Well-implemented sortable columns with consistent icon usage and proper number formatting for stars.


201-222: LGTM!

Good implementation with proper avatar fallback and username truncation.

src/components/quick-wins/QuickWinsTable.tsx (5)

56-96: LGTM!

Excellent state management with proper memoization for performance optimization and correct null filtering for languages.


122-159: LGTM!

Well-designed loading skeleton that maintains layout consistency and provides good user feedback during data fetching.


161-183: LGTM!

Good error state implementation with clear messaging and recovery action.


185-304: LGTM!

Comprehensive table implementation with excellent UX features including search, filters, and helpful empty state messaging.


305-389: LGTM!

Excellent pagination implementation with accessibility features (sr-only labels) and responsive design considerations.

…gging; refactor hooks and store for better type safety
Copy link

@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: 2

♻️ Duplicate comments (1)
src/stores/quickWins.ts (1)

19-33: Add proper TypeScript generic to Zustand create function.

The create function should be properly typed with the store interface for better type safety and IntelliSense support.

-export const useQuickWinsStore = create((set) => ({
+export const useQuickWinsStore = create<QuickWinsStore>((set) => ({

The mock implementations are appropriate for initial development. Consider adding TODO comments to track when these should be replaced with actual API calls.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92f6e76 and 842dd5f.

📒 Files selected for processing (4)
  • src/app/quick-wins/page.tsx (1 hunks)
  • src/components/quick-wins/columns.tsx (1 hunks)
  • src/components/quick-wins/hooks/useQuickWins.ts (1 hunks)
  • src/stores/quickWins.ts (1 hunks)
🧬 Code Graph Analysis (1)
src/stores/quickWins.ts (1)
src/types/quickWins.ts (1)
  • GitHubIssue (1-24)
✅ Files skipped from review due to trivial changes (1)
  • src/components/quick-wins/hooks/useQuickWins.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/app/quick-wins/page.tsx
  • src/components/quick-wins/columns.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/stores/quickWins.ts (1)
src/types/quickWins.ts (1)
  • GitHubIssue (1-24)
🔇 Additional comments (1)
src/stores/quickWins.ts (1)

1-1: LGTM!

Standard Zustand import, no issues.

Copy link

@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: 2

♻️ Duplicate comments (1)
src/stores/quickWins.ts (1)

3-6: Add TypeScript interface and generic for proper type safety.

The store lacks proper TypeScript typing. You need to:

  1. Define a QuickWinsStore interface including all state properties and action methods
  2. Add the generic to the create function
  3. Import the existing GitHubIssue type from src/types/quickWins.ts
+import type { GitHubIssue } from '../types/quickWins'
+
+interface QuickWinsStore {
+    goodIssues: GitHubIssue[]
+    easyFixes: GitHubIssue[]
+    loading: { goodIssues: boolean; easyFixes: boolean }
+    fetchGoodIssues: () => void
+    fetchEasyFixes: () => void
+}
+
-export const useQuickWinsStore = create((set) => ({
+export const useQuickWinsStore = create<QuickWinsStore>((set) => ({
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2a17f7 and a520913.

📒 Files selected for processing (1)
  • src/stores/quickWins.ts (1 hunks)

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