Skip to content

Latest commit

 

History

History
494 lines (378 loc) · 18.1 KB

File metadata and controls

494 lines (378 loc) · 18.1 KB

Changelog

All notable changes to the A.R.C. CLI project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.x.0] - 017-ui-engine

Added

  • UI engine with TUI and JSON modes (engine.Render)
  • 15+ views: Dashboard, Services, Workspace, Theme, Profile, Version
  • ARC_USE_LEGACY_UI=1 environment variable for legacy rollback
  • Border rendering bug fixes (lipgloss.Width replaces len in panel/border calculations)
  • Component library: Badge, Breadcrumb, Progress, SplitPane, StatusBar, SearchBar
  • engine.ViewContext for passing profile/theme/dimensions to views
  • engine.JSONExporter interface for --json output mode
  • engine.RenderModeFromFlags helper for consistent flag-to-mode mapping

Added - Profile System (Spec 013) 🎭✨

This release introduces a comprehensive profile system that allows users to customize tier naming throughout the A.R.C. CLI with themed profiles.

🎨 Profile System

  • 10 Themed Profiles: Built-in profiles with custom ASCII logos and tier names

    • enterprise - Professional corporate naming (Starter → Pro → Ultra)
    • saiyan - Dragon Ball Z transformations (Super Saiyan → Super Saiyan Blue → Ultra Instinct)
    • shinobi - Naruto ninja ranks (Genin → Jonin → Hokage)
    • pirate - One Piece pirate ranks (Rookie → Supernova → Yonko)
    • pokemon - Pokemon evolution stages (Basic → Stage 1 → Stage 2)
    • triforce - Legend of Zelda virtues (Courage → Wisdom → Power)
    • crystal - Final Fantasy job classes (Warrior → Knight → Paladin)
    • jedi - Star Wars Force ranks (Padawan → Knight → Master)
    • bending - Avatar mastery levels (Bender → Avatar → Cosmic)
    • horcrux - Harry Potter wizard ranks (Student → Auror → Headmaster)
  • Config Commands: Profile management through CLI

    • arc config list-profiles - List all available profiles with tier names
    • arc config set-profile <id> - Set active profile (persists to state)
    • arc config get-profile - Show current profile with details
  • Custom Profile Support: Users can create custom profiles

    • User profiles in ~/.config/arc/profiles/*.yaml
    • Override embedded profiles with same ID
    • Full schema validation (required: id, name, description, tier_names, theme_id, logo)
    • Custom tier names (must have exactly 3)
    • Custom ASCII logos (must spell "A.R.C.")
    • Optional custom colors (primary_color, secondary_color)
  • Profile Resolution System: Intelligent profile loading

    • User-defined profiles take priority over embedded profiles
    • Embedded profiles loaded from binary (10 profiles included)
    • Validation on load with descriptive error messages
    • Fallback to default profile on validation failure
  • Theme Integration: Each profile maps to a color theme

    • cyan-purple - Professional blues and purples
    • fire - Bold oranges and reds
    • gruvbox - Earthy browns and oranges
    • ocean - Deep blues and teals
    • rainbow - Bright multi-color palette
    • solarized - Balanced warm/cool tones
    • monokai - Rich purples and pinks
    • nord - Cool blues and grays
    • dracula - Dark purples and reds
  • State Persistence: Profile selection persists across sessions

    • Stored in ~/.arc/state.json
    • Survives terminal sessions and system reboots
    • Applied globally to all arc commands

🧪 Testing & Quality

  • Comprehensive Integration Tests: E2E tests in tests/integration/profiles/

    • Profile lifecycle testing (list → set → get → verify)
    • User-defined profile loading and validation
    • Tier name verification across all profiles
    • Theme mapping validation
    • Profile validation (required fields, tier count, logo presence)
    • State persistence across sessions
    • Profile switching preserves other state values
  • Validation System: Robust profile validation

    • Required fields enforcement
    • Exactly 3 tier names validation
    • Valid theme ID verification
    • Non-empty logo validation
    • Hex color format validation (optional fields)
    • User-friendly error messages

📝 Documentation

  • User Guide: Complete profile documentation (docs/user-guides/profiles.md)

    • What profiles are and how they work
    • All 10 profiles with tier names and descriptions
    • Command reference (list, set, get)
    • Creating custom profiles with schema reference
    • Logo guidelines and font recommendations
    • Theme mapping table
    • Troubleshooting guide
    • Integration examples
  • README Updates: Profile system section added

    • Quick reference table of all profiles
    • Command examples
    • Custom profile creation example
    • Link to full documentation

🔧 Technical Implementation

  • New Packages:

    • pkg/ui/profiles/ - Profile system implementation
      • profile.go - Profile data structure
      • loader.go - YAML file loading
      • resolver.go - Profile resolution (user + embedded)
      • validator.go - Profile validation
      • embedded/ - 10 embedded profile YAML files
    • pkg/cli/config/ - Config command group
      • config.go - Command group setup
      • profile.go - Profile subcommands (list, set, get)
  • State Integration: Profile storage in preferences

    • internal/preferences/preferences.go - Profile get/set methods
    • Profile persisted in state.json
    • Default profile: "enterprise"

✨ User Experience

  • Visual Feedback: Rich output for profile commands

    • Colored profile listings with tier name preview
    • Active profile marker (▶) in list view
    • Detailed profile information in get-profile
    • Success/error messages for set-profile
  • Workspace Integration: Profiles affect workspace tier naming

    • Workspace operations use active profile tier names
    • Seamless integration with workspace commands
    • Consistent naming across all CLI output

Added - Animations and Rich UI Enhancements (Spec 005) 🎬✨

This release brings smooth, delightful animations to the A.R.C. CLI while maintaining excellent performance and automatic degradation for non-interactive environments.

🎨 Animation System

  • Smart Animation Control: Animations automatically disabled in CI/CD, pipes, and non-TTY environments

    • --no-animation flag for per-command control
    • ARC_NO_ANIMATION environment variable for persistent settings
    • Respects NO_COLOR standard
    • Intelligent TTY and terminal width detection
    • Configurable via ~/.arc/config/animation.yaml
  • Spring Physics Animations: Smooth, natural motion using Harmonica library

    • 60 FPS banner color transitions
    • Configurable damping and stiffness parameters
    • Adaptive frame rates for terminal performance
    • Zero CPU overhead when disabled
  • Animated Banner: Smooth color transitions on CLI launch

    • Spring-based color interpolation
    • Theme-aware gradient animations
    • Character-by-character rainbow mode
    • Instant fallback to static rendering
  • Spinner Indicators: Visual feedback for operations

    • Bubble Tea integration for smooth animations
    • Multiple spinner styles (dot, line, dots, etc.)
    • Automatic display for operations >200ms
    • Used in arc info command
  • Theme Transitions: Smooth animated theme switching

    • Color interpolation between themes
    • Looping preview animations
    • Waterfall effects for theme lists
    • Enhanced arc theme preview and arc theme set commands

🛠️ Developer Features

  • Animation API: Easy-to-use animation utilities

    • animations.ShouldAnimate() - Centralized animation decision logic
    • animations.WithSpinner() - Wrap operations with spinners
    • animations.WithProgress() - Progress bar wrapper (ready for future use)
    • animations.InterpolateColor() - Smooth color transitions
    • animations.AnimateTransition() - Theme transition helper
  • Configuration System: Flexible animation settings

    • LoadConfig() with fallback to embedded defaults
    • Per-animation-type settings (banner, spinner, progress, theme)
    • FPS, duration, and spring physics tuning
    • Validation with sensible limits

📝 Documentation

  • User Guide: Complete animation documentation (docs/ANIMATIONS.md)

    • How to control and disable animations
    • Configuration options and examples
    • Troubleshooting guide
    • Performance characteristics
  • API Reference: Developer documentation (docs/api/ANIMATIONS_API.md)

    • Complete API reference with examples
    • Integration patterns with Bubble Tea
    • Best practices and performance tips
    • Testing strategies

🎯 Enhanced Commands

  • arc info: Now with animated spinner during data collection

    • Non-animated fallback when TTY unavailable
    • Removed debugging delay for instant response
    • JSON output option for scripting
  • arc theme set: Smooth animated theme transitions

    • Color interpolation from old to new theme
    • Visual feedback during switch
    • Instant mode with --no-animation
  • arc theme preview: Animated theme demonstrations

    • Looping color animations
    • Character-by-character rainbow effects
    • Static preview fallback
  • arc (root command): Animated banner on launch

    • Smooth gradient color transitions
    • Spring physics for natural motion
    • Theme-aware animations

✅ Quality Assurance

  • Comprehensive Testing: 50+ unit tests, 10 integration tests

    • control_test.go: Animation decision logic (8 tests + benchmark)
    • config_test.go: Configuration loading (10 tests + benchmark)
    • spinner_test.go: Spinner utilities (7 tests + benchmark)
    • color_test.go: Color interpolation (15 tests + 4 benchmarks)
    • transition_test.go: Theme transitions (5 tests + 2 benchmarks)
    • progress_test.go: Progress bars (6 tests + benchmark)
    • banner_benchmark_test.go: Performance benchmarks (6 benchmarks)
    • Integration tests for E2E validation (10 test cases)
  • Zero Race Conditions: All tests pass with -race flag

  • Performance Validated: All benchmarks meet targets

  • Linting Clean: Zero golangci-lint warnings

🐛 Bug Fixes

  • Fixed: TTY detection causing failures in non-interactive environments
    • Info command now properly falls back to non-animated mode
    • No more /dev/tty: device not configured errors in tests
  • Fixed: Removed debugging delay (500ms) from info command
  • Fixed: Animation cleanup on Ctrl+C interruption

🔧 Technical Improvements

  • Performance: <1% CPU usage during animations
  • Memory: Efficient buffer reuse in animation loops
  • Compatibility: Graceful degradation across all terminal types
  • Reliability: Context-aware cancellation for clean shutdown

Added - Interactive UI Enhancements (Spec 018) 🎨✨

This major release transforms the CLI into a modern, interactive experience with smooth animations, comprehensive logging, and intelligent terminal adaptation.

🏗️ Core Infrastructure

  • Terminal Detection System: Auto-detect terminal capabilities

    • Color profile detection (TrueColor, 256-color, 16-color, NoColor)
    • TTY detection with proper fallbacks
    • Terminal size detection with responsive layouts
    • Environment variable support (NO_COLOR, CLICOLOR_FORCE, COLORTERM, TERM)
  • Structured Logging Framework: Production-ready logging system

    • Charm Log integration with beautiful output
    • File rotation (10MB max, 5 backups) using lumberjack
    • Secret redaction for sensitive data (tokens, passwords, keys)
    • Context-based logging with key-value pairs
    • Log levels: DEBUG, INFO, WARN, ERROR, FATAL
    • Dual output: formatted console + JSON file logs
  • Animation System: Smooth 60fps animations

    • Spring physics using Harmonica library
    • Configurable parameters (damping, stiffness, duration)
    • Adaptive frame rate based on terminal performance
    • Auto-skip for fast operations (<200ms)
    • Graceful degradation in non-TTY environments

✨ User-Facing Features

US1: Interactive Info Command

  • arc info - Display system information with animated spinners
  • Shows: CLI version, Go version, OS/Arch, state DB info, current theme
  • arc info --json - Machine-readable output for scripting
  • Responsive table layouts adapting to terminal width

US2: Animated Branding

  • Smooth color transitions with spring-based physics
  • Banner animation on theme switches
  • Character-by-character rainbow animation
  • <300ms animation target for responsiveness

US3: Structured Logging

  • --verbose flag for debug output
  • --log-level flag (debug/info/warn/error/fatal)
  • Logs stored in .arc/logs/arc.log with automatic rotation
  • Colored console output with emoji indicators
  • Integrated throughout all commands

US4: Progress Indicators

  • Animated spinners: dot, line, globe, moon, meter, hamburger
  • Progress bars with percentage, rate, and ETA
  • Multi-progress layout for parallel operations
  • Auto-hide for operations completing in <200ms
  • Integrated into state operations

US5: Enhanced Theme System

  • arc theme preview <name> - Animated theme demonstrations
  • arc theme list - Shows inline previews for all themes
  • arc theme set <name> --no-animation - Instant theme switching
  • Live style examples (success, error, info, warning)
  • Smooth transition animations between themes

US6: Enhanced Layout Components

  • Reusable Panel component with configurable borders and styling
  • Enhanced Table component with auto-sizing columns
  • Per-column alignment support
  • Responsive width handling (minimum 80 columns)
  • Consistent formatting across all commands

US7: Shell Completion

  • arc completion bash|zsh|fish|powershell - Generate completions
  • arc completion --interactive - Interactive setup wizard
  • Auto-detection of current shell
  • Installation instructions for each shell

🧪 Test Coverage

  • 22 comprehensive test files covering all components
  • Terminal detection tests
  • Branding and system info tests
  • Logging infrastructure tests (logger, writer, redactor)
  • Animation framework tests
  • UI component tests (panel, progress, spinner, table)
  • Layout and markdown rendering tests
  • Style system tests (emoji, output formatting)
  • CLI command tests (all 7 user stories)
  • >80% code coverage across the project

🔧 Technical Improvements

  • Zero variable shadowing issues
  • Full golangci-lint compliance
  • Consistent code formatting with gofumpt
  • Comprehensive error handling
  • Graceful degradation in limited environments
  • NO_COLOR and ARC_NO_ANIMATION environment variable support
  • arc theme list --preview - Inline color previews
  • Smooth theme transition animations
  • --no-animation flag for instant switching
  • Animated style examples (success, error, info, warning)

US6: Improved Layout Components

  • Panel component with titled content and borders
  • Enhanced Table with auto-sizing columns
  • Per-column alignment support
  • Responsive width handling
  • Refactored arc state show to use table component
  • Refactored arc history to use panel component

US7: Completion Command Enhancement

  • arc completion command for shell completion
  • Support for bash, zsh, fish, PowerShell
  • Interactive setup wizard with --interactive flag
  • Auto-detection of current shell
  • Platform-specific installation instructions

Components & Libraries

New Packages:

  • internal/terminal/detect.go - Terminal capability detection
  • pkg/log/ - Structured logging system (logger, writer, redactor)
  • pkg/ui/components/animator.go - Animation framework
  • pkg/ui/components/panel.go - Panel component
  • pkg/ui/components/progress.go - Progress indicators
  • pkg/ui/components/spinner.go - Spinner animations
  • pkg/ui/components/table.go - Enhanced tables
  • pkg/cli/completion.go - Completion command

Enhanced Packages:

  • pkg/ui/layout/layout.go - Added responsive width functions
  • pkg/ui/styles/colors.go - Added CodeStyle for code snippets
  • pkg/cli/info.go - Animated system information display
  • pkg/cli/theme.go - Theme preview and animation
  • pkg/cli/state.go - Table/panel-based display

Configuration & Environment

New Environment Variables:

  • ARC_NO_ANIMATION=1 - Disable all animations
  • ARC_ANIMATION_FPS=30 - Set target FPS (default: 60)
  • ARC_LOG_LEVEL - Set log level (debug, info, warn, error, fatal)
  • ARC_LOG_FILE - Custom log file path
  • ARC_STATE_DIR - Custom state directory

New Config Files:

  • configs/animation.yaml - Animation configuration
  • configs/logging.yaml - Logging configuration

Changed

  • Refactored state display to use enhanced table component
  • Refactored history display to use panel component
  • Updated theme command with preview capabilities
  • Enhanced info command with animations

Technical Details

Dependencies Added:

  • github.com/charmbracelet/harmonica - Spring physics animations
  • github.com/charmbracelet/log - Structured logging
  • github.com/natefinch/lumberjack - Log rotation

Architecture:

  • Animation system supports 60 FPS with spring physics
  • Adaptive performance based on terminal capabilities
  • Auto-hide fast operations to avoid flicker
  • Responsive layouts adapt to terminal width (80-120 columns)

Documentation

  • Updated README.md with new commands and environment variables
  • Added environment variable documentation section
  • Updated command examples with new features

0.1.0 - 2024-12-XX (Previous Release)

Added

  • Initial CLI foundation with Cobra
  • ASCII art banner with gradient themes
  • Theme management system (arc theme list/set/show)
  • State management and persistence
  • Basic styling and emoji system

Features

  • 6 built-in themes (cyan-purple, rainbow, fire, ocean, matrix, character-rainbow)
  • NO_COLOR support for CI/CD
  • Version and help commands
  • Cross-platform support (macOS, Linux, Windows)

Release Notes Format

Each release includes:

  • Added: New features and capabilities
  • Changed: Changes to existing functionality
  • Deprecated: Features that will be removed
  • Removed: Features that were removed
  • Fixed: Bug fixes
  • Security: Security improvements