Skip to content

Add colored output indicators for investigation confidence levels #35

@manthan787

Description

@manthan787

Description

Add color-coded confidence indicators to investigation output for better visual feedback.

Why

When investigating incidents, confidence levels are shown as numbers (e.g., "0.86"). Adding colors would make it immediately clear whether confidence is high, medium, or low:

  • 🟢 Green: High confidence (≥0.8)
  • 🟡 Yellow: Medium confidence (0.5-0.8)
  • 🔴 Red: Low confidence (<0.5)

What to do

  1. Look at how the investigation results are rendered in src/cli.tsx
  2. The project uses Ink for terminal rendering (React-like)
  3. Add conditional coloring based on confidence thresholds
  4. Use Ink's <Text color="green"> component

Example

const getConfidenceColor = (confidence: number) => {
  if (confidence >= 0.8) return "green";
  if (confidence >= 0.5) return "yellow";
  return "red";
};

<Text color={getConfidenceColor(hypothesis.confidence)}>
  Confidence: {(hypothesis.confidence * 100).toFixed(0)}%
</Text>

Getting Started

bun install
bun run dev investigate --help  # See the command

Great for learning Ink/React terminal UI!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions