Skip to content

Conversation

@andymccutcheon
Copy link

Summary

Improves terminal text readability by enhancing background detection
and using brighter colors on dark terminal backgrounds.

Problem

Dark blue text in the setup wizard was nearly impossible to read on
dark terminal backgrounds, particularly affecting labels like "Selected
endpoint:", "User PII Access:", etc.

Solution

  1. Enhanced Terminal Detection:

    • Improved isDarkBackground() function with better heuristics
    • Added support for NO_COLOR environment variable
    • Added detection for Hyper and Warp terminals
    • Changed fallback to assume LIGHT backgrounds (safer default)
  2. Improved Color Contrast:

    • Link colors: sky-300 (#7DD3FC) on dark, sky-700 (#0369A1) on light
    • Muted text: gray-200 (#E5E7EB) on dark, gray-700 (#374151) on
      light
    • Applied consistent colors across all UI functions
  3. Updated Functions:

    • formatKeyValue() - Key-value pair formatting
    • showSection() - Section headers
    • showCompletion() - Completion messages
    • showDivider() - Dividers
    • formatKeychainChoiceLabel() - Key selection lists

Testing

  • ✅ All 201 unit tests pass
  • ✅ Build succeeds with no errors
  • ✅ Linting and formatting checks pass
  • ✅ Manually tested with both light and dark terminal themes

Enhance terminal background detection and update color choices for better
contrast and readability across different terminal environments.

Changes:
- Improved isDarkBackground() detection with more robust terminal detection
- Changed fallback to assume LIGHT backgrounds (safer default)
- Added support for NO_COLOR environment variable
- Added detection for Hyper and Warp terminals
- Updated all color choices to use brighter colors on dark backgrounds:
  - Link colors: sky-300 (#7DD3FC) on dark, sky-700 (#0369A1) on light
  - Muted text: gray-200 (#E5E7EB) on dark, gray-700 (#374151) on light
- Applied consistent color updates across all UI functions:
  - formatKeyValue()
  - showSection()
  - showCompletion()
  - showDivider()
  - formatKeychainChoiceLabel()

This fixes the issue where dark blue text was nearly invisible on dark
terminal backgrounds, particularly affecting the setup wizard output.

Users can still override detection with ITERABLE_UI_THEME=dark or
ITERABLE_UI_THEME=light environment variable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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