Implementing an RPC monitoring solution with a web-ui as implementation example. (#244)
* bd sync: 2025-10-30 12:12:27 * Working on frontend * bd sync: 2025-11-06 16:55:55 * feat: finish bd monitor human viewer * Merge conflicts resolved and added tests * bd sync: 2025-11-06 17:23:41 * bd sync: 2025-11-06 17:34:52 * feat: Add reload button and multiselect status filter to monitor - Changed status filter from single select to multiselect with 'Open' selected by default - Added reload button with visual feedback (hover/active states) - Updated filterIssues() to handle multiple selected statuses - Added reloadData() function that reloads both stats and issues - Improved responsive design for mobile devices - Filter controls now use flexbox layout with better spacing * fix: Update monitor statistics to show Total, In Progress, Open, Closed - Replaced 'Ready to Work' stat with 'In Progress' stat - Reordered stats to show logical progression: Total -> In Progress -> Open -> Closed - Updated loadStats() to fetch in-progress count from stats API - Removed unnecessary separate API call for ready count * fix: Correct API field names in monitor stats JavaScript The JavaScript was using incorrect field names (stats.total, stats.by_status) that don't match the actual types.Statistics struct which uses flat fields with underscores (total_issues, in_progress_issues, etc). Fixed by updating loadStats() to use correct field names: - stats.total -> stats.total_issues - stats.by_status?.['in-progress'] -> stats.in_progress_issues - stats.by_status?.open -> stats.open_issues - stats.by_status?.closed -> stats.closed_issues Fixes beads-9 * bd sync: 2025-11-06 17:51:24 * bd sync: 2025-11-06 17:56:09 * fix: Make monitor require daemon to prevent SQLite locking Implemented Option 1 from beads-eel: monitor now requires daemon and never opens direct SQLite connection. Changes: - Added 'monitor' to noDbCommands list in main.go to skip normal DB initialization - Added validateDaemonForMonitor() PreRun function that: - Finds database path using beads.FindDatabasePath() - Validates daemon is running and healthy - Fails gracefully with clear error message if no daemon - Only uses RPC connection, never opens SQLite directly Benefits: - Eliminates SQLite locking conflicts between monitor and daemon - Users can now close/update issues via CLI while monitor runs - Clear error messages guide users to start daemon first Fixes beads-eel * bd sync: 2025-11-06 18:03:50 * docs: Add bd daemons restart subcommand documentation Added documentation for the 'bd daemons restart' subcommand across all documentation files: - commands/daemons.md: Added full restart subcommand section with synopsis, description, arguments, flags, and examples - README.md: Added restart examples to daemon management section - AGENTS.md: Added restart examples with --json flag for agents The restart command gracefully stops and starts a specific daemon by workspace path or PID, useful after upgrading bd or when a daemon needs refreshing. Fixes beads-11 * bd sync: 2025-11-06 18:13:16 * Separated the web ui from the general monitoring functionality --------- Co-authored-by: Steve Yegge <stevey@sourcegraph.com>
This commit is contained in:
@@ -634,6 +634,10 @@ bd daemons health
|
||||
bd daemons stop /path/to/workspace
|
||||
bd daemons stop 12345 # By PID
|
||||
|
||||
# Restart a specific daemon
|
||||
bd daemons restart /path/to/workspace
|
||||
bd daemons restart 12345 # By PID
|
||||
|
||||
# View daemon logs
|
||||
bd daemons logs /path/to/workspace -n 100
|
||||
bd daemons logs 12345 -f # Follow mode
|
||||
@@ -650,6 +654,39 @@ bd daemons killall --force # Force kill if graceful fails
|
||||
|
||||
See [commands/daemons.md](commands/daemons.md) for complete documentation.
|
||||
|
||||
### Web Interface
|
||||
|
||||
A standalone web interface for real-time issue monitoring is available as an example:
|
||||
|
||||
```bash
|
||||
# Build the monitor-webui
|
||||
cd examples/monitor-webui
|
||||
go build
|
||||
|
||||
# Start web UI on localhost:8080
|
||||
./monitor-webui
|
||||
|
||||
# Custom port and host
|
||||
./monitor-webui -port 3000
|
||||
./monitor-webui -host 0.0.0.0 -port 8080 # Listen on all interfaces
|
||||
```
|
||||
|
||||
The monitor provides:
|
||||
- **Real-time table view** of all issues with filtering by status and priority
|
||||
- **Click-through details** - Click any issue to view full details in a modal
|
||||
- **Live updates** - WebSocket connection for real-time changes via daemon RPC
|
||||
- **Responsive design** - Mobile-friendly card view on small screens
|
||||
- **Statistics dashboard** - Quick overview of issue counts and ready work
|
||||
- **Clean UI** - Simple, fast interface styled with milligram.css
|
||||
|
||||
The monitor is particularly useful for:
|
||||
- **Team visibility** - Share a dashboard view of project status
|
||||
- **AI agent supervision** - Watch your coding agent create and update issues in real-time
|
||||
- **Quick browsing** - Faster than CLI for exploring issue details
|
||||
- **Mobile access** - Check project status from your phone
|
||||
|
||||
See [examples/monitor-webui/](examples/monitor-webui/) for complete documentation.
|
||||
|
||||
## Examples
|
||||
|
||||
Check out the **[examples/](examples/)** directory for:
|
||||
|
||||
Reference in New Issue
Block a user