Thank you for your interest in contributing to LXTUI! This document provides guidelines and information for contributors.
- Rust 1.70+
- LXD installed and configured
- Git
- Fork and clone the repository:
git clone https://github.com/yourusername/lxtui.git
cd lxtui- Build the project:
cargo build- Run tests:
cargo test- Run the application:
cargo runmain- Stable release branchdevelop- Development branch for new featuresfeature/feature-name- Feature branchesfix/issue-description- Bug fix branches
- Create a feature branch from
develop:
git checkout develop
git pull origin develop
git checkout -b feature/your-feature-name- Make your changes following the coding standards
- Add tests for new functionality
- Ensure all tests pass:
cargo test- Run clippy for linting:
cargo clippy -- -D warnings- Format your code:
cargo fmt- Commit your changes with clear messages
- Push and create a pull request
- Follow standard Rust formatting (
cargo fmt) - Use
clippyrecommendations (cargo clippy) - Write comprehensive documentation for public APIs
- Include unit tests for new functionality
- Keep functions focused and small
- Use meaningful variable and function names
- Add comments for complex logic
- Follow existing patterns in the codebase
- Use
anyhow::Resultfor functions that can fail - Provide meaningful error messages
- Log appropriate information for debugging
- Handle errors gracefully in the UI
# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run with output
cargo test -- --nocapture- Write unit tests for core logic
- Test error conditions
- Use meaningful test names
- Include edge cases
Test with various scenarios:
- Different container states
- Network connectivity issues
- LXD service interruptions
- Large numbers of containers
- Document public APIs with rustdoc comments
- Include examples in documentation
- Keep README.md updated
- Update KEYBINDINGS.md for UI changes
Use conventional commit format:
type(scope): description
[optional body]
[optional footer]
Types:
feat- New featuresfix- Bug fixesdocs- Documentation updatesstyle- Code formattingrefactor- Code restructuringtest- Test additions/fixeschore- Maintenance tasks
Examples:
feat(ui): add container creation wizard
fix(lxd): handle connection timeout errors
docs(readme): update installation instructions
- Tests pass (
cargo test) - Code is formatted (
cargo fmt) - Clippy warnings addressed (
cargo clippy) - Documentation updated if needed
- CHANGELOG.md updated for significant changes
When creating a PR, include:
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
- [ ] Unit tests added/updated
- [ ] Manual testing completed
- [ ] All existing tests pass
## Screenshots (if UI changes)
[Include relevant screenshots]- Automated checks must pass
- At least one maintainer review required
- Address review feedback promptly
- Maintainer will merge when approved
Include:
- LXTUI version
- Operating system
- LXD version
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs (
RUST_LOG=debug lxtui)
Include:
- Clear description of the feature
- Use case and motivation
- Possible implementation approach
- Any relevant mockups or examples
- app.rs - Core application state and logic
- ui.rs - User interface rendering with ratatui
- lxd_api.rs - LXD REST API client
- main.rs - Event handling and application lifecycle
- Responsive UI - Operations should not block the interface
- Error Recovery - Handle failures gracefully with retry logic
- User Experience - Intuitive keyboard shortcuts and clear feedback
- Performance - Efficient rendering and minimal resource usage
- Package manager integrations (apt, yum, homebrew)
- Enhanced error messages and recovery
- Performance optimizations
- Additional container configuration options
- Container resource monitoring
- Batch operations on multiple containers
- Import/export functionality
- Configuration file support
- Themes and customization
- Plugin system
- Alternative container runtimes
- Advanced filtering and search
- Check existing issues and discussions
- Join project discussions
- Ask questions in pull requests
- Reach out to maintainers
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Follow the Golden Rule
Contributors will be:
- Listed in project credits
- Mentioned in release notes for significant contributions
- Invited to join the maintainer team for sustained contributions
Thank you for helping make LXTUI better!