Commit graph

53 commits

Author SHA1 Message Date
Mario Zechner
c04cb26f4e Fix linter formatting issues
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-17 01:52:52 +02:00
Mario Zechner
7e98e2e735 Fira font, various mobile UI fixes. 2025-06-17 01:38:58 +02:00
Peter Steinberger
10970951d7 linter 2025-06-17 01:31:06 +02:00
Peter Steinberger
52fda3d996 linting 2025-06-17 01:11:10 +02:00
Peter Steinberger
8b3833ee0e Merge remote-tracking branch 'origin/main'
# Conflicts:
#	web/src/client/components/app-header.ts
#	web/src/client/components/session-card.ts
#	web/src/client/components/session-view.ts
2025-06-17 01:06:52 +02:00
Peter Steinberger
bb20c3a833 lint web 2025-06-17 01:03:37 +02:00
Mario Zechner
fb0c3538f2 Mobile fixes. 2025-06-17 00:47:19 +02:00
Peter Steinberger
59ad90fdc7 Move kill to app header 2025-06-17 00:28:39 +02:00
Mario Zechner
b54dc7a17c Fix terminal cursor not showing up 2025-06-17 00:20:48 +02:00
Mario Zechner
16f139ce89 Log websocket error, don't throw. 2025-06-17 00:20:38 +02:00
Mario Zechner
16fe254564 Standard control path 2025-06-17 00:20:38 +02:00
Mario Zechner
ddb342bdec Fix the stupid terminal scaling calculations, we properly measure glyph width/height and apply linear scaling plus conservative row clamping. Good enough. Scroll could be reset to bottom after fit, but might also kill user scroll position so shrug. 2025-06-16 22:56:21 +02:00
Armin Ronacher
71f49142ea Show waiting status 2025-06-16 21:39:37 +02:00
Armin Ronacher
013ba77a04 Fix cursor rendering 2025-06-16 19:19:18 +02:00
Armin Ronacher
510be54304 Implemented copy/paste 2025-06-16 18:28:43 +02:00
Mario Zechner
ab5a34398d Improve mobile UI and add localStorage for session creation
- Add localStorage persistence for last used working directory and command
- Values are saved on successful session creation and loaded on component creation
- Survives page reloads and provides better UX for repeated session creation
- Enhance mobile terminal buttons with larger Unicode symbols (arrows, tab, enter)
- Make arrow keys, tab, and enter buttons more visible and easier to tap

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 17:46:44 +02:00
Mario Zechner
d164db3496 Add Kill All sessions button and fix terminal scaling
- Add Kill All button to session list that appears when running sessions exist
- Button triggers individual session kill animations by clicking each kill button
- Fix terminal scaling issues with proper character width ratio (0.63)
- Constrain terminal containers to viewport width to prevent overflow
- Override XTerm's fixed width CSS to respect container bounds
- Reduce minimum font size to 4px for better scaling flexibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 17:37:48 +02:00
Mario Zechner
c5a6e2dd1d Remove unnecessary session polling from session-view
Session-view was polling /api/sessions every 2 seconds unnecessarily.
All session updates come via SSE stream including exit events.
This eliminates redundant API calls and improves performance.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 16:08:28 +02:00
Mario Zechner
ed3927b4a6 Fix session management and terminal scaling
- Fix session killing via DELETE endpoint instead of wrong POST /kill
- Add proper session card kill animation with ASCII spinner
- Fix double key press issue with keyed directive for session-view
- Implement URL-based navigation for consistent component lifecycle
- Fix session card terminal scaling to show all content at smaller sizes
- Modify ScaleFitAddon to only scale font size for previews, not dimensions
- Add session card loading and killing states with visual feedback
- Remove duplicate event listeners and improve component cleanup

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 15:35:11 +02:00
Mario Zechner
90eb324930 Fix session card styling to match original design
- Restore compact header layout with proper spacing (px-3 py-2)
- Use original VS Code theme colors (text-vs-user, text-vs-warning)
- Fix terminal preview with proper aspect ratio (640/480)
- Update kill button styling to match original (bg-vs-warning)
- Add compact footer with session ID and working directory

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 14:59:24 +02:00
Mario Zechner
ae2c986e33 Implement session-card architecture and improve session management
- Create session-card component for individual session rendering
- Add Renderer active count tracking to monitor instance leaks
- Parse session ID from tty-fwd stdout for reliable session creation
- Add 2-second delay for fresh session connections to prevent race conditions
- Simplify session-list to use session-card components
- Restore original layout with controls and proper padding
- Improve SSE exit event handling with direct session ID usage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 13:50:28 +02:00
Mario Zechner
3ec417c8b1 Implement custom ScaleFitAddon for proper terminal scaling
- Create ScaleFitAddon that scales font size to fit columns to container width
- Calculates optimal rows for container height with scaled font
- Replace CSS transform scaling with proper font size calculation
- Apply to both session view and previews for consistent behavior
- Achieve 95-98% width utilization instead of arbitrary 80% scaling
- Prevent stack overflow with font size change detection

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 12:06:42 +02:00
Mario Zechner
34801bc687 Fix terminal layout and improve mobile UX
- Restructure session-view to use proper flexbox layout (header/xterm/buttons)
- Container now exactly fits viewport height (100vh)
- Header shows command and working directory stacked
- XTerm gets all remaining space with horizontal scrolling
- Mobile buttons integrated into layout instead of overlaying
- Replace setTimeout with requestAnimationFrame for better performance
- Add isPreview parameter to renderer for future preview scaling
- Disable pointer events on preview terminals so clicks pass through

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 11:55:22 +02:00
Mario Zechner
093aff4379 Update XTerm theme to VS Code Dark colors and improve SSE streaming
- Replace Gruvbox color scheme with VS Code Dark theme colors
- Remove inappropriate terminal.clear() calls from live stream connections
- Add debugging logs for SSE events to investigate DOM recreation issue
- Ensure only snapshots clear terminal, streams append new content

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:58:21 +02:00
Mario Zechner
e8bee03388 Replace asciinema with XTerm renderer and add key combination support
- Replace AsciinemaPlayer with XTerm.js renderer in session-view and session-list
- Add XTerm CSS for proper terminal styling and hide input textarea
- Implement resize event handling (r-type cast events) in renderer
- Add Ctrl+Enter and Shift+Enter key combination support
- Update tty-fwd to handle ctrl_enter and shift_enter keys
- Set TERM=xterm-256color in tty-fwd for proper Unicode box-drawing
- Add font scaling and preview sizing for session-list terminals
- Remove asciinema dependencies and update CSS accordingly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:38:19 +02:00
Mario Zechner
7b6ebad8be Increase XTerm scrollback buffer to 1M lines by default
- Add configurable scrollback parameter to Renderer constructor
- Default to 1,000,000 lines (up from 1,000) for full session history
- Users can now scroll through entire terminal session history
- Fix renderer-entry.ts import path (remove .js extension)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:38:19 +02:00
Mario Zechner
c7c8a605c2 Replace custom renderer with XTerm.js and consolidate tests
- Remove old custom ANSI renderer (src/client/renderer.ts)
- Rename XTermRenderer to Renderer and move to renderer.ts
- Update renderer-entry.ts to export single Renderer class
- Rename and update all test files:
  - test-xterm-renderer.html → test-renderer.html
  - simple-xterm-test.html → simple-test.html
  - debug-xterm.html → debug-renderer.html
