Skip to content

Comments

fix(sheets): PIE chart domain/series, --value validation, negative index guard#130

Merged
omriariav merged 2 commits intomainfrom
fix/sheets-review-fixes
Feb 19, 2026
Merged

fix(sheets): PIE chart domain/series, --value validation, negative index guard#130
omriariav merged 2 commits intomainfrom
fix/sheets-review-fixes

Conversation

@omriariav
Copy link
Owner

Summary

Post-merge review fixes for PR #127 (sheets charts/conditional formatting). Addresses issues found by both PR-reviewer and Codex:

  • PIE chart domain/series: Split data range into separate domain (first column = labels) and series (remaining columns = data) instead of passing the same full range for both, which produced semantically incorrect chart data.
  • --value validation: Validate that --value is provided for conditional format rule types that require it (>, <, =, !=, contains, not-contains, formula). Previously an empty value was silently sent to the API.
  • Negative index guard: Reject negative --index values in delete-conditional-format before making the API call.

Test plan

  • go vet ./... clean
  • go test ./... all pass
  • Manual test: gws sheets add-chart <id> --type PIE --data "Sheet1!A1:B5" produces correct chart
  • Manual test: gws sheets add-conditional-format <id> "A1:A10" --rule ">" without --value shows error

🤖 Generated with Claude Code

omriariav and others added 2 commits February 19, 2026 23:46
…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>
@omriariav omriariav merged commit 545f0d8 into main Feb 19, 2026
1 check passed
@omriariav omriariav deleted the fix/sheets-review-fixes branch February 19, 2026 21:52
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.

1 participant