feat(sheets): add --inherit-from-before to sheets insert#658
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 30, 2026, 1:57 PM ET / 17:57 UTC. Summary Reproducibility: yes. for the source-level behavior: current main only derives Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused flag and validation after maintainer review, with release-note handling kept intentional and live Sheets proof requested only if maintainers want provider-visible confirmation beyond dry-run output and request-level tests. Do we have a high-confidence way to reproduce the issue? Yes for the source-level behavior: current main only derives Is this the best way to solve the issue? Yes, the pointer bool flag is a narrow maintainable fit because omitted preserves the current default while explicit true/false maps directly to the Sheets API field. The remaining questions are proof depth and release-note handling, not the core implementation shape. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 28e29cdfd0df. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
7fbb0a1 to
929e26b
Compare
73aa8c9 to
d9695c4
Compare
|
@clawsweeper re-review — reopened with real-behavior proof (help + dry-run showing the tri-state |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
`gog sheets insert` always derived InsertDimensionRequest.inheritFromBefore from --after, so there was no way to insert columns/rows with plain formatting next to a formatted neighbour (the reported case: plain 0–100 score columns inserted beside a currency column first rendered as currency). Add a tri-state `--inherit-from-before` flag (*bool): omitted keeps the prior default (inherit only with --after), `--inherit-from-before=false` forces plain formatting, and `--inherit-from-before` forces inheritance on a before-insert. Regenerate the command reference (make docs-commands) so the flag is documented. Co-Authored-By: Claude Opus 4.8 <[email protected]>
d9695c4 to
d1da0e6
Compare
…il (#72) Catch up the MCP wrappers to **gogcli v0.20.0**. Raises `MIN_GOG_VERSION` `0.19.0` → `0.20.0` (hence the `gogcli-bump` label →⚠️ Required gogcli version section). ## New tools | Tool | Package | What | |------|---------|------| | `gog_sheets_copy_paste` | sheets | Range `CopyPasteRequest` fill of values/formulas/format; a larger destination tiles the source to fill down/across (aliases fill, copy-range). Wraps our own [#663](openclaw/gogcli#663). | | `gog_docs_cell_update` | docs | Non-destructive table-cell content replace/append, addressed by table/row/col | | `gog_docs_cell_style` | docs | Table-cell background color + inline text styling (bold/italic/underline/colors), with row/col spans | | `gog_docs_insert_image` | docs | Upload a local PNG/JPEG/GIF and insert it (temp-share → insert → revoke) | | `gog_docs_insert_person` | docs | Native person smart chip for an email | | `gog_docs_insert_date_chip` | docs | Native date smart chip | ## New params on existing tools - `gog_sheets_insert` → `inheritFromBefore` (our [#658](openclaw/gogcli#658)) - `gog_docs_update` → `replaceRange`, `markdown` - `gog_docs_page_layout` → `pageSize`, `pageWidth`/`pageHeight`, all four margins - `gog_gmail_search` → `fromContact` (our [#657](openclaw/gogcli#657)) ## Verification - Full suite green across all 9 packages at the 100% coverage gate; typecheck + build clean. - **Live-verified against `gog v0.20.0`** on throwaway artifacts (created, exercised, then trashed): - docs: insert-table → cell-update → cell-style → insert-person → insert-date-chip → update `--markdown` → page-layout A4 — all returned success. - sheets copy-paste FORMULA fill: `=B1*10` in A1 filled down `A1:A5`, relative refs adjusted → computed `[10,20,30,40,50]`. - gmail `--from-contact`: live read-only search resolved + executed. - Every new/changed flag also parse-validated directly against the v0.20.0 binary. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Closes #66 (gog_sheets_copy_paste / fill). Closes #60 (--inherit-from-before on gog_sheets_insert). --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
Fixes #655.
Problem
gog sheets insertalways derivedInsertDimensionRequest.inheritFromBeforefrom--after:So there was no way to insert rows/columns with plain formatting next to a formatted neighbour — the reported case: plain 0–100 score columns inserted immediately after a currency-formatted column rendered as currency until the format was manually cleared.
Change
Add a tri-state
--inherit-from-beforeflag (*bool):--afteris set;--inherit-from-before=false— force plain formatting (the reported need);--inherit-from-before— force inheritance even on a before-insert.Maps straight through to
InsertDimensionRequest.inheritFromBefore. Command reference regenerated viamake docs-commands.Real-behavior proof (built from this branch)
gog sheets insert --help:--dry-runshows the flag controllinginherit_from_before(no API call):Review follow-ups addressed
make docs-commands;docs/commands/gog-sheets-insert.mdnow lists the flag.Tests: added two subtests over the existing httptest Sheets stub asserting wire-level
InheritFromBeforefor both override directions.make fmt+make lint+go test ./internal/cmd/green.