- Remove obsolete custom renderer tests
- Update tests/index.html with new test descriptions
- All tests now use single XTerm.js-based Renderer

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:38:19 +02:00
Mario Zechner
e4b4a37c86 Fix renderer export name - use TerminalRenderer with Renderer alias 2025-06-16 10:38:19 +02:00
Mario Zechner
9bc6fcc4b1 Replace CDN imports with local bundle in all tests
- Create renderer-entry.ts to bundle both Renderer and XTermRenderer
- Add bundle:renderer script to generate public/bundle/renderer.js
- Update all test files to import from ../bundle/renderer.js
- Remove all unpkg/CDN XTerm.js script imports
- Tests now use bundled dependencies for faster loading

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 10:38:19 +02:00
Mario Zechner
43d406a84c Clean up build system and implement XTerm.js renderer
- Replace TypeScript compilation with esbuild bundling
- Organize all generated files in public/bundle/
- Remove PWA features and simplify index.html
- Add XTerm.js renderer with same API as custom renderer
- Create comprehensive test suite in public/tests/
- Update .gitignore to only track source files

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 09:33:33 +02:00
Mario Zechner
fce59c3df6 Add URL routing and enhanced mobile terminal controls
- Implement browser URL routing with session ID parameters
- Add browser back/forward navigation support
- Auto-load session view from URL on page refresh
- Add mobile swipe-back gesture from left edge
- Reorganize mobile controls: arrow keys + special keys in normal view
- Simplify text overlay to show only SEND and SEND+ENTER buttons
- Remove left arrow from BACK button for cleaner look

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:47:43 +02:00
Mario Zechner
aae68479ee Improve mobile terminal input with virtual keyboard support
- Move controls above virtual keyboard using Visual Viewport API
- Dynamically adjust textarea height when keyboard appears/disappears
- Add smooth transitions for keyboard show/hide
- Prevent textarea from stretching behind buttons
- Clean up event listeners properly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:36:58 +02:00
Mario Zechner
a77b1dbe26 Implement auto-switch to session view after creation and clean startup
- Add automatic session view switching after creating new sessions
- Poll for session to appear in list and switch immediately when found
- Handle tty-fwd ID mismatch by falling back to newest session
- Add comprehensive debugging for session creation flow
- Clean control directory contents on server startup for fresh state
- Improve session creation UX with seamless transition to interactive view

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:19:35 +02:00
Peter Steinberger
79a23c0aa6 Replace PATH hack with proper zsh configuration loading in Xcode build script
- Changed build script shell from /bin/sh to /bin/zsh for better compatibility
- Sources user's .zshrc or .zprofile to get the actual PATH configuration
- Properly handles all Node.js installation methods (nvm, homebrew, fnm, etc.)
- Added PATH debugging output to help troubleshoot issues
- Maintains fallback for systems without zsh configuration files

