Skip to content

Conversation

@fengkuizhi
Copy link
Collaborator

@fengkuizhi fengkuizhi commented Oct 31, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Added GitHub Star Button component displaying repository star count across the application.
    • Enhanced repository search with optional fullmatch and configurable timeout parameters.
  • Improvements

    • Reorganized navigation buttons for better usability.
    • Improved repository and branch selector behavior with better error handling and user feedback.
    • Optimized chat area layout for better stability.
  • Chores

    • Removed debug logging and unused imports.
    • Updated documentation comments.

@coderabbitai
Copy link

coderabbitai bot commented Oct 31, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR adds a GitHub star button component to the UI, reorganizes navigation elements by moving DocsButton and ThemeToggle into the UserMenu dropdown, enhances the searchRepositories API with configurable fullmatch and timeout parameters, refactors ChatArea to use an always-mounted pattern for improved DOM stability, and implements async repository location with fullmatch search capability in RepositorySelector.

Changes

Cohort / File(s) Summary
GitHub API Enhancement
frontend/src/apis/github.ts
Updated searchRepositories method signature to accept optional opts object with fullmatch and timeout properties; builds query parameters dynamically using URLSearchParams instead of relying on hardcoded values.
New GithubStarButton Component
frontend/src/features/layout/GithubStarButton.tsx
New client-side React component that fetches and displays GitHub stargazer count on mount, formats large numbers with "k" shorthand, and opens repository in new tab on click; includes loading state and error handling with unmount safety.
Navigation UI Reorganization
frontend/src/app/page.tsx, frontend/src/app/settings/page.tsx, frontend/src/app/tasks/page.tsx, frontend/src/features/layout/UserMenu.tsx
Moved DocsButton and ThemeToggle from settings and tasks page headers into UserMenu dropdown; added GithubStarButton to main page header; updated UserMenu styling (increased padding and typography) and added divider below new menu items.
Repository & Branch Selection Logic
frontend/src/features/tasks/components/RepositorySelector.tsx, frontend/src/features/tasks/components/BranchSelector.tsx
RepositorySelector now includes async repo location logic that performs fullmatch search via GitHub API if repo not found in existing list; BranchSelector resets branch to null on initial fetch and removed loading state from disabled logic.
Component Lifecycle Refactoring
frontend/src/features/tasks/components/ChatArea.tsx
Refactored ChatArea to always mount MessagesArea and input controls instead of conditionally rendering based on hasMessages; visibility and interaction now managed via CSS classes (opacity, pointer-events, aria-hidden) for improved DOM stability.
State Management Cleanup
frontend/src/features/layout/UserContext.tsx, frontend/src/features/tasks/components/TaskSidebar.tsx
Removed debug console.log statements from fetchUser; removed setSelectedTask(null) call from New Task handler in TaskSidebar.
Miscellaneous Updates
frontend/src/features/settings/components/McpConfigImportModal.tsx, frontend/src/features/settings/components/TeamEdit.tsx, frontend/src/features/tasks/components/TaskListSection.tsx
Updated JSON example in MCP config placeholder; changed comment from "assets (i18n)" to "images (i18n)"; removed unused import.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RepositorySelector
    participant GitHubAPI as GitHub API
    participant RepoList as Repo List

    User->>RepositorySelector: Open dropdown / Task has git_repo
    activate RepositorySelector
    RepositorySelector->>RepoList: Search local repos for match
    alt Repo found locally
        RepoList-->>RepositorySelector: Return matched repo
    else Repo not found
        RepositorySelector->>RepositorySelector: Trigger fullmatch search
        RepositorySelector->>GitHubAPI: searchRepositories(query, {fullmatch: true})
        activate GitHubAPI
        GitHubAPI-->>RepositorySelector: Return search results
        deactivate GitHubAPI
        RepositorySelector->>RepositorySelector: Update repo list from API
    end
    RepositorySelector-->>User: Render updated dropdown
    deactivate RepositorySelector
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

  • ChatArea.tsx – Requires careful review of the always-mount refactoring to ensure visibility/interaction management via CSS correctly maintains intended UX; verify aria-hidden and pointer-events logic.
  • RepositorySelector.tsx – Async repo location with fullmatch search introduces complex control flow; verify proper cancellation handling, error states, and interaction with existing repo selection logic.
  • searchRepositories API enhancement – Validate URLSearchParams construction and optional parameter handling; confirm backward compatibility.
  • Navigation reorganization – While mostly straightforward component shuffling, verify styling consistency across settings/tasks pages and UserMenu layout.

Possibly related PRs

  • fix Repository.length=0 #3 – Modifies RepositorySelector empty-state messaging; related to the substantive repo loading/search/selection logic changes in this PR.

Poem

🐰 A star button shines bright in the header so grand,
While nav buttons shuffle like sand upon sand—
The chat always mounts now, no flicker or fade,
And repos search deeper with fullmatch brigade!

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

📜 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 f0b729e and 2878634.

📒 Files selected for processing (14)
  • frontend/src/apis/github.ts (1 hunks)
  • frontend/src/app/page.tsx (2 hunks)
  • frontend/src/app/settings/page.tsx (2 hunks)
  • frontend/src/app/tasks/page.tsx (2 hunks)
  • frontend/src/features/common/UserContext.tsx (0 hunks)
  • frontend/src/features/layout/GithubStarButton.tsx (1 hunks)
  • frontend/src/features/layout/UserMenu.tsx (2 hunks)
  • frontend/src/features/settings/components/McpConfigImportModal.tsx (1 hunks)
  • frontend/src/features/settings/components/TeamEdit.tsx (1 hunks)
  • frontend/src/features/tasks/components/BranchSelector.tsx (3 hunks)
  • frontend/src/features/tasks/components/ChatArea.tsx (2 hunks)
  • frontend/src/features/tasks/components/RepositorySelector.tsx (5 hunks)
  • frontend/src/features/tasks/components/TaskListSection.tsx (0 hunks)
  • frontend/src/features/tasks/components/TaskSidebar.tsx (0 hunks)

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.

@fengkuizhi fengkuizhi merged commit f36ba3d into main Oct 31, 2025
1 check was pending
@fengkuizhi fengkuizhi deleted the feature_front_sync branch October 31, 2025 08:35
Micro66 added a commit that referenced this pull request Nov 19, 2025
…PATH

Critical fixes for local development setup:

1. **Project root directory requirement**:
   - All operations must be run from project root (Wegent/), not executor subdirectory
   - Updated all path references and commands to reflect this requirement
   - Added prominent warning at the beginning of setup instructions

2. **PYTHONPATH configuration**:
   - Added mandatory PYTHONPATH setup: `export PYTHONPATH=$(pwd)`
   - Included in all startup instructions and quick start script
   - Added to troubleshooting section with specific error examples

3. **Updated quick start script**:
   - Changed from executor/ directory to project root
   - Auto-detects script location and navigates to project root
   - Sets PYTHONPATH before starting service
   - Corrected dependency installation path to executor/requirements.txt

4. **Enhanced troubleshooting**:
   - Added FAQ for PYTHONPATH not set (FAQ #5)
   - Added FAQ for running in wrong directory (FAQ #6)
   - Updated virtual environment FAQ with correct paths

5. **Improved clarity**:
   - Added warning boxes highlighting critical requirements
   - Updated all code examples to show correct directory context
   - Emphasized PYTHONPATH requirement throughout documentation

These changes address module import errors that occur when PYTHONPATH is not properly configured or when running from the wrong directory.
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