eazygit 0.5.1

A fast TUI for Git with staging, conflicts, rebase, and palette-first UX
Documentation
# eazygit Testing and Publishing Workflow

This directory contains scripts to test and publish the eazygit package.

## Quick Start

**Before publishing, run these two scripts:**

1. **Build and install:**
   ```bash
   cd actual/build-ide/products/eazygit
   ./scripts/test-before-publish.sh
   ```
   This builds, installs, and sets up everything.

2. **Interactive testing (optional but recommended):**
   ```bash
   ./scripts/test-installed-version.sh
   ```
   This opens a menu to help you test everything easily.

3. **When ready, publish manually:**
   ```bash
   cargo publish
   ```

## Problem

When `eazygit` is installed via `cargo install`, the themes directory is not automatically copied to the installation location. This causes the theme picker to show fewer themes than expected.

## Solution

1. **Install themes to user config directory** - Themes are copied to `~/.config/eazygit/themes/` where they're always accessible
2. **Test before publishing** - Use the test scripts to verify everything works before publishing

## Scripts

### `test-installed.sh`

Basic tests for the currently installed `eazygit` binary (legacy script).

**Usage:**
```bash
./scripts/test-installed.sh
```

### `test-installed-version.sh`**NEW - Interactive Helper**

Interactive test helper that automates manual testing:
- Menu-driven interface for different test options
- Opens eazygit in usage/gitdo directory automatically
- Verifies themes, checks binary, runs automated checks
- Makes manual testing much easier!

**Usage:**
```bash
./scripts/test-installed-version.sh
```

**Options:**
1. Test eazygit in usage/gitdo (opens interactively)
2. Verify theme count
3. Run eazygit --help
4. Check all theme files exist
5. Open eazygit and verify themes manually
6. Run all automated checks
7. Exit

### `install-themes.sh`

Copies themes from the project's `themes/` directory to `~/.config/eazygit/themes/` so they're available after installation.

**Usage:**
```bash
./scripts/install-themes.sh
```

### `test-before-publish.sh`

**Main script** - Complete pre-publish test workflow:
1. Builds the project
2. Installs it locally (replaces current installation)
3. Installs themes to user config
4. Verifies installation
5. Tests theme discovery
6. Tests in usage/gitdo directory context
7. Shows summary and next steps

**NO publishing included** - You publish manually when ready.

**Usage:**
```bash
./scripts/test-before-publish.sh
```

## Recommended Workflow

1. **Make changes** in `actual/build-ide/products/eazygit/`

2. **Run comprehensive test:**
   ```bash
   cd actual/build-ide/products/eazygit
   ./scripts/test-before-publish.sh
   ```
   This will:
   - Build the project
   - Install it locally
   - Install themes
   - Test installation
   - Test in usage/gitdo directory

3. **Manually verify everything:**
   ```bash
   cd usage/gitdo
   eazygit  # Test the installed version
   ```
   - Open theme picker (press `t`)
   - Verify all themes are visible
   - Test switching themes
   - Test all features you care about

4. **When everything works, publish manually:**
   ```bash
   cd actual/build-ide/products/eazygit
   cargo publish
   ```

## Theme Discovery

Themes are discovered from multiple locations (in order):
1. **User config directory** (recommended):
   - **macOS**: `~/Library/Application Support/eazygit/themes/`
   - **Linux/Unix**: `~/.config/eazygit/themes/`
   - **Windows**: `%APPDATA%/eazygit/themes/`
2. `$CARGO_HOME/share/eazygit/themes/` (if CARGO_HOME is set)
3. `~/.cargo/share/eazygit/themes/` (cargo install location)
4. Binary directory `themes/` (development)
5. Current directory `themes/` (development)

Built-in themes (dark, light, nord, dracula, gruvbox, everforest, onedark) are always available.

**Note:** The install script automatically detects your OS and installs themes to the correct location.

## Troubleshooting

### Issue: Not all themes visible (only seeing 7 instead of 12)

**Quick fix:**
```bash
./scripts/fix-themes.sh
```

**Diagnose the problem:**
```bash
./scripts/diagnose-themes.sh
```

**Manual steps:**
1. Run `./scripts/install-themes.sh` to copy themes to user config (auto-detects OS)
2. Check themes directory exists and contains `.toml` files:
   - **macOS**: `~/Library/Application Support/eazygit/themes/`
   - **Linux**: `~/.config/eazygit/themes/`
3. Run `eazygit --list-themes` to see discovered themes
4. Or run with `RUST_LOG=info eazygit --help` to see theme discovery logs
5. Verify you see: "Theme discovery: 12 total (7 built-in + 5 external)"

**Expected themes:**
- Built-in (7): dark, light, nord, dracula, gruvbox, everforest, onedark
- External (7): ayu_mirage, dracula, monokai, nord, solarized_dark, solarized_light, tokyo_night
- Total unique: 12 (dracula and nord appear in both)

**Issue: Themes not found after cargo install**
- Themes are not automatically copied by `cargo install`
- Run `./scripts/install-themes.sh` after installation
- Or manually copy `themes/*.toml` to the correct config directory:
  - **macOS**: `~/Library/Application Support/eazygit/themes/`
  - **Linux**: `~/.config/eazygit/themes/`