Skip to content

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

Closed
srtaalej wants to merge 12 commits intomainfrom
ale-no-color-flag
Closed

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

Conversation

@srtaalej
Copy link
Copy Markdown
Contributor

Changelog

Fixed --no-color flag not being applied to interactive prompts (select, confirm, input)

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 self-assigned this Mar 31, 2026
@srtaalej srtaalej requested a review from a team as a code owner March 31, 2026 15:04
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality discussion M-T: An issue where more input is needed to reach a decision semver:minor Use on pull requests to describe the release version increment labels Mar 31, 2026
@srtaalej srtaalej changed the title Ale no color flag fix: apply --no-color flag to huh interactive prompts Mar 31, 2026
@srtaalej srtaalej marked this pull request as draft March 31, 2026 16:27
@srtaalej srtaalej closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussion M-T: An issue where more input is needed to reach a decision enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant