Richer Docs/Slides authoring: docs insert-table, slides read-slide + insert-text#23
Conversation
…text
First slice of the richer-authoring roadmap, all additive (.edit for the
writes; read-slide is a read):
docs insert-table <id> --rows R --cols C (empty table at end or --index)
slides read-slide <id> <slideObjId> (list a slide's page-element
objectIds + text)
slides insert-text <id> <objId> --text (insert into a shape/table cell)
read-slide makes the element objectIds for insert-text discoverable. Cell-level
table population, image inserts, markdown->deck and smart chips are deliberately
left for later. Wiring tests (verb + endpoint + body, plus an insert-table
validation) and SKILL.md entries included.
https://claude.ai/code/session_01JGWAxXq3PZatbdBR4P5RrA
There was a problem hiding this comment.
Code Review
This pull request introduces several new commands to the gog CLI: docs insert-table for inserting empty tables into Google Docs, slides read-slide for listing slide elements, and slides insert-text for inserting text into slide shapes. The review feedback highlights a critical issue where slides insert-text cannot insert text into table cells as documented because the Google Slides API requires a cellLocation (row and column index) rather than just an objectId. Additionally, the feedback suggests escaping slide text with tsvEscaped in slides read-slide to prevent TSV corruption from tabs, and adding a corresponding test case for the table cell text insertion.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2652b0cdc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review fixes on #23: - slides insert-text: add --row/--col and encode cellLocation, so a table objectId can actually address a cell (the API needs cellLocation; without it a table target was rejected). --row/--col must be given together. Tests cover the cellLocation payload and the both-or-neither guard. - slides read-slide: fetch the single page via presentations.pages.get instead of the whole deck, so --json is scoped to the requested slide and an unknown ID 404s rather than dumping every slide. TSV-escape element text. https://claude.ai/code/session_01JGWAxXq3PZatbdBR4P5RrA
…ion test - create-textbox: reject non-finite / out-of-range --x/--y/--width/--height before the Double->Int EMU conversion, which traps on NaN/Infinity (and an Infinity slipped past the positive-size guard). Flagged by Codex + Gemini on #24. Adds a test that `--x inf` exits 2 instead of crashing the process. - Fix a pre-existing flaky assertion in slidesInsertTextIntoTableCellEncodes- CellLocation: JSONEncoder emits object keys in per-process-random order, so assert rowIndex/columnIndex independently rather than as one fixed-order substring. This was the only CI failure on #24 (it passed on #23 by luck of the process hash seed, not because the order is stable). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JGWAxXq3PZatbdBR4P5RrA
First slice of the richer Docs/Slides authoring roadmap (after the create/edit/delete surface in #21–#22). All additive —
.editfor the writes, a read forread-slide.New commands
docs insert-table <docId> --rows R --cols C [--index N].editdocuments.batchUpdate(insertTable)slides read-slide <presentation> <slideId>presentations.pages.get(element objectIds + text, one slide)slides insert-text <presentation> <objectId> --text … [--index N] [--row R --col C].editpresentations.batchUpdate(insertText)read-slideexists so the page-element objectIds thatinsert-texttargets are discoverable from the CLI (mirrors howlist-slidesfeedsdelete-slide).Notes
insert-tableinserts an empty R×C table at the end of the doc (or at--index); cells start empty. Validates rows/cols > 0.read-slidefetches a single page viapresentations.pages.get, so--jsonreturns only the requested slide's elements and an unknownslideIdfails (404 → exit 1) rather than silently dumping every slide.insert-textinserts into an existing shape by objectId at--index(default 0); pass--row R --col Ctogether to target a table cell (cellLocation). Supplying only one of--row/--colis a usage error (exit 2).--dry-run/--jsonthroughout; uses thedocs/slideshosts already allow-listed in Add Docs and Slides write commands (create / append / find-replace, etc.) #21.Tests
6 wiring tests: insert-table verb/endpoint/body + positive-dimensions validation; read-slide element listing (asserts the single-page URL); insert-text shape body; insert-text into a table cell (asserts the
cellLocationpayload); and the--row/--col-together usage guard. SKILL.md documents all three commands. CI green.🤖 Generated with Claude Code
https://claude.ai/code/session_01JGWAxXq3PZatbdBR4P5RrA
Generated by Claude Code