Repository navigation
feat(docs): propose document edits as suggestions instead of changing the text - #1355
MuncleUscles wants to merge 2 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesAdds opt-in Google Docs suggestion writes, revision pinning, structured suggestion batches, and raw suggestion views. Example: Propose replacing “old wording” with “new wording” in a shared document.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR adds a distinct suggestion-writing capability absent from current main; its new public CLI surface needs an owner decision. Reviewed head: Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherDocs commands resolve document targets and build API requests; the new shared writer submits revision-pinned suggestions and returns confirmed suggestion IDs. flowchart LR
A[CLI command and flags] --> B[Inline document snapshot]
B --> C[Target and request planning]
C --> D[Revision pinned suggestion writer]
D --> E[Google Docs API]
E --> F[Confirmed suggestion IDs]
Technical reviewBest possible solution: Use the existing Docs mutation planners with a shared revision-pinned suggestion writer and an owner-approved command surface. Do we have a high-confidence way to reproduce the issue? This is a feature addition; source inspection confirms current main exposes suggestion reading but no dedicated suggestion-writing mode. Is this the best way to solve the issue? The shared writer and reuse of existing planners fit the subsystem, while the overlapping insertion entry points and breadth of structured operations warrant an owner scope decision. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cfee06622536. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 27, 2026, 10:11 AM ET / 15:11 UTC. |
What Problem This Solves
People and agents who edit a shared Google Doc with gog can only change the text directly. Collaborators can't review a proposed change before it lands, and an automated edit can't be accepted or rejected the way a human suggestion can.
User Impact
You can now propose edits as pending suggestions that the document's owners accept or reject in Google Docs.
--suggestondocs insert,delete,update,find-replace,edit,format,insert-page-break,insert-section-break,section-columns, andinsert-table(empty table only). Without the flag these commands still edit directly.docs suggestions insertfor a plain-text suggestion at an explicit offset, anddocs suggestions batchfor a JSON array of Docs requests (up to 500 requests, 4 MiB). gog supplies the pinned revision and suggestion mode; callers cannot override them.--revisionpins the document revision and is required with explicit offsets. A stale revision is refused rather than rebased.--pageless, Markdown conversion, and local image uploads), fail locally with a pointer to the guide.Why This Change Was Made
Google Docs can apply a batch update in suggestion mode against a required revision. gog resolves anchors, matches, and tab selectors from the inline-suggestions view, the view the write applies to, so existing suggestions count correctly in offsets. Read and write are pinned to the same revision, so a concurrent edit can't shift where a suggestion lands. Accepting, rejecting, or deleting suggestion threads is out of scope.
Evidence
Live check against a real Google account on a throwaway document (since trashed):
insert,update,delete, andformatwith--suggest, plus asuggestions batchitalic change, each returned a pending suggestion ID.docs suggestions listshowed the insertions and deletions.deleteTabrequest in a batch was rejected locally before any API call.update --suggestreplaces text, Google also attaches a text-style suggestion covering all style fields to the inserted run. gog sends only a delete and an insert. The accepted result is correct.Local fixtures: unit tests cover suggestion insert, batch, and the shared write path (revision pinning, stale-revision rejection, request-type allowlist, input limits, incompatible-flag errors).
go build,go vet,go test ./..., the Node script tests inmake test, andmake lintpass on macOS arm64 with Go 1.27.4.Not checked live: tabs other than the first, header/footer/footnote segments, tables, page and section breaks,
find-replace/editacross all tabs.