claude-team-dashboard 1.2.6

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.
package/README.md ADDED
@@ -0,0 +1,898 @@
1
+ <div align="center">
2
+
3
+ # πŸ€– Claude Agent Dashboard
4
+
5
+ ### Stop Flying Blind β€” Monitor Your Claude Code Agent Teams in Real Time
6
+
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/mukul975/claude-team-dashboard/blob/main/LICENSE)
8
+ [![Node.js](https://img.shields.io/badge/Node.js-18%2B-green.svg)](https://nodejs.org/)
9
+ [![JavaScript](https://img.shields.io/badge/JavaScript-58%25-F7DF1E.svg?logo=javascript&logoColor=black)](https://github.com/mukul975/claude-team-dashboard)
10
+ [![Vite](https://img.shields.io/badge/Vite-7.x-646CFF.svg?logo=vite&logoColor=white)](https://vitejs.dev/)
11
+ [![WebSocket](https://img.shields.io/badge/WebSocket-Real--Time-010101.svg?logo=socketdotio&logoColor=white)](https://github.com/mukul975/claude-team-dashboard)
12
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/mukul975/claude-team-dashboard/pulls)
13
+ [![GitHub Stars](https://img.shields.io/github/stars/mukul975/claude-team-dashboard?style=social)](https://github.com/mukul975/claude-team-dashboard)
14
+
15
+ **Monitor, track, and orchestrate** your [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview) agent teams from a **single, unified dashboard** β€” with **zero-delay WebSocket streaming**.
16
+
17
+ [**Get Started**](#-quick-start) Β· [**See Features**](#-features) Β· [**Live Demo**](#-demo) Β· [**Docs**](#-documentation) Β· [**Contributing**](#-contributing)
18
+
19
+ ---
20
+
21
+ </div>
22
+
23
+ ## 🎯 Why This Exists
24
+
25
+ ### The Problem
26
+
27
+ You're running multiple Claude Code agents across projects. Suddenly, chaos:
28
+
29
+ - **Lost visibility**: Which agent is doing what? You have no idea.
30
+ - **Ghost messages**: Agents talk to each other. You can't see it.
31
+ - **Debug hell**: Something breaks. You're stuck playing detective across 5 terminal windows.
32
+ - **Task black holes**: Tasks start, disappear, maybe finish. Who knows?
33
+
34
+ **Running multi-agent workflows without monitoring is like driving blindfolded.**
35
+
36
+ ### The Solution
37
+
38
+ Claude Agent Dashboard gives you **X-ray vision into your agent teams**:
39
+
40
+ βœ… **See everything** β€” Live status, tasks, messages, system metrics
41
+ βœ… **Debug faster** β€” Trace inter-agent communication in real time
42
+ βœ… **Stay in control** β€” Know exactly what's happening, always
43
+ βœ… **Ship with confidence** β€” Spot failures before they cascade
44
+
45
+ > Built by a **cybersecurity researcher** who knows that **visibility is the first line of defense** β€” even for AI agents.
46
+
47
+ ---
48
+
49
+ ## ✨ Highlights
50
+
51
+ <table>
52
+ <tr>
53
+ <td width="50%">
54
+
55
+ ### πŸš€ **Zero-Config Real-Time Monitoring**
56
+
57
+ Launch the dashboard with **one command**. WebSocket streaming auto-discovers agents. No configuration needed.
58
+
59
+ ### πŸ“‹ **Visual Task Management**
60
+
61
+ See tasks as they flow through your agent team. **Progress bars**, status badges, dependency chains β€” all live-updated.
62
+
63
+ ### πŸ’¬ **Inter-Agent Message Inspector**
64
+
65
+ Debug coordination issues instantly. Watch agents communicate in real time with **full message history** and **conversation threads**.
66
+
67
+ ### πŸŒ— **Full Light & Dark Mode**
68
+
69
+ Pixel-perfect theming with CSS custom properties. Every component β€” cards, charts, modals, toasts β€” adapts instantly when you toggle the theme.
70
+
71
+ ### β™Ώ **WCAG-Accessible Interface**
72
+
73
+ Every button has a descriptive `aria-label`. Interactive elements have `role`, `tabIndex`, and keyboard handlers. Status components use `aria-live`. Modals trap focus. Fully navigable without a mouse.
74
+
75
+ ### ⌨️ **Keyboard-First Navigation**
76
+
77
+ Command palette (`⌘K`), tab shortcuts (`⌘1-8`), and a shortcuts modal (`?`) so you never have to touch the mouse.
78
+
79
+ </td>
80
+ <td width="50%">
81
+
82
+ ### πŸ“Š **Live Activity Chronology**
83
+
84
+ Every agent action β€” **timestamped**, **color-coded**, **filterable**. Never wonder "what happened?" again.
85
+
86
+ ### πŸ–₯️ **System Performance Metrics**
87
+
88
+ Track CPU, memory, and network usage across your agent infrastructure. Catch performance bottlenecks **before** they cause failures.
89
+
90
+ ### πŸ”” **Smart Alerts & Notifications**
91
+
92
+ Instant desktop notifications for task completions, errors, and state changes. Full **notification center** with grouping, mark-read, and tab navigation.
93
+
94
+ ### πŸ“€ **One-Click Data Export**
95
+
96
+ Export any team's tasks and inbox messages as **JSON or CSV** directly from the header. Full data portability built-in.
97
+
98
+ ### πŸ“± **PWA β€” Installable & Offline-Ready**
99
+
100
+ Works as a **Progressive Web App** β€” add to your home screen, get an app icon, and keep viewing cached data when the server is temporarily unreachable.
101
+
102
+ ### πŸ”’ **Enterprise-Grade Security**
103
+
104
+ Audited by 6 security specialists. OWASP scrypt password hashing, auth rate limiting, token rotation, tight CSP, CORP/COOP, Permissions-Policy, strict input validation on every route, WebSocket heartbeat + rate limiting, and `followSymlinks: false` on all file watchers. Zero npm vulnerabilities.
105
+
106
+ </td>
107
+ </tr>
108
+ </table>
109
+
110
+ > πŸ“˜ **Deep dive**: See [**FEATURES.md**](FEATURES.md) for the complete feature breakdown with architecture details.
111
+
112
+ ---
113
+
114
+ ## πŸš€ Quick Start
115
+
116
+ ### βœ… Prerequisites
117
+
118
+ - **Node.js** v18+ ([Download](https://nodejs.org/))
119
+
120
+ ### πŸ› οΈ Setup
121
+
122
+ ```bash
123
+ # 1. Clone the repo
124
+ git clone https://github.com/mukul975/claude-team-dashboard.git
125
+ cd claude-team-dashboard
126
+
127
+ # 2. Install dependencies
128
+ npm install
129
+
130
+ # 3. Build the frontend
131
+ npm run build
132
+
133
+ # 4. Start the dashboard
134
+ npm start
135
+ ```
136
+
137
+ Open **http://localhost:3001** and you're monitoring agents in real time.
138
+
139
+ ### πŸ”’ Password Authentication
140
+
141
+ The dashboard **always requires a password**. The first time you open it, you'll see a setup screen β€” create your password there. After that, you'll be asked for it on every visit.
142
+
143
+ **First run:**
144
+ ```
145
+ npm start
146
+ β†’ open http://localhost:3001
147
+ β†’ "Set Up Dashboard" screen appears
148
+ β†’ enter and confirm your password
149
+ β†’ dashboard unlocks
150
+ ```
151
+
152
+ **Every run after that:**
153
+ ```
154
+ npm start
155
+ β†’ open http://localhost:3001
156
+ β†’ login screen appears
157
+ β†’ enter your password
158
+ β†’ dashboard unlocks
159
+ ```
160
+
161
+ Your password is stored as a secure `scrypt` hash in `~/.claude/dashboard.key`. The session token lives in `sessionStorage` and clears when the browser tab closes.
162
+
163
+ ### 🎁 Dev Container (Instant Environment)
164
+
165
+ Have VS Code + Docker? **Skip setup entirely**:
166
+
167
+ 1. Open project in VS Code
168
+ 2. Click "Reopen in Container" when prompted
169
+ 3. Everything auto-installs. You're ready.
170
+
171
+ ### πŸ§‘β€πŸ’» Development Mode
172
+
173
+ To work on the frontend with hot-reload:
174
+
175
+ ```bash
176
+ # Terminal 1 β€” backend
177
+ npm run server
178
+
179
+ # Terminal 2 β€” frontend dev server
180
+ npm run dev
181
+ ```
182
+
183
+ **What gets monitored automatically:**
184
+ - `~/.claude/teams/` β€” Active agent teams
185
+ - `~/.claude/tasks/` β€” Task management
186
+ - `/tmp/claude/{project}/tasks/` β€” Agent outputs
187
+
188
+ ---
189
+
190
+ ## 🎬 Demo
191
+
192
+ <!-- VIDEO/GIF PLACEHOLDER -->
193
+ > **πŸŽ₯ Demo video coming soon** β€” Watch a 2-minute walkthrough of key features
194
+
195
+ **Try it yourself**: Clone the repo and run `npm start` β€” see your agent team in action within 60 seconds.
196
+
197
+ ---
198
+
199
+ ## πŸ—οΈ How It Works
200
+
201
+ ### Architecture at a Glance
202
+
203
+ ```
204
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
205
+ β”‚ Frontend (React + Vite) β”‚
206
+ β”‚ β”œβ”€β”€ Real-time UI components β”‚
207
+ β”‚ β”œβ”€β”€ WebSocket client β”‚
208
+ β”‚ └── State management β”‚
209
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
210
+ β”‚ WebSocket (bidirectional)
211
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
212
+ β”‚ Backend (Node.js + Express) β”‚
213
+ β”‚ β”œβ”€β”€ WebSocket server β”‚
214
+ β”‚ β”œβ”€β”€ Agent event aggregation β”‚
215
+ β”‚ └── File system monitoring (chokidar) β”‚
216
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
217
+ β”‚ Reads agent logs
218
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
219
+ β”‚ Claude Code Agent Teams β”‚
220
+ β”‚ β”œβ”€β”€ ~/.claude/projects/{project}/*.jsonl β”‚
221
+ β”‚ └── Real-time agent session logs β”‚
222
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
223
+ ```
224
+
225
+ ## πŸ“¬ Inbox Monitoring
226
+
227
+ ### How Claude Code Agent Teams Communicate
228
+
229
+ When Claude Code creates a team, it creates this folder structure:
230
+ ```
231
+ ~/.claude/teams/
232
+ └── {team-name}/
233
+ β”œβ”€β”€ config.json ← team configuration & members
234
+ └── inboxes/
235
+ β”œβ”€β”€ team-lead.json ← messages for team-lead
236
+ β”œβ”€β”€ researcher.json ← messages for researcher
237
+ └── ... ← one file per agent
238
+ ```
239
+
240
+ Each inbox file is a JSON array of messages:
241
+ ```json
242
+ [
243
+ {
244
+ "from": "team-lead",
245
+ "text": "Your task assignment...",
246
+ "summary": "Brief summary",
247
+ "timestamp": "2026-02-18T10:00:00.000Z",
248
+ "read": false,
249
+ "color": "green"
250
+ }
251
+ ]
252
+ ```
253
+
254
+ ### Real-Time Inbox Monitoring
255
+
256
+ The dashboard watches `~/.claude/teams/*/inboxes/*.json` with a dedicated chokidar watcher. Every time an inbox file changes:
257
+ - The new messages are read immediately
258
+ - An `inbox_update` WebSocket event is pushed to all connected dashboard clients
259
+ - The UI updates in real-time β€” no polling required
260
+
261
+ On initial connection, `allInboxes` is included in the `initial_data` payload so you see all current messages instantly.
262
+
263
+ ### What the Dashboard Shows
264
+
265
+ | Feature | Description |
266
+ |---------|-------------|
267
+ | **Inbox Viewer** | Browse all teams β†’ agents β†’ message threads |
268
+ | **Unread Badges** | Red badge on team cards and Inboxes tab |
269
+ | **Activity Timeline** | All agent messages in chronological order |
270
+ | **Desktop Notifications** | Browser notifications for new messages |
271
+ | **Search** | Full-text search across all messages |
272
+ | **Export** | Download messages as JSON or CSV |
273
+
274
+ ### API Endpoints
275
+
276
+ | Endpoint | Description |
277
+ |----------|-------------|
278
+ | `GET /api/inboxes` | All teams' inboxes at once |
279
+ | `GET /api/teams/:teamName/inboxes` | All agents' inboxes for one team |
280
+ | `GET /api/teams/:teamName/inboxes/:agentName` | Specific agent's inbox |
281
+
282
+ ### WebSocket Events
283
+
284
+ ```js
285
+ // On connect β€” full inbox snapshot
286
+ { type: 'initial_data', allInboxes: { [teamName]: { [agentName]: { messages, messageCount } } } }
287
+
288
+ // On inbox change β€” targeted update
289
+ { type: 'inbox_update', teamName: string, inboxes: { [agentName]: { messages, messageCount } } }
290
+ ```
291
+
292
+ ---
293
+
294
+ ### Project Structure
295
+
296
+ ```
297
+ claude-team-dashboard/
298
+ β”œβ”€β”€ src/ # Frontend source code
299
+ β”‚ β”œβ”€β”€ components/ # React UI components
300
+ β”‚ β”‚ β”œβ”€β”€ InboxViewer.jsx # Browse agent inbox messages
301
+ β”‚ β”‚ └── TeamTimeline.jsx # Chronological activity timeline
302
+ β”‚ β”œβ”€β”€ hooks/ # Custom React hooks
303
+ β”‚ β”‚ └── useInboxNotifications.js # Browser notifications for new messages
304
+ β”‚ β”œβ”€β”€ utils/ # Shared utilities
305
+ β”‚ β”‚ β”œβ”€β”€ messageParser.js # Natural language message parsing
306
+ β”‚ β”‚ └── formatting.js # Time, color, initials utilities
307
+ β”‚ β”œβ”€β”€ config/ # Configuration constants
308
+ β”‚ β”œβ”€β”€ styles/ # CSS stylesheets
309
+ β”‚ └── test/ # Test setup
310
+ β”œβ”€β”€ .devcontainer/ # VS Code dev container config
311
+ β”œβ”€β”€ .github/ # GitHub templates & workflows
312
+ β”‚ └── workflows/ # CI/CD pipelines
313
+ β”œβ”€β”€ test/ # Test files
314
+ β”œβ”€β”€ dist/ # Production build output
315
+ β”œβ”€β”€ server.js # WebSocket backend server
316
+ β”œβ”€β”€ start.js # Launcher script
317
+ β”œβ”€β”€ cleanup.js # Process cleanup utility
318
+ β”œβ”€β”€ config.js # Server configuration
319
+ β”œβ”€β”€ vite.config.js # Vite bundler config
320
+ β”œβ”€β”€ FEATURES.md # Detailed feature list
321
+ β”œβ”€β”€ CONTRIBUTING.md # Contribution guide
322
+ └── CODE_OF_CONDUCT.md # Community standards
323
+ ```
324
+
325
+ ---
326
+
327
+ ## πŸ› οΈ Built With
328
+
329
+ <table>
330
+ <tr>
331
+ <td align="center" width="25%">
332
+ <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/react/react-original.svg" width="48" height="48" alt="React" />
333
+ <br><strong>React 19.2</strong>
334
+ <br><sub>UI Framework</sub>
335
+ </td>
336
+ <td align="center" width="25%">
337
+ <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/nodejs/nodejs-original.svg" width="48" height="48" alt="Node.js" />
338
+ <br><strong>Node.js 18+</strong>
339
+ <br><sub>Backend Runtime</sub>
340
+ </td>
341
+ <td align="center" width="25%">
342
+ <img src="https://vitejs.dev/logo.svg" width="48" height="48" alt="Vite" />
343
+ <br><strong>Vite 7.x</strong>
344
+ <br><sub>Build Tool</sub>
345
+ </td>
346
+ <td align="center" width="25%">
347
+ <img src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/javascript/javascript-original.svg" width="48" height="48" alt="JavaScript" />
348
+ <br><strong>JavaScript ES6+</strong>
349
+ <br><sub>Core Language</sub>
350
+ </td>
351
+ </tr>
352
+ </table>
353
+
354
+ **Core Technologies:**
355
+
356
+ - **WebSocket (ws)** β€” Real-time bidirectional communication
357
+ - **Express.js** β€” Backend API framework
358
+ - **Chokidar** β€” File system monitoring for agent logs
359
+ - **Lucide React** β€” Icon library
360
+ - **Vitest** β€” Unit testing framework
361
+
362
+ ---
363
+
364
+ ## πŸ“– Documentation
365
+
366
+ | Document | Description |
367
+ |----------|-------------|
368
+ | [**FEATURES.md**](FEATURES.md) | Complete feature breakdown with technical architecture |
369
+ | [**NATURAL_LANGUAGE_AND_LIFECYCLE.md**](NATURAL_LANGUAGE_AND_LIFECYCLE.md) | **πŸ“– Comprehensive guide** to message parsing and team lifecycle tracking |
370
+ | [**CONTRIBUTING.md**](CONTRIBUTING.md) | How to contribute β€” setup, coding standards, PR process |
371
+ | [**CODE_OF_CONDUCT.md**](CODE_OF_CONDUCT.md) | Community guidelines and standards |
372
+ | [**Natural Language Features**](#-natural-language-message-parsing) | How the dashboard translates technical agent messages to readable format |
373
+ | [**Team Lifecycle Tracking**](#-team-lifecycle-tracking) | Automatic team monitoring, archiving, and history management |
374
+
375
+ **Need help?** Open a [Discussion](https://github.com/mukul975/claude-team-dashboard/discussions) or check existing [Issues](https://github.com/mukul975/claude-team-dashboard/issues).
376
+
377
+ ---
378
+
379
+ ## πŸ’¬ Natural Language Message Parsing
380
+
381
+ One of the dashboard's most powerful features is its ability to **automatically translate technical agent messages into human-readable natural language**. This makes it easy to understand what your agents are doing without decoding JSON or technical jargon.
382
+
383
+ ### How It Works
384
+
385
+ The dashboard intelligently parses inter-agent messages and converts them from raw technical format to friendly, contextual descriptions:
386
+
387
+ #### Message Type Detection
388
+
389
+ The parser automatically identifies message types and formats them appropriately:
390
+
391
+ **Status Updates**
392
+ ```json
393
+ // Raw message:
394
+ {"type": "idle_notification", "lastTaskSubject": "Fix authentication bug"}
395
+
396
+ // Displayed as:
397
+ πŸ’€ Finished "Fix authentication bug" - ready for next task
398
+ ```
399
+
400
+ **Task Completions**
401
+ ```json
402
+ // Raw message:
403
+ {"type": "task_completed", "taskSubject": "Write documentation"}
404
+
405
+ // Displayed as:
406
+ βœ… Completed: Write documentation
407
+ ```
408
+
409
+ **Task Assignments**
410
+ ```json
411
+ // Raw message:
412
+ {"type": "task_assigned", "taskSubject": "Review pull request"}
413
+
414
+ // Displayed as:
415
+ πŸ“‹ Started working on: Review pull request
416
+ ```
417
+
418
+ **Coordination Messages**
419
+ ```json
420
+ // Raw message:
421
+ {"type": "coordination", "message": "Waiting for backend team to finish API endpoint"}
422
+
423
+ // Displayed as:
424
+ 🀝 Waiting for backend team to finish API endpoint
425
+ ```
426
+
427
+ **Questions**
428
+ ```json
429
+ // Raw message:
430
+ {"type": "question", "message": "Should I use the staging or production database?"}
431
+
432
+ // Displayed as:
433
+ ❓ Should I use the staging or production database?
434
+ ```
435
+
436
+ ### Message Classification
437
+
438
+ Messages are automatically categorized into four types with distinct visual styling:
439
+
440
+ | Type | Icon | Color | Use Case |
441
+ |------|------|-------|----------|
442
+ | **Status** | πŸ“Š | Blue | General updates, progress reports, idle notifications |
443
+ | **Completion** | βœ… | Green | Task completions, success notifications |
444
+ | **Coordination** | 🀝 | Purple | Team communication, help requests, discussions |
445
+ | **Question** | ❓ | Yellow | Questions requiring attention or clarification |
446
+
447
+ ### Smart Features
448
+
449
+ **Summary Prioritization**: If a message includes a `summary` field, the dashboard displays it instead of the full technical content, making messages more concise.
450
+
451
+ **Truncation**: Long messages are automatically truncated to 150 characters with "..." to prevent UI clutter.
452
+
453
+ **Fallback Handling**: If a message can't be parsed as JSON, it's displayed as-is with intelligent handling of empty or malformed messages.
454
+
455
+ **Real-Time Translation**: Messages are parsed and displayed instantly as they arrive via WebSocket β€” no delays or batch processing.
456
+
457
+ ### Viewing Messages
458
+
459
+ The dashboard provides two views for agent communication:
460
+
461
+ **1. Live Communication Panel** (`LiveCommunication.jsx`)
462
+ - Chat-style interface showing conversation flow
463
+ - Team selector to focus on specific team messages
464
+ - Auto-scroll feature (can be toggled)
465
+ - Shows sender β†’ recipient for each message
466
+ - Updates every 5 seconds
467
+
468
+ **2. Agent Inter-Communication Stream** (`RealTimeMessages.jsx`)
469
+ - Aggregated view across all teams
470
+ - Filter messages by type (all, status, completion, coordination, question)
471
+ - Displays last 100 messages across all teams
472
+ - Shows team context for each message
473
+ - Visual stats showing breakdown by message type
474
+
475
+ ### Technical Implementation
476
+
477
+ The parsing logic is located in:
478
+ - **File**: `src/components/RealTimeMessages.jsx` (lines 8-83)
479
+ - **Function**: `parseMessageToNatural(text, summary)`
480
+
481
+ **Message Sources**: Messages are fetched from the Claude Code inbox files:
482
+ ```
483
+ ~/.claude/teams/{team-name}/inboxes/{agent-name}.json
484
+ ```
485
+
486
+ **API Endpoints**:
487
+ - `GET /api/teams/:teamName/inboxes` - Get all inboxes for a team
488
+ - `GET /api/teams/:teamName/inboxes/:agentName` - Get specific agent's inbox
489
+
490
+ ### Example: Message Flow
491
+
492
+ ```
493
+ 1. Agent sends technical message
494
+ β†’ Claude Code writes to ~/.claude/teams/my-team/inboxes/agent-1.json
495
+
496
+ 2. Dashboard fetches message via API
497
+ β†’ GET /api/teams/my-team/inboxes
498
+
499
+ 3. Parser processes message
500
+ β†’ parseMessageToNatural(rawMessage)
501
+
502
+ 4. Natural language message displayed
503
+ β†’ "πŸ’€ Finished 'Fix bug' - ready for next task"
504
+ ```
505
+
506
+ ### Benefits
507
+
508
+ - **No Technical Knowledge Required**: Anyone can understand what agents are doing
509
+ - **Quick Status Checks**: Glance at communication panel to see team progress
510
+ - **Contextual Understanding**: Message types provide instant context
511
+ - **Reduced Cognitive Load**: No need to parse JSON or technical logs
512
+ - **Instant Clarity**: Messages are translated in real-time as they arrive
513
+
514
+ ---
515
+
516
+ ## πŸ”„ Team Lifecycle Tracking
517
+
518
+ The dashboard automatically tracks the **complete lifecycle of every agent team** from creation to completion, with automatic archiving for historical reference.
519
+
520
+ ### Automatic Team Monitoring
521
+
522
+ The dashboard watches the Claude Code teams directory (`~/.claude/teams/`) in real-time and tracks:
523
+
524
+ **Team Creation**
525
+ - Automatically detected when a new `config.json` appears
526
+ - Logs creation timestamp
527
+ - Starts activity monitoring
528
+ - Console notification: `πŸŽ‰ New team created: {team-name}`
529
+
530
+ **Team Activity**
531
+ - Tracks every configuration change
532
+ - Updates "last seen" timestamp
533
+ - Monitors task progress
534
+ - Records all agent actions
535
+ - Console notification: `πŸ”„ Team active: {team-name}`
536
+
537
+ **Team Completion**
538
+ - Detected when team directory is removed
539
+ - Triggers automatic archiving
540
+ - Records final state
541
+ - Calculates session duration
542
+ - Console notification: `πŸ‘‹ Team completed: {team-name} - archiving for reference...`
543
+
544
+ ### Automatic Archiving System
545
+
546
+ When a team completes its work, the dashboard **automatically archives all team data** for future reference.
547
+
548
+ #### What Gets Archived
549
+
550
+ **Complete Team Snapshot**:
551
+ - Team configuration (name, description, lead, members)
552
+ - All tasks (subject, description, status, owner, dependencies)
553
+ - Team statistics (member count, task counts, completion rate)
554
+ - Lifecycle metadata (created date, duration, last activity)
555
+
556
+ **Natural Language Summary**:
557
+ ```json
558
+ {
559
+ "teamName": "dashboard-devops",
560
+ "archivedAt": "2026-02-10T15:30:00.000Z",
561
+ "summary": {
562
+ "overview": "Team 'dashboard-devops' with 4 members worked on 12 tasks and completed 10.",
563
+ "created": "Started on 02/10/2026",
564
+ "members": [
565
+ "team-lead (general-purpose)",
566
+ "backend-dev (general-purpose)",
567
+ "ui-polish-dev (general-purpose)",
568
+ "archive-viewer-dev (general-purpose)"
569
+ ],
570
+ "accomplishments": [
571
+ "βœ… Fix Communication tab to display natural language messages properly",
572
+ "βœ… Verify and improve team lifecycle archiving",
573
+ "βœ… Polish dashboard UI for better user experience",
574
+ "βœ… Add archive viewer component to frontend",
575
+ "βœ… Test all features and fix empty task outputs",
576
+ "βœ… Document natural language features and team lifecycle",
577
+ "βœ… Create archive viewer UI component",
578
+ "βœ… Add API endpoint for retrieving archives",
579
+ "βœ… Test archive functionality end-to-end",
580
+ "βœ… Write comprehensive documentation"
581
+ ],
582
+ "duration": "Active for 45 minutes"
583
+ },
584
+ "rawData": {
585
+ // Complete team data for detailed analysis
586
+ }
587
+ }
588
+ ```
589
+
590
+ #### Archive Storage
591
+
592
+ **Location**: `~/.claude/archive/`
593
+
594
+ **File Naming**: `{team-name}_{timestamp}.json`
595
+ - Example: `dashboard-devops_2026-02-10T15-30-00-000Z.json`
596
+ - Timestamp in ISO format with colons replaced by hyphens (filesystem-safe)
597
+
598
+ **Automatic Creation**: Archive directory is created automatically if it doesn't exist
599
+
600
+ #### Duration Tracking
601
+
602
+ The dashboard calculates how long each team was active:
603
+
604
+ ```javascript
605
+ // Example console output:
606
+ "πŸ“Š Team 'dashboard-devops' was active for 45 minutes"
607
+ ```
608
+
609
+ **Tracking Method**:
610
+ 1. Team created β†’ Start timestamp recorded
611
+ 2. Team activity β†’ Last seen timestamp updated
612
+ 3. Team completed β†’ Duration calculated from timestamps
613
+ 4. Duration included in archive summary
614
+
615
+ ### Archive Viewer (API)
616
+
617
+ Access archived team data programmatically:
618
+
619
+ **Get All Archives**
620
+ ```http
621
+ GET /api/archive
622
+ ```
623
+
624
+ **Response**:
625
+ ```json
626
+ {
627
+ "archives": [
628
+ {
629
+ "filename": "dashboard-devops_2026-02-10T15-30-00-000Z.json",
630
+ "overview": "Team 'dashboard-devops' with 4 members worked on 12 tasks and completed 10.",
631
+ "created": "Started on 02/10/2026",
632
+ "members": ["team-lead (general-purpose)", "..."],
633
+ "accomplishments": ["βœ… Task 1", "βœ… Task 2", "..."],
634
+ "duration": "Active for 45 minutes",
635
+ "archivedAt": "2026-02-10T15:30:00.000Z"
636
+ }
637
+ ],
638
+ "count": 1
639
+ }
640
+ ```
641
+
642
+ **Get Specific Archive**
643
+ ```http
644
+ GET /api/archive/{filename}
645
+ ```
646
+
647
+ **Response**: Complete archive including raw data
648
+
649
+ ### Team History Tracking
650
+
651
+ The **Team History** feature provides a complete chronological view of all teams:
652
+
653
+ **API Endpoint**:
654
+ ```http
655
+ GET /api/team-history
656
+ ```
657
+
658
+ **Response**:
659
+ ```json
660
+ {
661
+ "history": [
662
+ {
663
+ "name": "dashboard-devops",
664
+ "config": { /* team config */ },
665
+ "tasks": [ /* all tasks */ ],
666
+ "createdAt": "2026-02-10T14:45:00.000Z",
667
+ "lastModified": "2026-02-10T15:30:00.000Z",
668
+ "isActive": false
669
+ }
670
+ ]
671
+ }
672
+ ```
673
+
674
+ **Features**:
675
+ - Shows all teams (active and completed)
676
+ - Sorted by last modified (most recent first)
677
+ - Includes creation and modification timestamps
678
+ - Active status indicator
679
+
680
+ ### Real-Time Notifications
681
+
682
+ The dashboard provides console notifications for all lifecycle events:
683
+
684
+ ```
685
+ πŸŽ‰ New team created: dashboard-devops
686
+ πŸ”„ Team active: dashboard-devops
687
+ ✨ New task created: task-123.json
688
+ πŸ“ Task updated: task-123.json
689
+ βœ… Task completed/removed: task-123.json
690
+ πŸ‘‹ Team completed: dashboard-devops - archiving for reference...
691
+ πŸ“¦ Team archived: dashboard-devops β†’ /home/user/.claude/archive/dashboard-devops_2026-02-10T15-30-00-000Z.json
692
+ πŸ“Š Team "dashboard-devops" was active for 45 minutes
693
+ ```
694
+
695
+ ### File System Watchers
696
+
697
+ The lifecycle tracking is powered by three independent watchers:
698
+
699
+ **1. Team Watcher** (`~/.claude/teams/**/*.json`)
700
+ - Monitors: `config.json` files
701
+ - Triggers: Team creation, updates, completion
702
+
703
+ **2. Task Watcher** (`~/.claude/tasks/**/*.json`)
704
+ - Monitors: Individual task files
705
+ - Triggers: Task creation, updates, completion
706
+
707
+ **3. Output Watcher** (`/tmp/claude/{project}/tasks/*.output`)
708
+ - Monitors: Agent output files
709
+ - Triggers: Agent activity updates
710
+
711
+ **Watch Options** (configurable in `config.js`):
712
+ ```javascript
713
+ {
714
+ persistent: true, // Keep process running
715
+ ignoreInitial: true, // Don't trigger on startup
716
+ usePolling: true, // Use polling for cross-platform reliability
717
+ interval: 1000, // Polling interval (ms)
718
+ depth: 10, // Directory depth limit
719
+ awaitWriteFinish: { // Wait for complete writes
720
+ stabilityThreshold: 500,
721
+ pollInterval: 100
722
+ }
723
+ }
724
+ ```
725
+
726
+ ### Security Features
727
+
728
+ The dashboard was audited by a team of 6 security specialists. Every layer has been hardened:
729
+
730
+ #### πŸ” Authentication
731
+ - **First-time setup screen** β€” set your password in the browser on first run; stored as an `scrypt` hash (`N=16384, r=8, p=1` β€” OWASP recommended) in `~/.claude/dashboard.key` (`chmod 600`)
732
+ - **Token rotation** β€” a fresh 256-bit random token is issued on every successful login
733
+ - **Timing-safe comparison** β€” `crypto.timingSafeEqual` used for both password and token validation (prevents timing attacks)
734
+ - **Auth rate limiter** β€” max 5 login/setup attempts per IP per 15 minutes (separate from the global limiter)
735
+ - **sessionStorage** β€” token clears on tab close; acceptable tradeoff for a localhost tool
736
+ - **Key file permission check** β€” warns on startup if `dashboard.key` is world-readable
737
+
738
+ #### πŸ›‘οΈ HTTP Security Headers
739
+ - **CSP** β€” strict allowlist: `default-src 'self'`, explicit `connect-src`/`img-src`/`font-src`, `frame-ancestors 'none'`, `object-src 'none'`
740
+ - **CORP / COOP** β€” `Cross-Origin-Resource-Policy: same-origin`, `Cross-Origin-Opener-Policy: same-origin`
741
+ - **HSTS** β€” `max-age=31536000; includeSubDomains`
742
+ - **Referrer-Policy** β€” `strict-origin-when-cross-origin`
743
+ - **Permissions-Policy** β€” `camera=(), microphone=(), geolocation=(), payment=(), usb=()`
744
+ - **Helmet** β€” `noSniff`, `frameguard: deny`, `xssFilter` all enabled
745
+
746
+ #### πŸ” Input Validation
747
+ - **Strict sanitization** β€” `sanitizeTeamName()`, `sanitizeAgentName()`, `sanitizeFileName()` enforce `[a-zA-Z0-9_.-]` allowlist with 100-char max on every route param
748
+ - **Exact-match validation** β€” every parameterized route returns 400 if sanitized value β‰  original (catches partial encoding attacks)
749
+ - **Content-Type enforcement** β€” POST requests without `application/json` get 415
750
+ - **Body type checking** β€” rejects arrays, nulls, and non-object bodies on all POST endpoints
751
+ - **ReDoS-safe search** β€” uses `String.indexOf()` not regex; 200-char query limit
752
+
753
+ #### πŸ”Œ WebSocket
754
+ - **Token always required** β€” connection closed with 4001 if no valid token in query string
755
+ - **Ping/pong heartbeat** β€” 30s interval, 10s pong timeout; dead clients terminated
756
+ - **Per-connection rate limit** β€” 50 messages/sec max; exceeding closes with code 1008
757
+ - **Message size limit** β€” 64 KB max; exceeding closes with code 1009
758
+ - **Connection audit log** β€” IP logged on connect/disconnect/error
759
+
760
+ #### πŸ“ File System
761
+ - **`validatePath()` on every fs call** β€” uses `path.resolve()` to block all path traversal
762
+ - **No symlink following** β€” `followSymlinks: false` on all 5 chokidar watchers
763
+ - **Log injection prevention** β€” team names sanitized before appearing in log output
764
+
765
+ #### 🌐 Network
766
+ - **CORS** β€” restricted to `localhost:3001` and `localhost:5173` only; no wildcard origins
767
+ - **Rate limiting** β€” global limiter on all `/api/` routes
768
+ - **Error hardening** β€” global error handler never leaks stack traces or internal messages
769
+
770
+ **Read-Only**: The dashboard never modifies Claude Code files β€” it only reads and archives data.
771
+
772
+ ### Use Cases
773
+
774
+ **Project Retrospectives**: Review what a team accomplished and how long it took
775
+
776
+ **Performance Analysis**: Track team efficiency across multiple projects
777
+
778
+ **Audit Trails**: Maintain records of all agent activities for compliance
779
+
780
+ **Learning**: Study successful team patterns and task breakdowns
781
+
782
+ **Recovery**: Restore team context if needed from archived data
783
+
784
+ ### Benefits
785
+
786
+ - **Zero Configuration**: Archiving happens automatically β€” nothing to set up
787
+ - **Complete History**: Never lose team data when a project completes
788
+ - **Natural Language**: Archive summaries are human-readable
789
+ - **Forensic Analysis**: Full raw data included for detailed investigation
790
+ - **Storage Efficient**: JSON format with automatic cleanup of old archives (future feature)
791
+ - **Fast Retrieval**: Timestamped filenames for easy chronological sorting
792
+
793
+ ---
794
+
795
+ ## πŸ—ΊοΈ Roadmap
796
+
797
+ ### βœ… Recently Shipped
798
+
799
+ - [x] **Full security audit (6-expert team)** β€” OWASP scrypt auth, auth rate limiting, token rotation, tight CSP, CORP/COOP, Permissions-Policy, strict input validation on every route, WebSocket heartbeat + rate limiting + size limits, `followSymlinks: false` on all watchers, 0 npm vulnerabilities
800
+ - [x] **First-time setup flow** β€” open dashboard β†’ set your password in the browser β†’ hash stored in `~/.claude/dashboard.key` β†’ login on every subsequent visit; WebSocket reconnects immediately after login (no backoff delay)
801
+ - [x] **Password auth (always on)** β€” scrypt hash with OWASP params, timing-safe comparison, token rotation, 5-attempt rate limit per IP
802
+ - [x] **Tailwind v4 + code splitting** β€” `@tailwindcss/vite` installed; 4 heavy components lazy-loaded, cutting initial JS bundle by ~50 kB
803
+ - [x] **Expanded test suite** β€” 223 tests across 15 files covering all 4 custom hooks, key components, and utility functions
804
+ - [x] **Full accessibility audit** β€” 50+ buttons with `aria-label`, interactive divs with `role`/`tabIndex`/`onKeyDown`, `aria-live` on status components, `role="alert"` on error states, focus management in modals
805
+ - [x] **Security hardening** β€” server.js: fixed wrong sanitizer on inbox route, patched error message leakage in global handler, added path validation on archive listing, consistent error responses across all endpoints
806
+ - [x] **Complete inline styles migration** β€” All 30+ components now use React inline `style={{}}` for every sizing, color, animation, and layout value β€” no broken Tailwind arbitrary values remain
807
+ - [x] **Production code cleanup** β€” Removed 5 debug `console.log` statements from `useWebSocket.js`; cleaned unused imports across multiple components
808
+ - [x] **Light / Dark mode** β€” Full CSS-variable-based theme system; every component, card, chart, modal, and toast adapts instantly
809
+ - [x] **Export reports** β€” CSV & JSON export for tasks and inbox messages via the header Export menu
810
+ - [x] **Performance analytics** β€” Analytics panel with historical charts, team comparison, and performance scoring
811
+ - [x] **Keyboard shortcuts** β€” Command palette (`⌘K`), tab hotkeys (`⌘1–8`), shortcuts reference modal (`?`)
812
+ - [x] **Notification center** β€” Grouped notification tray (Just Now / Today / Earlier) with mark-read, clear-all, and direct tab navigation
813
+ - [x] **PWA support** β€” Installable progressive web app with offline caching via Service Worker
814
+ - [x] **Agent network graph** β€” Live D3 force-directed graph of inter-agent communication flows
815
+ - [x] **Task dependency graph** β€” Visual map of which tasks block which across the whole team
816
+ - [x] **Team comparison** β€” Side-by-side performance view across multiple active teams
817
+ - [x] **Skeleton loaders** β€” Smooth loading states instead of blank panels on first connect
818
+
819
+ ### 🎯 Planned Features
820
+
821
+ - [ ] **Multi-project workspace** β€” Switch between multiple Claude projects in one dashboard
822
+ - [ ] **Custom alerts** β€” Webhook integrations (Slack, Discord, email)
823
+ - [ ] **Plugin system** β€” Extensible architecture for custom visualizations
824
+ - [ ] **Docker deployment** β€” One-command containerised setup
825
+ - [ ] **Agent replay** β€” Rewind and replay agent sessions for debugging
826
+ - [ ] **Collaborative mode** β€” Share dashboards with team members
827
+
828
+ ### πŸ’‘ Have an Idea?
829
+
830
+ We prioritize features based on community feedback. [**Open a feature request β†’**](https://github.com/mukul975/claude-team-dashboard/issues/new?template=feature_request.yml)
831
+
832
+ ---
833
+
834
+ ## 🀝 Contributing
835
+
836
+ We love contributions! Whether you're fixing bugs, adding features, or improving docs β€” **every contribution matters**.
837
+
838
+ ### πŸš€ Quick Contribution Guide
839
+
840
+ ```bash
841
+ # 1. Fork & clone
842
+ git clone https://github.com/YOUR_USERNAME/claude-team-dashboard.git
843
+
844
+ # 2. Create feature branch
845
+ git checkout -b feature/amazing-feature
846
+
847
+ # 3. Make changes & commit
848
+ git commit -m "feat: add amazing feature"
849
+
850
+ # 4. Push & create PR
851
+ git push origin feature/amazing-feature
852
+ ```
853
+
854
+ **πŸ“– Read the full guide**: [**CONTRIBUTING.md**](CONTRIBUTING.md)
855
+
856
+ ### 🌟 Ways to Contribute
857
+
858
+ - πŸ› **Report bugs** β€” Use the [bug report template](https://github.com/mukul975/claude-team-dashboard/issues/new?template=bug_report.yml)
859
+ - ✨ **Suggest features** β€” Use the [feature request template](https://github.com/mukul975/claude-team-dashboard/issues/new?template=feature_request.yml)
860
+ - πŸ“ **Improve docs** β€” Fix typos, add examples, clarify instructions
861
+ - πŸ§ͺ **Write tests** β€” Increase code coverage and reliability
862
+ - 🎨 **Design improvements** β€” UI/UX enhancements welcome
863
+
864
+ **First time contributing?** Check out issues labeled [`good first issue`](https://github.com/mukul975/claude-team-dashboard/labels/good%20first%20issue).
865
+
866
+ ---
867
+
868
+ ## πŸ“„ License
869
+
870
+ This project is licensed under the **MIT License** β€” see the [LICENSE](LICENSE) file for details.
871
+
872
+ **TL;DR**: Free to use, modify, and distribute. Commercial use allowed. Just keep the license notice.
873
+
874
+ ---
875
+
876
+ ## ⭐ Star History
877
+
878
+ [![Star History Chart](https://api.star-history.com/svg?repos=mukul975/claude-team-dashboard&type=Date)](https://star-history.com/#mukul975/claude-team-dashboard&Date)
879
+
880
+ ---
881
+
882
+ <div align="center">
883
+
884
+ ---
885
+
886
+ ### ⭐ If This Helps You β€” Star It!
887
+
888
+ **Starring helps others discover this project.** It takes 2 seconds and makes a huge difference.
889
+
890
+ [![GitHub stars](https://img.shields.io/github/stars/mukul975/claude-team-dashboard?style=social)](https://github.com/mukul975/claude-team-dashboard/stargazers)
891
+
892
+ ---
893
+
894
+ **Built by [Mahipal](https://www.mahipal.engineer)**
895
+
896
+ _Maintained by [@mukul975](https://github.com/mukul975) β€” cybersecurity researcher, AI agent enthusiast_
897
+
898
+ </div>