Skip to content

Conversation

@ArjinAlbay
Copy link
Member

@ArjinAlbay ArjinAlbay commented Nov 18, 2025

Summary by CodeRabbit

Release Notes

  • New Features
    • Added Favorites feature to discover and manage favorite repositories and developers with live metrics dashboard
    • Introduced customizable categories with color selection for organizing favorites
    • Added Activity Feed displaying recent commits, PRs, and updates from pinned repositories and favorite developers
    • Enhanced Search with integrated favorite and pin controls for quick organization
    • Added Favorites link to navigation sidebar for quick access

claude and others added 12 commits November 17, 2025 21:14
Implement GitHub issue HappyHackingSpace#100 with the following features:
- Extended preferences store to support favorite users
- Created new favorites store for tracking repository and user metrics
- Added API endpoints for fetching repository and user metrics
- Built expandable FavoritesList component with collapsible UI
- Integrated metrics display for repositories (stars, issues, activity)
- Integrated metrics display for users (activity, languages, repos)
- All metrics updated within 24-hour period as specified
- Component added to dashboard with proper loading and error states

Technical changes:
- src/stores/preferences.ts: Added favoriteUsers array and toggleFavoriteUser action
- src/stores/favorites.ts: New store for managing metrics data with caching
- src/stores/index.ts: Added favorites store to hydration and exports
- src/app/api/favorites/repo/route.ts: API endpoint for repository metrics
- src/app/api/favorites/user/route.ts: API endpoint for user metrics
- src/components/widget/FavoritesList.tsx: Expandable list component with live metrics
- src/app/dashboard/page.tsx: Integrated FavoritesList into dashboard

All code passes TypeScript checks and ESLint validation.
…oard-01SKTUW6fhsy4NBmdZLedZXH

feat: add expandable favorites list with live metrics to dashboard
- Changed Favorites from "Coming Soon" to active menu item
- Added link to dashboard with #favorites anchor
- Added id="favorites" to FavoritesList Card for proper navigation
- Menu item highlights when on dashboard page
…oard-01SKTUW6fhsy4NBmdZLedZXH

feat: enable favorites menu item in sidebar
Moved favorites functionality from dashboard to a dedicated /favorites page.

Changes:
- Removed FavoritesList from dashboard (dashboard is now kanban-only)
- Created new /favorites page with header and manage button
- Updated sidebar to link to /favorites instead of dashboard anchor
- Added /favorites to protected routes in middleware
- Added /api/favorites to protected API routes
- Removed id attributes from FavoritesList cards (no longer needed)
- Updated sidebar accordion behavior to close when navigating to favorites

The favorites page now provides a dedicated space for future enhancements
and better organization of favorite repositories and users.
…oard-01SKTUW6fhsy4NBmdZLedZXH

refactor: move favorites to dedicated page
Enhanced preferences store and added favorites management UI:

**Store Enhancements (src/stores/preferences.ts):**
- Added FavoriteCategory interface with id, name, and color
- Added FavoriteRepoMetadata and FavoriteUserMetadata interfaces
- Store now tracks dateAdded, categoryId, and notes for each favorite
- Added category management methods (add, update, delete)
- Added methods to set category and notes for repos/users
- togglePinnedRepo/toggleFavoriteUser now create/remove metadata automatically
- Included 3 default categories: Work, Learning, Inspiration

**Settings Tab (src/components/settings/FavoritesSettings.tsx):**
- Comprehensive favorites management interface in Settings page
- Category management: create, edit, delete categories with color picker
- 8 color options for categories (blue, green, yellow, red, purple, pink, indigo, teal)
- Repository management: add/remove repos, assign to categories
- User management: add/remove users, assign to categories
- Inline category assignment dropdowns
- Category badge display with proper colors
- Dialog-based add/edit interfaces for all operations
- Delete category automatically unassigns from all favorites

**Settings Page (src/app/settings/page.tsx):**
- Added new "Favorites" tab alongside GitHub and Appearance
- Tab uses Star icon for visual consistency

This is part 1 of the comprehensive favorites system.
Remaining features to implement: search integration, filters/sorting,
activity feed, and quick actions on favorites page.
Add advanced favorites features:
- Search integration: star buttons on search results for quick add/remove
- Filters and sorting: category filters and multiple sort options for repos/users
- Activity feed: component showing recent activity from favorites
- Quick actions: open on GitHub, copy clone URL, copy profile URL

Changes:
- Add favorite/unfavorite buttons to search results (repos and users)
- Add filter by category and sort controls to FavoritesList
- Implement filtering and sorting logic with useMemo
- Add quick action buttons (external link, copy URL, copy clone URL)
- Create ActivityFeed component with mock activity data
- Update favorites page layout with 2/3 grid for list and 1/3 for feed
…oard-01SKTUW6fhsy4NBmdZLedZXH

Claude/GitHub monitoring dashboard
Implements issue HappyHackingSpace#103 - enables direct navigation from favorites to analysis.

Changes:
- Add BarChart3 icon button to pinned repository cards that navigates to /search?repo={fullName}
- Add BarChart3 icon button to favorite user cards that navigates to /search?user={username}
- Use Next.js router.push for client-side navigation
- Add tooltips for better UX ("View repository analysis" / "View user analytics")
- Properly encode URL parameters with encodeURIComponent

The new analysis button appears as the first action button in each favorite card,
providing seamless one-click access to detailed analytics for both repositories
and users from the Favorites section.

