TUIOSTUIOS

Contributing

Guidelines for contributing to TUIOS

Thank you for your interest in contributing to TUIOS!

Getting Started

Prerequisites

  • Go 1.24.4 or later
  • Git
  • Nerd Font (for testing UI)

Development Setup

# Clone repository
git clone https://github.com/Gaurav-Gosain/tuios
cd tuios

# Install dependencies
go mod download

# Build
go build -o tuios ./cmd/tuios
go build -o tuios-web ./cmd/tuios-web

# Run
./tuios --debug

# Run tests
go test ./...
go test -race ./...

Nix Development

nix develop    # Enter dev shell
nix build      # Build package
nix run        # Run directly

Code Style

  • Run go fmt before committing
  • Follow Effective Go conventions
  • Add doc comments for exported types/functions
  • Keep functions focused and testable

Testing

Running Tests

# All tests
go test ./...

# Specific package
go test ./internal/vt/...

# With coverage
go test -cover ./...

# With race detection
go test -race ./...

# Verbose output
go test -v ./internal/config/...

Writing Tests

  • Use table-driven tests where appropriate
  • Test file naming: *_test.go
  • Prefer unit tests over integration tests
  • Use t.Run() for subtests

Example:

func TestFeature(t *testing.T) {
    tests := []struct {
        name     string
        input    string
        expected string
    }{
        {"case1", "input1", "output1"},
        {"case2", "input2", "output2"},
    }
    
    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            result := Feature(tt.input)
            if result != tt.expected {
                t.Errorf("got %v, want %v", result, tt.expected)
            }
        })
    }
}

Pull Request Process

  1. Fork & Branch

    git checkout -b feature/your-feature
  2. Make Changes

    • Write code
    • Add/update tests
    • Update documentation if needed
  3. Commit

    git commit -m "feat: add feature description"

    Use conventional commit format:

    • feat: - New feature
    • fix: - Bug fix
    • docs: - Documentation
    • refactor: - Code refactoring
    • test: - Tests
    • chore: - Maintenance
  4. Push & PR

    git push origin feature/your-feature

    Create PR on GitHub with:

    • Clear description
    • Link to related issues
    • Screenshots/demos if UI changes
  5. Review

    • Address feedback
    • Keep commits clean
    • Rebase if needed

Areas to Contribute

High Priority

  • Test coverage improvements
  • Bug fixes
  • Performance optimizations
  • Documentation improvements

Feature Ideas

  • Additional keybinding actions
  • New layout algorithms
  • Theme improvements
  • Terminal emulation enhancements

Good First Issues

Check GitHub issues labeled good-first-issue.

Architecture

See Architecture for:

  • Project structure
  • Key components
  • Coding patterns

Reporting Issues

Bug Reports

Include:

  • TUIOS version (tuios --version)
  • OS and terminal emulator
  • Steps to reproduce
  • Expected vs actual behavior
  • Relevant logs (tuios --debug)

Feature Requests

Include:

  • Use case description
  • Proposed solution
  • Alternative solutions considered

Community

  • GitHub Issues: Bug reports & features
  • Discussions: Questions & ideas
  • PRs: Code contributions

All contributors are expected to follow our Code of Conduct: be respectful, inclusive, and constructive.

On this page