Also includes:
- Added PATH environment fix for ngrok detection in NgrokService
- Implemented proper update channel support in SparkleUpdaterManager using delegate methods
- Fixed session name placeholder text in web frontend
2025-06-16 07:15:53 +02:00
Mario Zechner
2fa36dd15b Move CREATE SESSION button to header and improve UI layout
- Move CREATE SESSION button from session list to app header for better visibility
- Hide CLEAN EXITED button when "hide exited" is checked (only show when needed)
- Simplify session list controls layout with clean flex design
- Add proper state management for create modal between app and session list
- Maintain hide exited state when navigating between views
- Fix checkbox blocking issue with better event timing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 07:13:45 +02:00
Peter Steinberger
74373a129d Fix TypeScript error in server.ts
- Handle error type properly in catch block
- Check if error is instanceof Error before accessing message property
- Provide fallback for unknown error types
2025-06-16 06:59:11 +02:00
Mario Zechner
3a6665c13f Fix session status detection and prevent stream restarts for exited sessions
- Add session status polling in session view to detect when sessions end
- Switch from live stream to static snapshot for exited sessions
- Fix session list player creation for toggled visibility states
- Use requestAnimationFrame for better DOM timing instead of setTimeout
- Rename checkbox label from "--filter-exited" to "hide exited"
- Implement smart kill/clean button behavior based on session status
- Remove all focus outlines from session view interface

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 06:43:27 +02:00
Mario Zechner
09cc9edb43 Implement interactive session view with keyboard input
- Add session-view.ts component for full-screen terminal interaction
- Implement real-time keyboard input handling for all key types
- Add routing between session list and interactive session view
- Support special keys, Ctrl combinations, and regular text input
- Remove compiled JS files from git tracking (should be build artifacts)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 05:51:27 +02:00
Mario Zechner
ba4a86c5db Improve terminal preview layout for better space utilization
- Change asciinema player fit mode from 'both' to 'width' for horizontal expansion
- Add overflow-hidden to prevent vertical overflow from breaking layout
- Terminal previews now always use full card width

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 05:48:50 +02:00
Mario Zechner
a7dce56757 Fix live streaming for terminal previews with asciinema player
- Configure asciinema player with eventsource driver for SSE support
- Update server stream endpoint to properly format SSE for asciinema
- Session preview cards now display live terminal output

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 05:43:04 +02:00
Mario Zechner
79509ea251 Simplify UI with clean header and button styling
- Replace complex ASCII header with simple "VibeTunnel" text
- Remove ASCII brackets from buttons: CREATE, CLEAN, CLEAN EXITED, kill
- Add border to header for visual separation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 05:11:09 +02:00
Mario Zechner
179d0db754 Clean up file naming by removing -new suffixes
- Renamed server-new.ts → server.ts
- Renamed app-new.ts → app.ts
- Renamed app-new-entry.ts → app-entry.ts
- Updated package.json scripts to remove all -new references
- Updated custom element name from vibetunnel-app-new to vibetunnel-app
- Updated index.html to reference cleaned up files
- Added CLAUDE.md with development notes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 04:55:18 +02:00
Mario Zechner
2eeb996be4 Improve create button styling when disabled
- Added disabled:opacity-50 to make button appear grayed out when disabled
- Added disabled:cursor-not-allowed for better UX when button is disabled
- Added disabled:hover:bg-vs-user to prevent hover effects on disabled button
- Button is disabled when command field is empty or only whitespace

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 04:39:06 +02:00
Mario Zechner
12a9659de1 Optimize cleanup functionality using tty-fwd bulk cleanup
- Discovered that tty-fwd --cleanup (without session ID) cleans all exited sessions
- Added new /api/cleanup-exited endpoint that uses bulk cleanup command
- Updated client to use single API call instead of multiple individual deletions
- Improved performance and reliability for cleaning multiple exited sessions
- Simplified error handling with single bulk operation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 04:33:46 +02:00
Mario Zechner
6e22984ee8 Add Clean Exited button and improve button row styling
- Added handleCleanExited method to delete all exited sessions in batch
- Added cleaningExited state to track cleaning progress
- Added Clean Exited button with proper styling and disabled state
- Improved button row layout with grouped buttons on left and checkbox on right
- Added transition-colors for smooth hover effects
- Button automatically disables when no exited sessions exist

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 04:31:01 +02:00
Mario Zechner
a868752e40 Fix Create Session button visibility by removing duplicate form
Removed the duplicate session-create-form component from the main app since
the session list now manages its own modal. Added session-created event
handler to the session-list component.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 04:21:16 +02:00
Mario Zechner
77706ab1f5 Improve session card filtering and new session handling
- Add checkbox filter to hide exited sessions with custom styling
- Limit responsive grid to max 3 columns instead of 4
- Add smart delay for new session snapshots (3 seconds)
- Load existing session snapshots immediately
- Prevent asciinema player errors on new sessions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 04:14:10 +02:00
Mario Zechner
3fdcd1b926 Revert "Clean up old unused files and components"
This reverts commit 0bee6f13aa.
2025-06-16 04:01:28 +02:00
Mario Zechner
7f63c9e168 Fix session card UI and file browser issues
- Update asciinema player CSS to use proper aspect ratios
- Fix file browser z-index and layout issues
- Remove old unused app.ts and server.ts files
- Keep working app-new components structure

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 03:59:39 +02:00
Mario Zechner
0bee6f13aa Clean up old unused files and components
- Remove old app-new entry points and components
- Remove duplicate/experimental files
- Keep only active session-list and file-browser components

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-16 03:50:22 +02:00