Skip to content

fix: apply --no-color flag to huh interactive prompts#454

Open
srtaalej wants to merge 2 commits intomainfrom
ale-no-color
Open

fix: apply --no-color flag to huh interactive prompts#454
srtaalej wants to merge 2 commits intomainfrom
ale-no-color

Conversation

@srtaalej
Copy link
Copy Markdown
Contributor

@srtaalej srtaalej commented Mar 31, 2026

Changelog

N/A - Fixes for unreleased changes.

Summary

The --no-color flag stripped styles from CLI output but not from huh interactive prompts (select, confirm, input, etc.), because huh uses its own theme/rendering pipeline. This PR added ThemePlain() — a colorless huh theme with no ANSI styling so that when --no-color is set, forms now use ThemePlain + huh's accessible mode, rendering as plain numbered lists instead of a styled TUI

Test plan

Run slack create --no-color and verify prompts render as plain numbered lists with no color
Run slack login --no-color and verify confirmation prompt has no color
Run slack create (without --no-color) and verify themed prompts still work
go test ./internal/style/ ./internal/iostreams/

Requirements

@srtaalej srtaalej requested a review from a team as a code owner March 31, 2026 19:26
@srtaalej srtaalej self-assigned this Mar 31, 2026
@srtaalej srtaalej added semver:minor Use on pull requests to describe the release version increment enhancement M-T: A feature request for new functionality labels Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.42%. Comparing base (15e0c40) to head (1327317).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #454      +/-   ##
==========================================
- Coverage   70.42%   70.42%   -0.01%     
==========================================
  Files         221      221              
  Lines       18539    18568      +29     
==========================================
+ Hits        13057    13076      +19     
- Misses       4307     4314       +7     
- Partials     1175     1178       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimeg zimeg added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment and removed enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment labels Mar 31, 2026
@zimeg zimeg added this to the Next Release milestone Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants