Best Diff
February 11, 2026 · View on GitHub
A Git diff reviewing tool built as a cross-platform desktop application. Best Diff will provide a side-by-side diff viewer with advanced features like virtual scrolling, smart scroll synchronization, and curved connectors for visualizing changes.
Features
- Side-by-Side Diff Viewing: Compare file changes with clear visual indicators
- Virtual Scrolling: Efficiently handle large diffs with performance-optimized rendering
- Smart Scroll Sync: Lines scroll at different rates to keep unchanged content aligned (similar to JetBrains IDEs)
- Curved Connectors: SVG-based visual links between changed lines
- File List Management: Organize staged and unstaged changes
- Git Integration: Direct integration with Git commands for staging, unstaging, and committing
- Cross-Platform: Runs on Windows, macOS, and Linux using Electrobun
Technologies
- Electrobun: Cross-platform desktop app framework
- React: UI framework for responsive components
- Vite: Fast build tool with hot module replacement
- Tailwind CSS: Utility-first CSS framework
- TypeScript: Type-safe development
- Vitest: Unit testing framework
Installation
Prerequisites
- Bun runtime
- Git
Setup
-
Clone the repository:
git clone <repository-url> cd bestdiff -
Install dependencies:
bun install -
Run in development mode:
bun run dev:hmrOr without hot reload:
bun run dev
Usage
- Launch the application
- Open a workspace: File > Open Workspace, select a Git repository directory
- The left pane shows the list of changed files, split into Staged Changes and Changes
- Select a file to view the diff in the right pane
- Use the stage/unstage buttons to move files between groups
- Add a commit message in the top text box
- Click Commit to commit staged changes
Key Features
- Scroll Synchronization: As you scroll, the left and right panes adjust speeds to align unchanged lines
- Visual Connectors: Curved lines connect related changes between panes
- Highlighting: Added lines in blue, removed lines in red
Development
Scripts
bun run dev:hmr: Start development with hot module replacementbun run dev: Start development without HMRbun run build: Build for productionbun run test: Run unit testsbun run test:watch: Run tests in watch mode
Project Structure
src/
├── bun/ # Main process (Electrobun/Bun)
├── mainview/ # React frontend
│ ├── components/ # UI components
│ ├── stores/ # State management
│ └── utils/ # Utilities
└── shared/ # Shared types and utilities
Testing
Run tests with:
bun run test
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
License
This project is licensed under the MIT License.