{"id":44725008,"url":"https://github.com/qiaolei81/copilot-session-viewer","last_synced_at":"2026-03-12T15:01:15.840Z","repository":{"id":338595553,"uuid":"1158401731","full_name":"qiaolei81/copilot-session-viewer","owner":"qiaolei81","description":"🔍 Web UI for GitHub Copilot session logs - visualize events, analyze timelines, get AI insights","archived":false,"fork":false,"pushed_at":"2026-03-05T04:45:18.000Z","size":1494,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-05T06:47:36.098Z","etag":null,"topics":["ai-tools","copilot","developer-tools","express","github-copilot","log-viewer","nodejs","session-viewer","visualization","vue"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qiaolei81.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-15T10:04:40.000Z","updated_at":"2026-03-05T04:45:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/qiaolei81/copilot-session-viewer","commit_stats":null,"previous_names":["qiaolei81/copilot-session-viewer"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/qiaolei81/copilot-session-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaolei81%2Fcopilot-session-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaolei81%2Fcopilot-session-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaolei81%2Fcopilot-session-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaolei81%2Fcopilot-session-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qiaolei81","download_url":"https://codeload.github.com/qiaolei81/copilot-session-viewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiaolei81%2Fcopilot-session-viewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30429287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","copilot","developer-tools","express","github-copilot","log-viewer","nodejs","session-viewer","visualization","vue"],"created_at":"2026-02-15T17:18:52.909Z","updated_at":"2026-03-12T15:01:15.832Z","avatar_url":"https://github.com/qiaolei81.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Copilot Session Viewer\n\n[![npm version](https://img.shields.io/npm/v/@qiaolei81/copilot-session-viewer.svg)](https://www.npmjs.com/package/@qiaolei81/copilot-session-viewer)\n[![CI](https://github.com/qiaolei81/copilot-session-viewer/actions/workflows/ci.yml/badge.svg)](https://github.com/qiaolei81/copilot-session-viewer/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org/)\n\n**Multi-Tool Session Log Viewer \u0026 Analyzer**  \nView and analyze AI coding assistant sessions from **GitHub Copilot CLI**, **Copilot Chat (VSCode)**, **Claude Code CLI**, and **Pi-Mono** with time analysis, virtual scrolling, and AI-powered insights.\n\nA modern web-based viewer for analyzing AI coding assistant session logs with virtual scrolling, infinite loading, time analysis, and AI-powered insights. Supports **GitHub Copilot CLI**, **Copilot Chat (VSCode)**, **Claude Code CLI**, and **Pi-Mono** sessions.\n\n### Session List\n![Session List](https://raw.githubusercontent.com/qiaolei81/copilot-session-viewer/main/docs/images/homepage.png)\n\n### Session Detail — Event Stream with Virtual Scrolling\n![Session Detail](https://raw.githubusercontent.com/qiaolei81/copilot-session-viewer/main/docs/images/session-detail.png)\n\n### Time Analysis — Gantt Timeline \u0026 Sub-Agent Breakdown\n![Time Analysis](https://raw.githubusercontent.com/qiaolei81/copilot-session-viewer/main/docs/images/time-analysis.png)\n\n---\n\n## ⚡ Quick Start\n\n### Try without installing (recommended)\n\n```bash\nnpx -y @qiaolei81/copilot-session-viewer@latest\n```\n\nThen open http://localhost:3838\n\n### Install globally\n\n```bash\nnpm install -g @qiaolei81/copilot-session-viewer\ncopilot-session-viewer\n```\n\n### Requirements\n\n- Node.js ≥ 18.0.0\n- At least one AI coding assistant (optional for generating sessions):\n  - [GitHub Copilot CLI](https://github.com/cli/cli) (recommended)\n  - [Claude Code CLI](https://github.com/anthropics/claude-code)\n  - [Pi-Mono](https://github.com/badlogic/pi-mono)\n\n---\n\n## ✨ Features\n\n### 🎯 **Core Capabilities**\n- **📊 Session Management** - View, export, and import session archives\n- **🔍 Event Analysis** - Real-time log parsing with filtering and search\n- **⏱️ Time Analysis** - Execution timelines and performance metrics\n- **🚀 Virtual Scrolling** - Handle 1000+ events smoothly\n- **♾️ Infinite Scroll** - Progressive session loading for better performance\n- **🤖 AI Insights** - LLM-powered session analysis\n- **🎭 Multi-Format Support** - Copilot CLI, Copilot Chat (VSCode), Claude Code, and Pi-Mono sessions\n\n### 🎨 **User Experience**\n- **🌙 Dark Theme** - GitHub-inspired interface\n- **📱 Responsive** - Works on desktop, tablet, and mobile\n- **⚡ Fast** - Optimized virtual rendering and lazy loading\n- **🔐 Secure** - Local-first with no data sharing, XSS protection, ZIP bomb defense\n\n### 🛠️ **Technical Features**\n- **Vue 3** - Reactive virtual scrolling\n- **Express.js** - Robust backend API\n- **ZIP Import/Export** - Session sharing capabilities with security validation\n- **Multi-Source Support** - Copilot CLI (`~/.copilot/session-state/`), Copilot Chat (`~/Library/Application Support/Code/User/workspaceStorage/`), Claude (`~/.claude/projects/`), Pi-Mono (`~/.pi/agent/sessions/`)\n- **Unified Event Format** - Consistent schema across all sources\n- **Memory Pagination** - Efficient handling of large sessions\n- **XSS Protection** - DOMPurify-based HTML sanitization\n- **ZIP Bomb Defense** - 4-layer protection (compressed size, uncompressed size, file count, depth)\n\n---\n\n## 🚀 How It Works\n\n1. **Generate Sessions** - Use GitHub Copilot CLI, Claude Code CLI, or Pi-Mono to create session logs\n2. **Auto-Discovery** - Sessions are automatically detected from:\n   - Copilot CLI: `~/.copilot/session-state/`\n   - Copilot Chat: `~/Library/Application Support/Code/User/workspaceStorage/`\n   - Claude: `~/.claude/projects/`\n   - Pi-Mono: `~/.pi/agent/sessions/`\n3. **Browse \u0026 Analyze** - View sessions with infinite scroll and detailed event streams\n4. **Time Analysis** - Analyze turn durations, tool usage, and sub-agent performance\n5. **AI Insights** - Generate comprehensive session analysis with Copilot\n\n```bash\n# Example: Generate sessions with different tools\n\n# GitHub Copilot CLI\ncopilot --model claude-sonnet-4.5 -p \"Help me refactor this code\"\n\n# Claude Code CLI\nclaude -p \"Implement user authentication\"\n\n# Pi-Mono CLI\npi -p \"Create a REST API endpoint\"\n\n# Start the viewer\nnpx @qiaolei81/copilot-session-viewer\n\n# Browse all sessions at http://localhost:3838\n```\n\n---\n\n## 📚 Documentation\n\n- **[Installation Guide](docs/INSTALLATION.md)** - Detailed setup instructions\n- **[API Documentation](docs/API.md)** - REST endpoints and responses\n- **[Development Guide](docs/DEVELOPMENT.md)** - Contributing and local development\n- **[Troubleshooting](docs/TROUBLESHOOTING.md)** - Common issues and solutions\n- **[Changelog](CHANGELOG.md)** - Release history\n\n---\n\n## 🧪 Testing \u0026 Quality\n\nThis project includes comprehensive unit and E2E test coverage with CI/CD integration.\n\n### Test Coverage\n\n- **700+ Tests** (622 unit + 80 E2E)\n- **Unified Format Tests** - Mock data validation for all sources (Copilot CLI, Copilot Chat, Claude, Pi-Mono)\n- **Security Tests** - XSS prevention, ZIP bomb defense\n- **Integration Tests** - Session import/export, file operations\n- **CI-Friendly** - Mock data generation for reproducible tests\n\n### Running Tests\n\n```bash\n# Unit tests only\nnpm test\n\n# Unit tests with coverage\nnpm run test:coverage\n\n# E2E tests only\nnpm run test:e2e\n\n# Lint check\nnpm run lint:check\n\n# Run all tests (unit + E2E)\nnpm run test:all\n```\n\n### CI/CD Pipeline\n\nGitHub Actions workflow includes:\n1. **Linting** - ESLint code quality checks\n2. **Unit Tests** - 622 Jest tests with coverage\n3. **Mock Data Generation** - Reproducible test session fixtures\n4. **E2E Tests** - 80 Playwright tests with Chromium\n5. **Artifact Upload** - Test results on failure\n\n**Test Data Strategy:**\n- ✅ CI uses generated mock data (fast, reliable, no external dependencies)\n- ✅ Local development can use real sessions for integration testing\n- ✅ Fixtures cover all event formats (Copilot CLI, Copilot Chat, Claude, Pi-Mono)\n\n---\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────┐\n│  Frontend (Vue 3 + EJS Templates)               │\n│  • Virtual Scroller (vue-virtual-scroller)      │\n│  • Infinite Scroll (JavaScript)                 │\n│  • GitHub-inspired Dark Theme                   │\n│  • XSS Protection (DOMPurify)                   │\n└─────────────────────────────────────────────────┘\n                      ↕ HTTP/API\n┌─────────────────────────────────────────────────┐\n│  Backend (Node.js + Express)                    │\n│  • Multi-Source Session Repository              │\n│  • Unified Event Format Normalizer              │\n│  • JSONL Streaming Parser                       │\n│  • Paginated API Endpoints                      │\n│  • ZIP Import/Export with Security Validation   │\n└─────────────────────────────────────────────────┘\n                      ↕ File System\n┌─────────────────────────────────────────────────┐\n│  Data Layer (Multi-Source)                      │\n│  • Copilot CLI: ~/.copilot/session-state/        │\n│  • Copilot Chat: ~/Library/.../workspaceStorage/ │\n│  • Claude:  ~/.claude/projects/                  │\n│  • Pi-Mono: ~/.pi/agent/sessions/                │\n└─────────────────────────────────────────────────┘\n```\n\n### Unified Event Format\n\nAll session sources are normalized to a consistent schema:\n\n```javascript\n{\n  type: 'assistant.message',\n  timestamp: '2026-02-23T00:00:00.000Z',\n  data: {\n    message: 'Response text',\n    tools: [\n      {\n        id: 'tool-001',\n        name: 'read',\n        startTime: '2026-02-23T00:00:01.000Z',\n        endTime: '2026-02-23T00:00:02.000Z',\n        status: 'completed',\n        input: { path: 'file.js' },\n        result: { content: '...' },\n        error: null,\n        metadata: {\n          source: 'copilot',  // or 'claude', 'pi-mono'\n          duration: 1000\n        }\n      }\n    ]\n  }\n}\n```\n\n**Benefits:**\n- ✅ Consistent UI rendering across all sources\n- ✅ Simplified frontend logic\n- ✅ Easy to add new sources\n\n---\n\n## 🔒 Security\n\n### XSS Protection\n- **DOMPurify Sanitization** - All user-generated content is sanitized before rendering\n- **Whitelist-based** - Only safe HTML tags and attributes are allowed\n- **JavaScript URL Protection** - Blocks `javascript:`, `data:`, and `onclick` handlers\n- **Tested** - Comprehensive E2E tests for XSS attack vectors\n\n### ZIP Bomb Defense\n4-layer protection against malicious archives:\n1. **Compressed Size Limit** - 50 MB max upload\n2. **Uncompressed Size Limit** - 200 MB max expansion\n3. **File Count Limit** - 1000 files max\n4. **Directory Depth Limit** - 5 levels max\n\n### Local-First Design\n- No external API calls for session data\n- All processing happens locally\n- Optional AI insights require user action\n- No telemetry or tracking\n\n---\n\n## 🎯 Use Cases\n\n### **For Developers**\n- Debug GitHub Copilot CLI sessions\n- Analyze conversation patterns and tool usage\n- Export sessions for team collaboration\n- Performance optimization insights\n\n### **For Teams**\n- Share interesting Copilot sessions\n- Analyze team AI usage patterns\n- Document complex problem-solving sessions\n- Training and best practice development\n\n### **For Researchers**\n- Study human-AI interaction patterns\n- Analyze tool usage effectiveness\n- Session data mining and analysis\n- AI conversation flow research\n\n---\n\n## 🤝 Contributing\n\nThis project welcomes contributions! See our [Development Guide](docs/DEVELOPMENT.md) for:\n\n- Setting up the development environment\n- Code style guidelines\n- Testing procedures\n- Contribution workflow\n\n---\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details\n\n---\n\n## 🙏 Acknowledgments\n\n**Built with AI assistance** - This project was developed using GitHub Copilot and Claude AI for code generation, documentation, and architectural decisions.\n\n**Key Dependencies:**\n- [Vue 3](https://vuejs.org/) - Reactive frontend framework\n- [vue-virtual-scroller](https://github.com/Akryum/vue-virtual-scroller) - High-performance virtual scrolling\n- [Express.js](https://expressjs.com/) - Web application framework\n- [EJS](https://ejs.co/) - Templating engine\n- [DOMPurify](https://github.com/cure53/DOMPurify) - XSS protection\n- [Playwright](https://playwright.dev/) - E2E testing\n\n**Recent Updates (v0.3.0):**\n- ✨ VSCode Copilot Chat support (4th source)\n- 🏷️ Session tagging system\n- 🔄 Multi-tool branding (Copilot CLI, Copilot Chat, Claude Code, Pi-Mono)\n- 🔒 XSS protection with DOMPurify\n- 🛡️ ZIP bomb defense (4-layer validation)\n- 🧪 700+ tests with CI/CD integration\n- 📚 Comprehensive documentation\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[🏠 Homepage](https://github.com/qiaolei81/copilot-session-viewer)** •\n**[📖 Docs](docs/)** •\n**[🐛 Issues](https://github.com/qiaolei81/copilot-session-viewer/issues)** •\n**[💬 Discussions](https://github.com/qiaolei81/copilot-session-viewer/discussions)**\n\nMade with ❤️ for the GitHub Copilot CLI community\n\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiaolei81%2Fcopilot-session-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqiaolei81%2Fcopilot-session-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiaolei81%2Fcopilot-session-viewer/lists"}