feat(docs): list pending suggestions#896
Conversation
|
Codex review: needs changes before merge. Reviewed July 1, 2026, 6:13 AM ET / 10:13 UTC. Summary Reproducibility: not applicable. as a bug reproduction: this PR adds a new read-only command. The source-level failure path is high-confidence because the added walker ignores structural suggestion ID fields that exist in the pinned Docs API model. Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Carry structural suggestion IDs through the walker or emit structural-range items, then land the read-only suggestions surface after maintainer approval of the public command contract and proof bar. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this PR adds a new read-only command. The source-level failure path is high-confidence because the added walker ignores structural suggestion ID fields that exist in the pinned Docs API model. Is this the best way to solve the issue? No, not quite as submitted. The dedicated command is a maintainable shape, but the walker should account for structural suggestion IDs or explicitly narrow and document its supported scope before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d405310c351e. 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
|
eed3903 to
d0e30f7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0e30f7ef2
ℹ️ 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".
| if element.Table != nil { | ||
| for _, row := range element.Table.TableRows { | ||
| for _, cell := range row.TableCells { | ||
| walk(cell.Content) | ||
| } |
There was a problem hiding this comment.
Handle table-level suggestion IDs
When the pending edit inserts or deletes an entire table, row, or cell, the Docs model can attach suggestedInsertionIds/suggestedDeletionIds to the Table, TableRow, or TableCell rather than only to each nested TextRun. This branch only descends into cell.Content and later looks at element.TextRun IDs, so those structural suggestions are silently omitted unless the API also duplicates the ID onto every run; users can get an empty or partial list for suggested table edits. Please carry active table/row/cell suggestion IDs into the recursive walk or emit items for the structural range.
Useful? React with 👍 / 👎.
Closes #876.
Summary
gog docs suggestions list <docId> [--tab title-or-id]SUGGESTIONS_INLINEexplicitly and emit pending text insertions/deletions with suggestion ID, segment, UTF-16 range, and textStyle-only suggestions and accept/reject mutation remain intentionally out of scope. The Docs API response does not expose suggestion authors.
Proof
d0e30f7e:make cid0e30f7e:go test -race ./internal/cmd -run 'Test(DocsSuggestions|EnumerateDocsSuggestions)' -count=1d0e30f7e: generated docs/skills checks; 704 command pages and clean worktreed0e30f7e: structured branch autoreview clean (0.86); no accepted/actionable findingsv0.31.1-10-gd0e30f7e; SHA-256fd8d7de82059b51232eff664381408040f1a1c2db69b0c404b1a02d858635e5dThe rebase onto current
mainresolved only the changelog entry and refreshed the generated command-page count from 702 to 704; implementation code is unchanged from the live/behavior-tested head.Live-proof gap
Google's Docs API can read but cannot create a pending suggestion. The existing-profile Chrome extension was unavailable and the approved DevTools bridge returned no real tabs, so an authenticated document containing a real pending insertion/deletion could not be created safely. The exact pending-change rendering path is therefore fixture-proven but awaits either a live fixture or an explicit item-specific maintainer waiver before merge.