Skip to content

Conversation

zhangfengcdt
Copy link
Owner

This PR introduces prolly-ui, a new command-line tool that generates beautiful, interactive HTML
visualizations for git-prolly repositories. Users can explore commit history, view detailed
diffs, and switch between multiple datasets through a modern web interface.

Features Added

🎨 Interactive Web Visualization

  • Modern, responsive UI with gradient backgrounds and smooth animations
  • Git-style commit timeline with branch visualization
  • Click-to-expand commit details with full diff display
  • Color-coded change operations (green=added, orange=modified, red=removed)

📊 Multi-Dataset Support

  • Dropdown selector to switch between different repositories
  • Custom dataset naming via CLI arguments
  • Independent commit histories per dataset

🔧 Command Line Interface

Single repository

./target/debug/prolly-ui path/to/repo -o dashboard.html

Multiple datasets

./target/debug/prolly-ui main/repo
-d "Users:data/users"
-d "Products:data/products"
-o multi-dashboard.html

✨ Rich Commit Details

  • Full commit hash, author, message, and timestamp
  • Human-readable key-value changes with before/after comparison
  • Proper handling of byte array data conversion to strings

Implementation Details

New Files:

  • src/bin/prolly-ui.rs (886 lines) - Main CLI tool implementation
  • Updated Cargo.toml with new binary configuration

Architecture:

  • Repository data extraction using existing git-prolly APIs
  • Self-contained HTML generation with embedded CSS/JavaScript
  • Single-script JavaScript architecture for proper variable scoping
  • Efficient data serialization for client-side interactivity

Key Components:

  • process_repository() - Extracts commit history and changes from git-prolly repos
  • generate_html() - Creates complete HTML with embedded styles and scripts
  • serialize_changes() - Converts Rust KvDiff structs to JavaScript-compatible JSON
  • Modern CSS with flexbox layouts and smooth transitions

Usage

Usage: prolly-ui [OPTIONS] [REPO_PATH]

Arguments:
[REPO_PATH] Repository path (defaults to current directory)

Options:
-o, --output Output HTML file [default: prolly-ui.html]
-d, --dataset NAME:PATH Include additional repositories for dataset switching
-h, --help Print help
-V, --version Print version

Testing

  • Tested with single and multi-dataset repositories
  • Verified commit click functionality and diff display
  • Confirmed responsive design and cross-browser compatibility
  • All JavaScript errors debugged and resolved

This tool provides an intuitive way to explore and understand git-prolly repository history
through a visual, web-based interface that requires no external dependencies or web server.

@zhangfengcdt
Copy link
Owner Author

Screenshot 2025-08-08 at 11 52 49 AM

@zhangfengcdt zhangfengcdt merged commit de0e1e6 into main Aug 8, 2025
4 checks passed
@zhangfengcdt zhangfengcdt deleted the feature/git.add.ui branch August 12, 2025 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant