Skip to content

Validate column colors in the CLI#174

Merged
robzolkos merged 2 commits into
masterfrom
fix-column-color-validation
Jun 8, 2026
Merged

Validate column colors in the CLI#174
robzolkos merged 2 commits into
masterfrom
fix-column-color-validation

Conversation

@robzolkos

@robzolkos robzolkos commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Validates column colors for create and update commands so invalid values are reported before the API call. Supports the app’s lowercase friendly color aliases while preserving API color values, addressing the confusion reported in #173.

Fixes #173


Summary by cubic

Validate column colors for create/update in the CLI, mapping friendly aliases to API values and clarifying accepted values in help and errors. This blocks bad colors, aligns with the app’s lowercase names, and fixes #173.

  • Bug Fixes
    • Validate and normalize --color before requests; accepts case-insensitive aliases or API values; unknown colors return an invalid-args error listing allowed options.
    • Update --color help to show lowercase aliases (blue, gray, tan, yellow, lime, aqua, violet, purple, pink) and note that API values like var(--color-card-5) are supported.

Written for commit ca58ef1. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings June 8, 2026 15:09

Copilot AI 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.

Pull request overview

This PR adds CLI-side validation and normalization for --color on fizzy column create and fizzy column update, so invalid colors are rejected before making an API call (addressing the behavior described in #173).

Changes:

  • Normalize friendly color aliases (case-insensitive) to the API’s CSS var color values before sending requests.
  • Reject unknown colors early with an invalid-arguments error (no API call made).
  • Expand tests to cover normalization, rejection behavior, and updated --color help text.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
internal/commands/column.go Validates/normalizes --color before create/update API calls; updates flag help text.
internal/commands/column_test.go Updates create test expectation to match normalized API color value behavior.
internal/commands/column_color.go Introduces alias/API-value normalization and invalid-color rejection.
internal/commands/column_color_test.go Adds unit/integration-style tests for color normalization, rejection, and help text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/commands/column.go Outdated
Comment thread internal/commands/column.go Outdated
Comment thread internal/commands/column_color.go Outdated
@robzolkos

Copy link
Copy Markdown
Collaborator Author

Fixed — clarified help and error text to say supported API color values.

@robzolkos robzolkos merged commit fa5af9b into master Jun 8, 2026
20 checks passed
@robzolkos robzolkos deleted the fix-column-color-validation branch June 8, 2026 15:19
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.

fizzy column update --color returns success, but the color doesn’t always change

2 participants