-
Notifications
You must be signed in to change notification settings - Fork 3
Description
🎨 Objective
Redesign the Clustrix notebook widget to match the modern, user-friendly UI shown in the provided mockups. This represents a major upgrade from the current authentication-focused widget to a comprehensive cluster configuration interface with profile management.
📋 Current State
The existing enhanced_notebook_widget.py
(from issue #66) provides solid authentication functionality but has a technical, vertical layout focused primarily on authentication methods. While functional, it doesn't provide the polished user experience needed for broader adoption.
🎯 Design Vision
Local Basic Configuration
Local Advanced Configuration
Remote Basic Configuration
🔧 Detailed Component Specifications
Profile Management
- Active Profile Dropdown: Editable entries, switch between saved configurations
- + Button: Clone current profile, append " (copy)" to name
- - Button: Remove profile (disabled if only one exists)
- Config Filename: Editable text field (default: "clustrix.yml")
File Operations
- 💾 Save Icon: Save ALL profiles to config file (not just current)
- 📝 Folder Icon: Open file dialog, load .yml/.json, replace all configurations
- Apply Button: Set current config as active for @cluster decorator
- Test Connect: Validate connection + create/test/delete simple venv
- Test Submit: Full test with 4 jobs + result verification + cleanup
Cluster Configuration
- Cluster Type: Hardcoded dropdown ["local", "ssh", "slurm", "pbs", "sge", "kubernetes", "aws", "azure", "gcp"]
- CPUs: Integer spinner, -1 = "use all available", increment by 1
- RAM: Editable number + gray "GB" label (non-editable)
- Time: Editable HH:MM:SS format
Advanced Settings (Collapsible)
- Package Manager: Dropdown ["auto", "pip", "conda", "mamba", "poetry"]
- Python Executable: Editable text (default: "python")
- Clone Environment: Checkbox for venv cloning
- Environment Variables: Editable dropdown, type "KEY=value" + click "+" to add
- Modules: Same behavior as env variables (for HPC module loading)
- Pre-exec Commands: Multi-line text area with bash syntax highlighting
Remote Authentication
- Host/Address: Editable hostname/IP
- Port: Integer with lock icon (default: 22)
- Username: Editable (default: $USER)
- SSH Key File: File path (default: ~/.ssh/id_rsa)
- Refresh: Checkbox to force key regeneration
- Password: Masked input (optional if SSH keys configured)
- Local Env Var: Environment variable name for password
- 1Password: Checkbox using existing integration
- Home Directory: Cluster home path for SSH setup
📊 Implementation Phases
Phase 1: Core Widget Redesign
- New horizontal layout architecture
- Profile management system (
ProfileManager
class) - Visual styling matching mockups
- Responsive layout system
Phase 2: Interactive Components
- Editable dropdowns with add/remove functionality
- File operations (save/load configurations)
- Advanced settings collapsible section
- Real-time field validation
Phase 3: Testing Integration
- "Test Connect" functionality with venv testing
- "Test Submit" with 4-job batch testing
- Detailed logging and status reporting
- Cleanup and error handling
Phase 4: Authentication Integration
- Migrate authentication logic from current widget
- SSH key management with auto-setup
- 1Password integration with modern UI
- Environment variable handling
Phase 5: Polish & Performance
- Cross-environment testing (Jupyter, Colab, VSCode)
- Accessibility improvements
- Performance optimization (< 500ms load, < 50MB memory)
- Migration utilities and documentation
🔄 Migration Strategy
- Backward Compatibility: Keep existing widget during transition
- New API:
create_modern_cluster_widget()
alongside current function - Gradual Rollout: Alpha → Beta → Stable → Deprecate legacy
- Profile Migration: Convert existing configs to new profile format
📁 Technical Assets
- Design Mockups:
notes/mockups/clustrix_mockup_*.png
- Technical Specification:
notes/widget_gui_redesign_spec.md
- Current Implementation:
clustrix/enhanced_notebook_widget.py
- Authentication Infrastructure: Complete from issue Enhanced Authentication Methods for Cluster Access #66
🎯 Success Criteria
- User Experience: < 2 minute cluster setup, 50% fewer configuration errors
- Visual Design: Pixel-perfect match to mockups with modern styling
- Feature Completeness: All mockup functionality implemented
- Performance: Fast loading, responsive interactions
- Cross-Platform: Consistent behavior across notebook environments
💡 Key Features
- Profile-based workflow: Save/load/clone configurations easily
- Smart defaults: Context-aware field population
- Progressive disclosure: Basic → Advanced settings
- Real testing: Actual cluster validation with cleanup
- Modern UX: Clean, intuitive interface matching user expectations
This represents the final piece needed to complete the enhanced cluster configuration experience, combining robust technical capabilities with polished user experience.
Priority: High - Critical for user adoption and workflow efficiency.