Skip to content

Add new ansi theme - #35

Merged
programmersd21 merged 1 commit into
programmersd21:mainfrom
stevedylandev:main
Aug 28, 2026
Merged

Add new ansi theme#35
programmersd21 merged 1 commit into
programmersd21:mainfrom
stevedylandev:main

Conversation

@stevedylandev

@stevedylandev stevedylandev commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a simple new theme that utilizes the existing terminal ANSI colors instead of hard code values.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behaviour)
  • Refactor / internal cleanup (no user-visible change)
  • Documentation / comments only

Checklist

  • make check passes locally with zero warnings (make fmt && make vet && make lint && make test)
  • New or changed behaviour is covered by tests where practical
  • Public API changes are reflected in documentation / comments
  • This change is consistent with the project philosophy: one metric, one screen, zero configuration — see the Philosophy section in the README

Testing done

Built and ran on MacOS 26.6.2

Screenshots / recordings

CleanShot 2026-08-28 at 12 09 06@2x CleanShot 2026-08-28 at 12 09 49 2@2x CleanShot 2026-08-28 at 12 10 06@2x CleanShot 2026-08-28 at 12 10 12@2x CleanShot 2026-08-28 at 12 10 18@2x

Summary by Sourcery

Add an ANSI theme that makes the application follow the terminal’s configured color palette.

New Features:

  • Add an ansi built-in theme that uses the terminal’s 16-color palette for text, gradients, borders, and logo rendering.

Enhancements:

  • Support palette-based theme colors alongside existing RGB themes, preserving user terminal customization.

Documentation:

  • Update the README to list nine built-in themes and document the new ANSI theme in the available theme list.

Summary by CodeRabbit

  • New Features
    • Added a built-in ANSI theme that uses terminal color palettes instead of RGB gradients.
    • ANSI-based colors now apply consistently to logos, download and upload indicators, borders, and peak displays.
    • Updated the documented built-in theme count from 8 to 9.

@sourcery-ai

sourcery-ai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a ninth built-in ansi theme using terminal palette indices instead of hard-coded RGB gradients, with shared ANSI color selection paths for metrics, borders, logo, and animated accents.

Flow diagram for ANSI theme color selection

flowchart LR
    Theme[ansi theme] --> UsesANSI[usesANSI]
    UsesANSI -->|true| ANSI[ansiStop terminal palette index]
    UsesANSI -->|false| RGB[Existing RGB gradient]
    ANSI --> Metrics[Download and upload colors]
    ANSI --> Borders[Download and upload borders]
    ANSI --> Logo[Logo and animated accents]
    RGB --> Metrics
    RGB --> Borders
    RGB --> Logo
Loading

File-Level Changes

Change Details Files
Introduces an ANSI-palette theme that delegates theme colors to the terminal’s standard 16-color palette.
  • Adds ANSI palette stop fields to the theme model and registers the new built-in theme.
  • Defines ANSI-based text, download, upload, border, logo, and pulse color mappings.
  • Adds palette-stop selection with clamped, stepped intensity mapping while preserving RGB behavior for existing themes.
  • Documents the ninth built-in theme in the README and theme listing.
internal/theme/theme.go
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e67cb57a-fb55-4d21-a8a2-ee7bab64f8a3

📥 Commits

Reviewing files that changed from the base of the PR and between 944384b and 70de3ad.

📒 Files selected for processing (2)
  • README.md
  • internal/theme/theme.go

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The theme system adds a built-in ansi theme with terminal palette indices. ANSI-aware color functions select palette stops instead of interpolating RGB gradients. The README updates the built-in theme count.

Changes

ANSI theme support

Layer / File(s) Summary
ANSI theme definition and registration
internal/theme/theme.go, README.md
Theme adds ANSI palette fields. The new ansi theme is added to the theme list. The README reports nine built-in themes.
ANSI color selection
internal/theme/theme.go
Color functions detect ANSI themes and use ansiStop for logo, transfer, border, and peak colors. Non-ANSI themes retain RGB gradients.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 70de3

This change adds an ANSI-based visual theme while preserving existing RGB themes and does not alter application services, data, permissions, or deployment behavior. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: programmersd21

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 1 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: adding a new ANSI theme.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@programmersd21

Copy link
Copy Markdown
Owner

wow, looks beautiful, thanks, ill merge it asap!!!

@programmersd21
programmersd21 merged commit 39dac11 into programmersd21:main Aug 28, 2026
9 checks passed
@programmersd21

Copy link
Copy Markdown
Owner

merged, thanks for the contrib!

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.

2 participants