orbit-dashboard 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orbit_dashboard-1.0.0/.gitignore +18 -0
- orbit_dashboard-1.0.0/CLAUDE.md +168 -0
- orbit_dashboard-1.0.0/PKG-INFO +89 -0
- orbit_dashboard-1.0.0/README.md +50 -0
- orbit_dashboard-1.0.0/migrate_to_duckdb.py +674 -0
- orbit_dashboard-1.0.0/orbit_dashboard/__init__.py +3 -0
- orbit_dashboard-1.0.0/orbit_dashboard/assets/logo_icon.png +0 -0
- orbit_dashboard-1.0.0/orbit_dashboard/assets/orbit_logo_black.png +0 -0
- orbit_dashboard-1.0.0/orbit_dashboard/assets/orbit_logo_white.png +0 -0
- orbit_dashboard-1.0.0/orbit_dashboard/cli.py +349 -0
- orbit_dashboard-1.0.0/orbit_dashboard/index.html +7780 -0
- orbit_dashboard-1.0.0/orbit_dashboard/lib/__init__.py +5 -0
- orbit_dashboard-1.0.0/orbit_dashboard/lib/analytics_db.py +3737 -0
- orbit_dashboard-1.0.0/orbit_dashboard/lib/config.py +166 -0
- orbit_dashboard-1.0.0/orbit_dashboard/lib/jsonl_parser.py +510 -0
- orbit_dashboard-1.0.0/orbit_dashboard/server.py +2761 -0
- orbit_dashboard-1.0.0/pyproject.toml +67 -0
- orbit_dashboard-1.0.0/requirements.txt +18 -0
- orbit_dashboard-1.0.0/scripts/seed_demo_data.py +1023 -0
- orbit_dashboard-1.0.0/tests/conftest.py +3 -0
- orbit_dashboard-1.0.0/tests/test_analytics_parse.py +79 -0
- orbit_dashboard-1.0.0/tests/test_cli.py +120 -0
- orbit_dashboard-1.0.0/tests/test_config.py +156 -0
- orbit_dashboard-1.0.0/tests/test_jsonl_parser.py +153 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Orbit Dashboard
|
|
2
|
+
|
|
3
|
+
Dashboard for productivity tracking and task analytics.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Start server (usually runs via launchd)
|
|
9
|
+
python3.11 server.py
|
|
10
|
+
|
|
11
|
+
# Access dashboard
|
|
12
|
+
open http://localhost:8787
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
### Database (Dual-DB Pattern)
|
|
18
|
+
|
|
19
|
+
| Database | File | Purpose |
|
|
20
|
+
|----------|------|---------|
|
|
21
|
+
| SQLite | `~/.claude/tasks.db` | Source of truth for **writes** (heartbeats, sessions) |
|
|
22
|
+
| DuckDB | `~/.claude/tasks.duckdb` | Analytics database for **reads** (fast columnar queries) |
|
|
23
|
+
|
|
24
|
+
**Data flow:** Claude Code hooks -> SQLite -> sync -> DuckDB -> Dashboard
|
|
25
|
+
|
|
26
|
+
**Sync happens:**
|
|
27
|
+
- On server startup
|
|
28
|
+
- Via `/api/sync` endpoint
|
|
29
|
+
- Via `migrate_to_duckdb.py` script
|
|
30
|
+
|
|
31
|
+
### Key Files
|
|
32
|
+
|
|
33
|
+
| File | Lines | Purpose |
|
|
34
|
+
|------|-------|---------|
|
|
35
|
+
| `server.py` | ~4000 | FastAPI backend with all APIs |
|
|
36
|
+
| `index.html` | ~7700 | Single-page app (embedded CSS/JS) |
|
|
37
|
+
| `lib/analytics_db.py` | ~1100 | DuckDB operations layer |
|
|
38
|
+
| `migrate_to_duckdb.py` | ~600 | SQLite -> DuckDB migration |
|
|
39
|
+
|
|
40
|
+
### Deployment
|
|
41
|
+
|
|
42
|
+
- **Launchd plist**: `~/Library/LaunchAgents/com.orbit.dashboard.plist`
|
|
43
|
+
- **Python**: Must use `/opt/homebrew/bin/python3.11` (not system Python)
|
|
44
|
+
- **Port**: 8787
|
|
45
|
+
|
|
46
|
+
## API Reference
|
|
47
|
+
|
|
48
|
+
### Project & Activity APIs
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
GET /api/tasks/active # Active tasks (excludes orphans with orbit files in completed/)
|
|
52
|
+
GET /api/tasks/completed # Completed tasks + orphans (orbit files in completed/)
|
|
53
|
+
GET /api/stats/today # Today's activity (tasks, LOC, sessions)
|
|
54
|
+
GET /api/stats/day?date= # Historical day stats
|
|
55
|
+
GET /api/stats/history?days=N # Aggregate with heatmap, trends
|
|
56
|
+
GET /api/task/{id}/files # Task orbit files (plan, context, tasks.md)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Utility APIs
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
GET /api/all # Combined initial load data
|
|
63
|
+
GET /api/sync # Trigger SQLite -> DuckDB sync
|
|
64
|
+
GET /health # Health check
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Frontend Views
|
|
68
|
+
|
|
69
|
+
### #projects (default)
|
|
70
|
+
- Active projects table (clickable for modal)
|
|
71
|
+
- Completed projects table
|
|
72
|
+
|
|
73
|
+
### #activity
|
|
74
|
+
- Header stats card (time, LOC, commits, tasks)
|
|
75
|
+
- Today's activity with date navigation
|
|
76
|
+
- Hourly activity bar chart + timeline
|
|
77
|
+
- Activity history with heatmap and trends
|
|
78
|
+
|
|
79
|
+
## Orbit Location Detection
|
|
80
|
+
|
|
81
|
+
The `parse_orbit_progress()` function intelligently finds orbit files in the centralized location:
|
|
82
|
+
- Primary path: `~/.claude/orbit/{active,completed}/<task-name>/`
|
|
83
|
+
- Legacy fallback: repo-local `dev/{active,completed}/` paths (for older projects)
|
|
84
|
+
|
|
85
|
+
### Search Order
|
|
86
|
+
|
|
87
|
+
For a task with `full_path = "active/task-name"`:
|
|
88
|
+
|
|
89
|
+
1. Centralized active: `~/.claude/orbit/active/task-name/`
|
|
90
|
+
2. Centralized completed: `~/.claude/orbit/completed/task-name/`
|
|
91
|
+
3. Legacy repo-local: `{repo_path}/dev/active/task-name/` (fallback)
|
|
92
|
+
4. Legacy completed: `{repo_path}/dev/completed/task-name/` (fallback)
|
|
93
|
+
|
|
94
|
+
### File Name Fallbacks
|
|
95
|
+
|
|
96
|
+
Within a task directory, looks for files in order:
|
|
97
|
+
- Tasks: `{task-name}-tasks.md` -> `tasks.md`
|
|
98
|
+
- Context: `{task-name}-context.md` -> `context.md` -> `shared-context.md`
|
|
99
|
+
|
|
100
|
+
### Orphan Task Handling
|
|
101
|
+
|
|
102
|
+
Tasks can become "orphans" when orbit files are moved to `~/.claude/orbit/completed/` but the database `status` field isn't updated.
|
|
103
|
+
|
|
104
|
+
**Detection:** `parse_orbit_progress()` returns `orbit_in_completed: true` when orbit files are found in a completed path.
|
|
105
|
+
|
|
106
|
+
**API Behavior:**
|
|
107
|
+
- `/api/tasks/active` - Filters OUT tasks where `orbit_in_completed=true`
|
|
108
|
+
- `/api/tasks/completed` - Includes orphan tasks (DB status='active' but orbit files in completed)
|
|
109
|
+
|
|
110
|
+
This ensures the dashboard shows tasks in the correct list based on actual orbit file location, not stale DB status.
|
|
111
|
+
|
|
112
|
+
## Common Issues
|
|
113
|
+
|
|
114
|
+
### Dashboard empty after Mac restart
|
|
115
|
+
**Cause:** DuckDB tables missing (corruption or Python version mismatch)
|
|
116
|
+
**Fix:**
|
|
117
|
+
```bash
|
|
118
|
+
# Stop service
|
|
119
|
+
launchctl unload ~/Library/LaunchAgents/com.orbit.dashboard.plist
|
|
120
|
+
|
|
121
|
+
# Re-run migration
|
|
122
|
+
/opt/homebrew/bin/python3.11 migrate_to_duckdb.py
|
|
123
|
+
|
|
124
|
+
# Restart service
|
|
125
|
+
launchctl load ~/Library/LaunchAgents/com.orbit.dashboard.plist
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Wrong Python version in launchd
|
|
129
|
+
**Symptom:** `ModuleNotFoundError: No module named 'fastapi'`
|
|
130
|
+
**Fix:** Ensure plist uses `/opt/homebrew/bin/python3.11`, not `/usr/bin/python3`
|
|
131
|
+
|
|
132
|
+
### DuckDB locked error
|
|
133
|
+
**Cause:** Server process holding exclusive lock
|
|
134
|
+
**Fix:** Stop the dashboard service before running migrations
|
|
135
|
+
|
|
136
|
+
### Time tracking gaps
|
|
137
|
+
**Cause:** Heartbeats only sent on `UserPromptSubmit` (when user sends prompt)
|
|
138
|
+
**Mitigation:** Config uses 30-min idle timeout, 5-min assumed work per heartbeat
|
|
139
|
+
|
|
140
|
+
## Dependencies
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
fastapi
|
|
144
|
+
uvicorn
|
|
145
|
+
httpx
|
|
146
|
+
duckdb
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Install for Python 3.11:
|
|
150
|
+
```bash
|
|
151
|
+
/opt/homebrew/bin/python3.11 -m pip install fastapi uvicorn httpx duckdb
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Related Files
|
|
155
|
+
|
|
156
|
+
| Location | Purpose |
|
|
157
|
+
|----------|---------|
|
|
158
|
+
| `~/.claude/tasks.db` | SQLite source database |
|
|
159
|
+
| `~/.claude/tasks.duckdb` | DuckDB analytics database |
|
|
160
|
+
| `~/Library/LaunchAgents/com.orbit.dashboard.plist` | Launchd service config |
|
|
161
|
+
|
|
162
|
+
## Code Style
|
|
163
|
+
|
|
164
|
+
- Python 3.11+ syntax (`str | None`, `list[dict]`, match statements)
|
|
165
|
+
- Type hints on all function signatures
|
|
166
|
+
- FastAPI with Pydantic models for request validation
|
|
167
|
+
- Single HTML file with embedded CSS/JS (no build tools)
|
|
168
|
+
- CSS variables for theming, dark/light toggle with localStorage persistence
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: orbit-dashboard
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Orbit Dashboard - Task analytics and autonomous execution monitoring for Claude Code orbit projects
|
|
5
|
+
Project-URL: Homepage, https://github.com/tomerbr1/claude-orbit
|
|
6
|
+
Project-URL: Repository, https://github.com/tomerbr1/claude-orbit.git
|
|
7
|
+
Project-URL: Issues, https://github.com/tomerbr1/claude-orbit/issues
|
|
8
|
+
Author-email: Tomer Brami <tomerbrami@gmail.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: analytics,claude,dashboard,orbit,task-management
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Web Environment
|
|
13
|
+
Classifier: Framework :: FastAPI
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Software Development
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: duckdb>=1.1.0
|
|
23
|
+
Requires-Dist: fastapi>=0.115.0
|
|
24
|
+
Requires-Dist: httpx>=0.28.0
|
|
25
|
+
Requires-Dist: orbit-db>=1.0.0
|
|
26
|
+
Requires-Dist: sse-starlette>=2.0.0
|
|
27
|
+
Requires-Dist: uvicorn[standard]>=0.32.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
30
|
+
Provides-Extra: learn
|
|
31
|
+
Requires-Dist: anthropic>=0.40.0; extra == 'learn'
|
|
32
|
+
Requires-Dist: python-slugify>=8.0.0; extra == 'learn'
|
|
33
|
+
Provides-Extra: rss
|
|
34
|
+
Requires-Dist: beautifulsoup4>=4.12.0; extra == 'rss'
|
|
35
|
+
Requires-Dist: feedparser>=6.0.0; extra == 'rss'
|
|
36
|
+
Requires-Dist: lxml>=5.0.0; extra == 'rss'
|
|
37
|
+
Requires-Dist: readability-lxml>=0.8.0; extra == 'rss'
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
# orbit-dashboard
|
|
41
|
+
|
|
42
|
+
Task analytics and autonomous execution monitoring for the
|
|
43
|
+
[orbit](https://github.com/tomerbr1/claude-orbit) Claude Code plugin.
|
|
44
|
+
|
|
45
|
+
A local FastAPI web dashboard at `http://localhost:8787` that surfaces:
|
|
46
|
+
|
|
47
|
+
- Per-project, per-repo, per-day time breakdowns
|
|
48
|
+
- Orbit Auto execution monitoring with live SSE streaming
|
|
49
|
+
- Claude Code usage stats (session/weekly limits, token costs)
|
|
50
|
+
- Activity timeline with tracked and untracked session reconciliation
|
|
51
|
+
|
|
52
|
+
Built on a dual-DB pattern: SQLite (writes, via `orbit-db`) + DuckDB
|
|
53
|
+
(analytics reads).
|
|
54
|
+
|
|
55
|
+
## Install
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install orbit-dashboard
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Optional feature extras:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install "orbit-dashboard[rss]" # RSS feeds feature
|
|
65
|
+
pip install "orbit-dashboard[learn]" # AI-generated learning docs
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Run
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Default: serve on port 8787
|
|
72
|
+
orbit-dashboard
|
|
73
|
+
|
|
74
|
+
# Override port via env var
|
|
75
|
+
ORBIT_DASHBOARD_PORT=9000 orbit-dashboard
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Open `http://localhost:8787` in your browser.
|
|
79
|
+
|
|
80
|
+
## Install as a service
|
|
81
|
+
|
|
82
|
+
`orbit-dashboard install-service` registers the dashboard as a launchd
|
|
83
|
+
(macOS) or systemd user unit (Linux) so it starts on login. See the
|
|
84
|
+
[orbit project](https://github.com/tomerbr1/claude-orbit) for the full
|
|
85
|
+
install guide.
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# orbit-dashboard
|
|
2
|
+
|
|
3
|
+
Task analytics and autonomous execution monitoring for the
|
|
4
|
+
[orbit](https://github.com/tomerbr1/claude-orbit) Claude Code plugin.
|
|
5
|
+
|
|
6
|
+
A local FastAPI web dashboard at `http://localhost:8787` that surfaces:
|
|
7
|
+
|
|
8
|
+
- Per-project, per-repo, per-day time breakdowns
|
|
9
|
+
- Orbit Auto execution monitoring with live SSE streaming
|
|
10
|
+
- Claude Code usage stats (session/weekly limits, token costs)
|
|
11
|
+
- Activity timeline with tracked and untracked session reconciliation
|
|
12
|
+
|
|
13
|
+
Built on a dual-DB pattern: SQLite (writes, via `orbit-db`) + DuckDB
|
|
14
|
+
(analytics reads).
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install orbit-dashboard
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Optional feature extras:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install "orbit-dashboard[rss]" # RSS feeds feature
|
|
26
|
+
pip install "orbit-dashboard[learn]" # AI-generated learning docs
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Run
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Default: serve on port 8787
|
|
33
|
+
orbit-dashboard
|
|
34
|
+
|
|
35
|
+
# Override port via env var
|
|
36
|
+
ORBIT_DASHBOARD_PORT=9000 orbit-dashboard
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Open `http://localhost:8787` in your browser.
|
|
40
|
+
|
|
41
|
+
## Install as a service
|
|
42
|
+
|
|
43
|
+
`orbit-dashboard install-service` registers the dashboard as a launchd
|
|
44
|
+
(macOS) or systemd user unit (Linux) so it starts on login. See the
|
|
45
|
+
[orbit project](https://github.com/tomerbr1/claude-orbit) for the full
|
|
46
|
+
install guide.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
MIT
|