A web application to monitor and visualize the activity of the OpenHands GitHub bot.
- Lists all attempted issue resolutions and PR modifications
- Entries are sorted by date
- Each entry shows:
- Type (Issue/PR)
- Status (Success/Failure)
- Timestamp
- Link to the relevant GitHub item
- Description of the action taken
- Filter activities by:
- Type (Issue resolution or PR modification)
- Status (Success or Failure)
- Date range
- Stacked line charts implemented using Vega-Lite showing:
- Issue resolutions over time (successes vs failures)
- PR modifications over time (successes vs failures)
- Time-based trends in bot activity
- Node.js 18 or later
- npm 9 or later
- A GitHub Personal Access Token with the following permissions:
repo
scope for accessing repository dataread:org
scope if monitoring repositories in an organization
The application uses environment variables for configuration:
GITHUB_TOKEN
- GitHub Personal Access Token (required for cache generation)- Required scopes:
repo
for repository access,read:org
for organization repositories - Only needed during cache generation, not at runtime
- Required scopes:
You can set this in a .env
file for local development:
GITHUB_TOKEN=your_github_token_here
Note: Never commit your .env
file to version control. The .gitignore
file already includes it.
- Clone the repository:
git clone https://github.com/All-Hands-AI/openhands-agent-monitor.git
cd openhands-agent-monitor
- Install dependencies:
npm install
- Generate the data cache:
# Make sure GITHUB_TOKEN is set in your .env file
npm run build:cache
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173
Note: The cache is static during development. Run npm run build:cache
again to refresh the data.
Run the test suite:
# Run tests in watch mode
npm run test
# Run tests with coverage report
npm run test:coverage
The application uses a caching mechanism to improve performance and security. Instead of making GitHub API calls from the frontend, the data is pre-fetched and cached during the build process.
npm run build
- Build the frontend application onlynpm run build:cache
- Generate the GitHub data cachenpm run build:all
- Generate cache and build the application
-
Set up environment:
# Clone repository and install dependencies git clone https://github.com/All-Hands-AI/openhands-agent-monitor.git cd openhands-agent-monitor npm install
-
Generate cache and build:
# Set GitHub token for cache generation export GITHUB_TOKEN=your_github_token_here # Generate cache and build application npm run build:all
-
Deploy the
dist
directory to your hosting provider.
Note: The GitHub token is only needed during the build process to generate the cache. The frontend application reads from this cache and does not need the token at runtime.
-
Set up deployment:
# Add build command in your hosting provider npm run build # Add cache generation to your build pipeline npm run build:cache
-
Configure environment variables:
- Set
GITHUB_TOKEN
in your CI/CD environment - No environment variables needed in the hosting environment
- Set
-
Build the Docker image:
# Build with cache generation docker build --build-arg GITHUB_TOKEN=your_token_here -t openhands-monitor .
-
Run the container:
# No token needed at runtime docker run -p 8080:80 openhands-monitor
The app will be available at http://localhost:8080
.
The application is configured to monitor the OpenHands repository by default. To monitor a different repository, modify the following constants in src/services/github.ts
:
const REPO_OWNER = 'your-org-name';
const REPO_NAME = 'your-repo-name';
-
Cache Generation Fails
- Symptom: Error during
npm run build:cache
- Solution:
- Verify
GITHUB_TOKEN
is set and has correct permissions - Check for GitHub API rate limiting
- Ensure repository configuration is correct
- Verify
- Symptom: Error during
-
No Data Showing
- Symptom: Empty activity list
- Solution:
- Verify cache was generated successfully
- Check date range filter settings
- Run
npm run build:cache
to refresh data
-
Development Server Shows Old Data
- Symptom: Changes in GitHub not reflected
- Solution: Run
npm run build:cache
to update the cache
If you encounter issues:
- Check the browser console for error messages
- Verify environment variables are set correctly
- Ensure GitHub token has required permissions
- Open an issue in the repository with:
- Description of the problem
- Steps to reproduce
- Error messages (if any)
- Environment details (OS, browser, Node.js version)
- Fork the repository
- Create a feature branch
- Make your changes
- Write or update tests
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.