Skip to content

Conversation

azzazzel
Copy link

Problem

The CLI lacked a consistent visual design system and standardized presentation patterns across different commands. Output formatting was inconsistent, error messages were not user-friendly, and there was no centralized theming system. This resulted in a fragmented user experience with varying message styles, table presentations, and interactive components that didn't follow a cohesive design language.

Solution

This PR introduces a comprehensive style theme system and standardizes the CLI output presentation. Currently, it is implemented in the commands related to index management. The changes include:

  • Centralized Style System: Created a unified color scheme and typography system with predefined styles for success, warning, error, info, and text elements
  • Standardized Message Presentation: Implemented consistent message boxes with proper spacing, colors, and multi-line support for better readability
  • Enhanced Table Rendering: Added a dedicated table utility with branded styling, proper column alignment, and consistent formatting across all list/describe commands
  • User-Friendly Error Handling: Introduced structured error parsing with verbose mode support and cleaner error message presentation
  • Interactive Components: Added confirmation dialogs with consistent styling and improved user interaction patterns
  • Resource Name Styling: Implemented dedicated styling for resource names to improve visual hierarchy
  • Color Scheme Configuration: Added color scheme management with proper fallbacks for different terminal environments

The implementation ensures all output follows a consistent design language while maintaining backward compatibility and providing a better user experience through improved visual clarity and information hierarchy.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

  1. Color Scheme: Test different color schemes and terminal environments:

    pc config show-color-scheme
    
    # to change the scheme
    pc config set-color-scheme light
    pc config set-color-scheme dark
  2. Style System Testing: Verify that all predefined styles render correctly with and without color support:

    # Test with colors enabled
    pc index list
    pc index describe <name>
    
    # Test with colors disabled
    NO_COLOR=true pc index list
    NO_COLOR=true pc index describe <name>
  3. Message Presentation Testing: Test different message types and multi-line messages:

    # Test success messages
    pc index create test-index --dimension 1536 --metric cosine --cloud aws --region us-east-1
    
    # Test error messages (with and without verbose flag)
    pc index create invalid-name
    pc index create invalid-name --verbose
    
    # Test warning messages
    pc index delete test-index
  4. Table Rendering Testing: Verify consistent table formatting across all commands:

    pc index list
    pc project list
    pc organization list
    pc api-key list
  5. Interactive Components Testing: Test confirmation dialogs and interactive elements:

    pc index delete test-index
    pc project delete <project-name>

This PR builds upon the previous #35 and includes all the changes from that branch as well.

@azzazzel azzazzel changed the title Md 03 md-03 - design system and standardized presentation Sep 10, 2025
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