VibeTunnel Mobile Terminal UI/UX Redesign Plan
Executive Summary
The current VibeTunnel mobile terminal experience suffers from viewport overlap issues, complex keyboard handling, and poor space utilization. This plan outlines a comprehensive redesign to create a mobile-first terminal experience that is intuitive, efficient, and respects device constraints.Key Goals
- Eliminate all viewport overlaps on mobile devices
- Simplify keyboard input to a single, coherent system
- Ensure navigation remains accessible at all times
- Optimize screen real estate for terminal content
- Provide seamless transition between keyboard and non-keyboard states
Current Architecture Analysis
Component Hierarchy
Mobile Input Systems
-
Direct Keyboard Mode (Default)
- Hidden input element for focus
- Quick keys toolbar above keyboard
- Complex focus retention logic
-
Mobile Input Mode (Legacy)
- Full-screen textarea overlay
- Manual toggle button
- Less efficient screen usage
State Management
UIStateManagerhandles multiple overlapping states- Complex boolean flags:
showQuickKeys,showCtrlAlpha,showFileBrowser - Race conditions between keyboard animations and state updates
Identified Problems
1. Viewport Overlap Issues
- Fixed positioning elements don’t respect safe areas consistently
- Terminal transform (
translateY(-110px)) causes content to move off-screen - Header can be obscured when keyboard is active
- Z-index layering conflicts between overlays
2. Complex Keyboard Handling
- Two separate keyboard systems confuse users
- Focus management requires intervals and timeouts
- Keyboard height calculations are inconsistent
- Quick keys toolbar adds unnecessary complexity
3. Poor Space Utilization
- Multiple toolbars and overlays reduce terminal visibility
- Redundant UI elements (custom keyboard + native keyboard)
- Inefficient use of limited mobile screen space
4. Navigation Accessibility
- Header can become inaccessible when keyboard is active
- No clear way to dismiss keyboard in some states
- Sidebar toggle conflicts with keyboard overlays
Design Principles
1. Mobile-First Approach
- Design for smallest screens first
- Progressive enhancement for larger devices
- Touch-optimized interactions
2. Native Platform Integration
- Leverage native keyboard capabilities
- Respect platform conventions (iOS/Android)
- Use system UI where possible
3. Simplified State Management
- Single source of truth for keyboard state
- Clear, predictable transitions
- No overlapping or conflicting states
4. Maximum Content Visibility
- Terminal content is primary focus
- Minimal chrome and overlays
- Smart hiding of non-essential UI
Proposed Solutions
1. New Layout System
Portrait Mode Layout
Landscape Mode Layout
2. Simplified Keyboard System
Single Input Method
- Use native keyboard exclusively
- Remove custom keyboard overlay
- Integrate special keys into action bar
Smart Action Bar
- Only shows when keyboard is active
- Horizontally scrollable for more keys
- Sticky positioned above keyboard
3. Responsive Header
Compact Mobile Header
- Reduce height to 44px (iOS standard)
- Show only essential info: session name + menu
- Move detailed info to collapsible drawer
Header States
- Default: Full info display
- Keyboard Active: Minimal mode with just title
- Scrolling: Auto-hide with scroll, show on scroll up
4. Improved Focus Management
Native Focus Handling
5. Viewport Management
CSS-Only Solution
Implementation Phases
Phase 1: Foundation (Week 1)
- Create new mobile layout components
- Implement CSS-only viewport solution
- Remove terminal transform logic
- Ensure header always visible
Phase 2: Keyboard Simplification (Week 2)
- Remove custom keyboard overlay
- Implement native-only input
- Create smart action bar
- Simplify focus management
Phase 3: Header Optimization (Week 3)
- Design compact mobile header
- Implement collapsible info drawer
- Add scroll-based auto-hide
- Test on various devices
Phase 4: Polish & Testing (Week 4)
- Fine-tune animations
- Optimize performance
- Cross-device testing
- User feedback integration
Technical Requirements
1. Component Changes
New Components
MobileTerminalLayout- Manages mobile-specific layoutSmartActionBar- Context-sensitive action buttonsCompactSessionHeader- Mobile-optimized header
Modified Components
SessionView- Use mobile layout on small screensTerminalRenderer- Remove transform logicUIStateManager- Simplify state management
2. CSS Architecture
Remove
- Terminal transforms
- Complex height calculations
- Fixed positioning for overlays
Add
- Flexbox/Grid mobile layouts
- Sticky positioning for header/action bar
- CSS containment for performance
3. State Simplification
Before (Complex)
After (Simple)
Testing Strategy
1. Device Testing Matrix
- iPhone 13/14/15 (Standard)
- iPhone 13/14 Pro Max (Large)
- iPhone SE (Small)
- iPad (Tablet)
- Android devices (Various)
2. Scenario Testing
- Keyboard appears without overlap
- Header remains accessible
- Terminal content scrolls properly
- Action bar functions correctly
- Landscape/portrait transitions smooth
- Safe areas respected on all devices
3. Performance Metrics
- Layout shift score < 0.1
- No janky animations (60fps)
- Keyboard appear/dismiss < 300ms
- Memory usage stable
Risk Mitigation
1. Browser Compatibility
- Risk: Visual Viewport API not supported
- Mitigation: Fallback to resize events
2. iOS Keyboard Quirks
- Risk: Keyboard doesn’t appear on focus
- Mitigation: Use click event as backup
3. Performance Issues
- Risk: Scroll performance degrades
- Mitigation: Use CSS containment, minimize reflows
4. User Adoption
- Risk: Users confused by changes
- Mitigation: Gradual rollout, feature flags
Success Metrics
- Zero viewport overlaps on all tested devices
- 50% reduction in keyboard-related bug reports
- Improved usability scores in user testing
- Faster keyboard interactions (< 300ms response)
- Increased mobile session duration by 25%