Resolves: HappyHackingSpace#103
@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR introduces a Favorites feature that enables users to bookmark GitHub repositories and developers, fetches associated metrics (stars, activity, issues, language) via dedicated API endpoints, stores preferences and metrics data via Zustand stores with caching, and provides UI components for browsing, managing, and categorizing favorites across a new Favorites page and settings dashboard.

Changes

Cohort / File(s) Summary
GitHub API Integration Routes
src/app/api/favorites/repo/route.ts, src/app/api/favorites/user/route.ts
New authenticated GET endpoints that fetch repository and user metrics from GitHub API, validate auth tokens, handle token expiry, and return computed RepoMetrics and UserMetrics objects with error handling (400/401/500).
Favorites Page & Settings
src/app/favorites/page.tsx, src/app/settings/page.tsx
New Favorites page with layout and activity feed; settings page extended with new Favorites tab and FavoritesSettings component.
Favorites UI Widgets
src/components/widget/FavoritesList.tsx, src/components/widget/ActivityFeed.tsx, src/components/settings/FavoritesSettings.tsx
New components for displaying favorite repos/users with metrics, rendering activity feeds from pinned items, and managing categories, pins, and favorites with dialogs and inline edit UI.
Search Page Integration
src/app/search/page.tsx
Added preferences store integration to search results, replacing single action buttons with composite controls for favoriting users and pinning repos, now reflected in UI state.
State Management & Persistence
src/stores/favorites.ts, src/stores/preferences.ts, src/stores/index.ts
New favorites store with per-item caching (10-min TTL), fetch/error tracking, and hydration; preferences store extended with favorite users, categories, and metadata; index updated to export and hydrate new stores.
Navigation & Access Control
src/components/layout/Sidebar.tsx, src/middleware.ts
Sidebar updated with Favorites navigation link and active routing; middleware updated to protect /favorites and /api/favorites routes.

Sequence Diagram

sequenceDiagram
    participant User
    participant Browser
    participant FavoritesPage
    participant FavoritesList
    participant API as API Route
    participant GitHub as GitHub API
    participant Store as Favorites Store

    User->>Browser: Navigate to /favorites
    Browser->>FavoritesPage: Render page
    FavoritesPage->>FavoritesList: Mount component
    FavoritesList->>Store: Read pinnedRepos, favoriteUsers
    FavoritesList->>Store: Check cache (lastFetchedAt)
    
    alt Cache expired or missing
        FavoritesList->>API: fetchRepoMetrics(repo)
        API->>GitHub: GET /repos/{owner}/{repo}
        API->>GitHub: GET /repos/{owner}/{repo}/issues?state=open&since=24h
        GitHub-->>API: Return repo data + issues
        API-->>FavoritesList: Return RepoMetrics
        FavoritesList->>Store: Update repoMetrics, loading, lastFetchedAt
    else Cache valid
        Store-->>FavoritesList: Return cached metrics
    end
    
    FavoritesList->>Browser: Render cards (stars, activity, language, issues)
    User->>Browser: Click "Add to Favorites"
    Browser->>Store: toggleFavoriteUser(username)
    Store->>Store: Update favoriteUsers, persist
    FavoritesList->>Browser: Re-render with updated state
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–75 minutes

Areas requiring extra attention:

  • API routes (src/app/api/favorites/repo/route.ts and user/route.ts): Verify GitHub API calls, token validation logic, and error handling paths; check rate limiting and data accuracy.
  • FavoritesList (src/components/widget/FavoritesList.tsx): Complex async data fetching, loading states per item, and UI state management; verify cache expiration and hydration logic.
  • Preferences store extensions (src/stores/preferences.ts): Verify new category and metadata structures don't break existing toggle logic or persistence.
  • Store hydration flow (src/stores/index.ts): Ensure new favorites store rehydration integrates correctly with existing hydration sequence and persistence.
  • Search page integration (src/app/search/page.tsx): Verify new favorite/pin toggle interactions do not interfere with existing search result rendering and action handlers.

Possibly related PRs

  • PR #41: Modifies src/app/search/page.tsx with preferences and favorites state integration, directly overlapping with search UI changes in this PR.
  • PR #7: Extends core Zustand store setup and hydration logic in src/stores/index.ts, foundational to the new favorites store additions here.
  • PR #2: Updates src/components/layout/Sidebar.tsx navigation and global state integration, related to the Favorites link and routing changes in this PR.

Poem

🐰 A favorites feature hops to life,
With stars and repos, no more strife!
Cache expires, metrics flow,
Pins and categories in a row.
Zustand stores the cherished find,
A bookmarked journey, refined! 📌✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc86d35 and 315e00d.

📒 Files selected for processing (13)
  • src/app/api/favorites/repo/route.ts (1 hunks)
  • src/app/api/favorites/user/route.ts (1 hunks)
  • src/app/favorites/page.tsx (1 hunks)
  • src/app/search/page.tsx (5 hunks)
  • src/app/settings/page.tsx (3 hunks)
  • src/components/layout/Sidebar.tsx (2 hunks)
  • src/components/settings/FavoritesSettings.tsx (1 hunks)
  • src/components/widget/ActivityFeed.tsx (1 hunks)
  • src/components/widget/FavoritesList.tsx (1 hunks)
  • src/middleware.ts (1 hunks)
  • src/stores/favorites.ts (1 hunks)
  • src/stores/index.ts (4 hunks)
  • src/stores/preferences.ts (4 hunks)

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

@ArjinAlbay ArjinAlbay merged commit 74a634d into HappyHackingSpace:main Nov 18, 2025
1 check was pending
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