Commit graph

9 commits

Author SHA1 Message Date
Peter Steinberger
b22d8995dd
Add comprehensive server tests and switch to Biome linter (#73) 2025-06-24 18:51:38 +02:00
Mario Zechner
402143716e Add shell alias support and improve debug logging
- Add automatic shell alias resolution via ProcessUtils.resolveCommand()
- Support aliases like 'claude-danger' by running through user's shell
- Detect user's shell properly on all platforms (zsh, bash, pwsh, cmd, etc.)
- Replace --debug CLI flag with VIBETUNNEL_DEBUG environment variable
- Update spec.md with new functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-23 02:45:54 +02:00
Mario Zechner
302063327e feat: Add unified logging infrastructure with web viewer
- Implement client-side logger that mirrors server interface
- Add /api/logs endpoints for client log submission and retrieval
- Create real-time log viewer component at /logs with filtering
- Update all client files to use new logging system
- Add responsive design for log viewer (mobile/desktop layouts)
- Implement smart auto-scroll that preserves reading position
- Add Mac-style auto-hiding scrollbars
- Configure Express to serve .html files with clean URLs
- Update spec.md with logging infrastructure documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-23 00:05:43 +02:00
Mario Zechner
4a5052f425 refactor: improve PTY manager cleanup and fwd.ts architecture
- Remove global exit handlers from PTY manager, add clean shutdown() method
- Use file watching approach for control pipes on all platforms (no FIFO)
- Simplify fwd.ts - control pipe and stdin forwarding handled by PTY manager
- Add forwardToStdout and onExit options to createSession
- Add proper TypeScript types to PtySession interface (no more "as any")
- Clean up logging throughout, keep only essential messages
- Add colorful output with chalk for session start/end messages
- Fix hanging process issue by properly unreferencing file watchers
- Update spec.md to reflect architectural changes

This makes the shutdown process predictable and fixes the hanging echo command issue.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 14:16:06 +02:00
Mario Zechner
e912b65c9e Fix Node.js detection in build-bun-executable.sh for Xcode builds
Add common Node.js installation paths to PATH including Homebrew, NVM, n, and MacPorts locations. This matches the approach used in build-web-frontend.sh and ensures the script can find Node.js when running in Xcode's restricted environment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-22 04:04:52 +02:00
Mario Zechner
18a28992df Add comprehensive frontend component documentation
- Document all frontend components with JSDoc headers describing their purpose and events
- Add @fires and @listens tags for all component events with detailed parameter descriptions
- Update spec.md with complete Component Event Architecture section
- Add shared terminal-text-formatter.ts for consistent text formatting between client/server
- Implement event-driven activity detection replacing polling-based approach
- Add content-changed event to vibe-terminal-buffer for activity monitoring
- Remove ESC prompt detection in favor of general activity detection
- Add plain text endpoint with optional style formatting (/api/sessions/:id/text?styles)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-21 23:14:30 +02:00
Mario Zechner
f0fd625243 Update docs to reflect Node.js SEA instead of Bun
- Update spec.md build system section with Node.js SEA details
- Update README.md production build section to clarify SEA executable
- Both files now correctly reflect the transition from Bun to Node.js

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-21 21:49:12 +02:00
Mario Zechner
d4b8748b22 Reorganize server structure for clarity
- Rename index.ts to cli.ts as single entry point
- Merge app.ts and shutdown-state.ts into server.ts
- Update all imports and references to use new structure
- Update e2e tests and dev script to spawn via cli.ts
- Remove execution code from server.ts (only cli.ts executes)
- Clean up tsconfig.client.json exclude path

This creates a cleaner separation where cli.ts is the only entry
point that decides whether to run server or forward mode.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-21 16:44:56 +02:00
Mario Zechner
5593ee39ef refactor: modularize server architecture and consolidate codebase
- Restructure server code into modular architecture under src/server/
  - middleware/: Authentication handling
  - pty/: PTY management consolidation
  - routes/: API endpoint handlers
  - services/: Core services (terminal, HQ, streaming)
- Consolidate 20+ scattered files into organized modules
- Replace unit/integration tests with comprehensive E2E testing
- Add spec.md as codebase navigation guide
- Update build paths for new CSS location (styles.css)
- Add chalk dependency for improved terminal output
- Simplify server entry point to use modular loader
- Update CLAUDE.md with spec.md regeneration instructions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-20 22:44:40 +02:00