feat: standalone web app mode without VS Code#156
feat: standalone web app mode without VS Code#156ronilaukkarinen wants to merge 1 commit intopablodelucca:mainfrom
Conversation
Add a Node.js server in standalone/ that serves the Pixel Agents webview as a standalone web app accessible via browser. The server automatically discovers and monitors all active Claude Code sessions across all project directories in ~/.claude/projects/. - standalone/src/server.ts: HTTP + WebSocket server replacing VS Code backend - standalone/src/assetLoader.ts: Asset loading ported from extension - standalone/src/transcriptParser.ts: JSONL parsing without VS Code deps - webview-ui/src/vscodeApi.ts: Auto-detect environment, use WebSocket when not in VS Code - Hide "+ Agent" button in standalone mode (no terminal spawning) - Proper message ordering: assets -> agents -> layout (triggers render) Usage: npm run build # build main project first cd standalone && npm install && node build.js node dist/server.js # http://localhost:3100
|
Thanks for the PR @ronilaukkarinen! This is really close to the architectural direction we've been working toward. We've already extracted some shared modules (shared/assets/) to prepare the codebase for exactly this, a standalone core that multiple platforms (VS Code, Cursor, Electron, web) can build on. I'll be posting an architectural proposal for the community soon that covers the shared module layer and multi-platform strategy. Your standalone server approach aligns well with it, so I'd love to sync up on a few things before we merge, mainly around importing from the shared modules instead of duplicating the asset loading and transcript parsing code. Stay tuned for the proposal, and thanks again for pushing this forward! :) |
|
Yeah, I just wanted to test this quickly, and since I'm more of a CLI person, I didn't have another option. I figured I might as well send a PR. Just a note, some AI was used to draft this, but you don't necessarily have to use it. |
Summary
Adds a standalone Node.js server that serves the Pixel Agents webview as a regular web app, removing the VS Code dependency entirely. The server auto-discovers all active Claude Code sessions across
~/.claude/projects/.Related issues: #46, #120, #8
standalone/directory with HTTP + WebSocket servervscodeApi.tsauto-detects environment: VS Code postMessage or WebSocketUsage
Test plan
npm run buildfrom repo root, then build and start standalone server