fix(sheets): PIE chart domain/series, --value validation, negative index guard#130
Merged
fix(sheets): PIE chart domain/series, --value validation, negative index guard#130
Conversation
…e validation, negative index guard - add-chart PIE: split data range into separate domain (first column) and series (remaining columns) instead of passing the same full range for both, which produced incorrect chart data. - add-conditional-format: validate that --value is provided for rule types that require it (>, <, =, !=, contains, not-contains, formula). Previously the empty value was silently sent to the API. - delete-conditional-format: reject negative --index values before the API call. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PIE charts require at least 2 columns (labels + data). A single-column range would produce an empty series range, causing an opaque API error. Now fails fast with a clear message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Post-merge review fixes for PR #127 (sheets charts/conditional formatting). Addresses issues found by both PR-reviewer and Codex:
--valueis provided for conditional format rule types that require it (>,<,=,!=,contains,not-contains,formula). Previously an empty value was silently sent to the API.--indexvalues indelete-conditional-formatbefore making the API call.Test plan
go vet ./...cleango test ./...all passgws sheets add-chart <id> --type PIE --data "Sheet1!A1:B5"produces correct chartgws sheets add-conditional-format <id> "A1:A10" --rule ">"without --value shows error🤖 Generated with Claude Code