- Fix cursor Y calculation by adding XTerm's viewportY offset to get absolute buffer position
- Simplify cursor line detection logic by removing complex viewport translation
- Write full content in test instead of truncated lines
- Ensure scrollToBottom only runs after terminal is properly fitted
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace incorrect Math.min logic with proper viewport bounds checking
- Now properly uses viewportY as the primary scroll position for rendering
- Ensures terminal shows correct viewport content when scrolled up/down
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add proper cursor coordinate system translation between XTerm logical size and viewport size
- Fix cursor positioning when viewport is scrolled up by adjusting cursor Y offset
- Clean up unused variables and fix linting warnings
- Ensure XTerm write callback timing for performance measurement
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix cursor viewport positioning by checking if cursor is within current viewport range
- Remove restrictive queue safety checks from immediate query methods
- Update API documentation to clarify when data may be stale and suggest queueCallback() for fresh data
- Simplify test to use proper API flow without unnecessary timeouts
- Cursor now correctly renders only when visible in viewport at proper position
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement RAF-based operation queue for optimal batching
- Add cursor position rendering with nice green color and blinking animation
- Add comprehensive public API with documentation:
- Buffer methods: write(), clear(), setTerminalSize()
- Scroll methods: scrollToBottom(), scrollTo(), queueCallback()
- Query methods: getTerminalSize(), getVisibleRows(), getBufferSize(), getScrollPosition(), getMaxScrollPosition()
- Add safety checks to prevent stale data reads when operations are pending
- Add detailed performance measurement for render pipeline
- Update test to use proper encapsulated API instead of accessing internals
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add check for empty lines (after trimming) to stop URL parsing
- URLs now properly end at empty lines, not just whitespace
- More intuitive behavior for multi-line URL detection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Detect http(s):// in current line with regex
- Scan subsequent lines until first whitespace character
- Much simpler and more reliable than URL validation
- Use actual <a> tags instead of spans for proper linking
- Remove complex string highlighting (focus on URLs only)
- Cleaner, more maintainable code
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Detect quoted strings (single, double, backtick quotes)
- Highlight strings that span multiple lines or are >20 chars
- Style strings with orange color and subtle background
- Handle overlap detection (URLs take precedence over strings)
- Add comprehensive test cases for multi-line strings
- Fix method naming and maintain scrolling functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add multi-line URL detection and linking
- Extract text across all terminal lines for processing
- Handle URLs that span multiple lines correctly
- Style links with hover effects and click handlers
- Add comprehensive link test cases to test HTML
- Process links after each render operation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add waiting field to Session interface in session-list.ts
- Include name and waiting fields in app.ts session mapping
- Update CLAUDE.md with linting reminder
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove debug logging after confirming font fix works
- Fira Code provides consistent character width across platforms
- Horizontal fit now works reliably on real devices and emulators
- Minimum font size of 4px enables proper mobile fitting
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Restore detailed horizontal fit logging
- Compare real device vs emulator font rendering
- Identify discrepancies in character width measurement
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Clean up console.log statements added for debugging
- Keep the mobile horizontal fit improvements
- Maintain explicit font styling for measurement accuracy
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Reduce minimum font size from 8px to 4px for mobile
- Explicitly set fontSize and fontFamily on measurement element
- Add fontSize to measurement logging
- Allows proper fitting for narrow mobile viewports
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add character width measurement logging
- Show container dimensions and target calculations
- Log scale factor and font size adjustments
- Help debug mobile horizontal fit issues
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Change @customElement from 'terminal' to 'vibe-terminal'
- Update HTML test file to use new element name
- Fixes web component spec compliance (terminal is reserved)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add optional session name field to create form
- Update Session interface to include name property
- Backend now accepts and stores custom session names
- Session cards and views display name when available, fallback to command
- Session names are passed to tty-fwd for better identification
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused css import in mobile-terminal component
- Fix unused location parameter in custom-weblinks-addon
- Limit session list grid to maximum 2 cards per row
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Renamed the DOM terminal component for cleaner naming:
- Renamed dom-terminal.ts to terminal.ts
- Renamed DomTerminal class to Terminal
- Renamed XTerm Terminal import to XtermTerminal to avoid conflicts
- Updated custom element from 'dom-terminal' to 'terminal'
- Updated CSS classes from dom-terminal-container to terminal-container
- Updated HTML test file to use new element name and CSS classes
- Updated import in test-terminals-entry.ts
- Fixed linting issues (removed unused variables)
The terminal component now has cleaner, more intuitive naming while
maintaining all existing functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implemented responsive terminal sizing that automatically adjusts font size
to fit exactly the specified number of columns in the container width:
- Added fitHorizontally property to toggle horizontal fitting mode
- Character width measurement using representative terminal content
- Automatic font size calculation to fit columns exactly
- Full container utilization by fitting both columns and rows
- Proper font size restoration when toggling off horizontal fitting
- Added toggle button to test page for easy testing
The terminal now supports two modes:
- Normal: Fixed font size, calculate rows that fit vertically
- Horizontal fit: Calculate font size to fit columns, then fit rows
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implemented natural momentum scrolling that feels like native macOS:
- Fixed velocity calculation to use recent movement instead of total
- Added macOS-like deceleration curve with variable friction
- Smooth start with gentle initial deceleration, then gradual slowdown
- Fractional scroll accumulation prevents small movements from being lost
- Removed debug logging for clean production code
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replaced touch events with pointer events using setPointerCapture() to solve
the issue where touch scrolling would break when DOM is rebuilt during scroll.
- Use pointer events with setPointerCapture() for touch devices only
- Keep wheel events for desktop trackpad/mouse scrolling
- Add touch-action: none CSS to prevent browser scroll interference
- Include 5px movement threshold to avoid interfering with text selection
- Remove momentum scrolling temporarily for simplicity
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add scroll accumulator to handle small deltaY values from slow trackpad movements
- Accumulate scroll deltas until they reach at least one line height
- Preserve fractional remainder for next scroll event
- Fixes issue where slow two-finger scrolling would not register movement
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix DOM terminal rendering with proper innerHTML generation
- Add comprehensive test content including logs, tables, git history, docker status
- Implement proper ANSI color code handling for wide character compatibility
- Add auto-scroll to bottom functionality
- Replace individual line element management with bulk innerHTML updates
- Fix \r\n line ending handling for proper terminal behavior
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created ResponsiveTerminal Lit component with mobile touch scrolling
- Implements XTerm.js with custom scaling algorithm for different viewport sizes
- Added setViewportSize() method for testing content reflow without regeneration
- Fixed mobile viewport issues using 100dvh for proper height calculation
- Added debounced ResizeObserver to prevent resize loops
- Component uses Tailwind classes and aggressive XTerm CSS constraints
- Test page allows switching viewport dimensions to observe content reflow
- Touch handlers scoped only to terminal content, not affecting external UI
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- 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>
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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>