Skip to content

feat(docs): add spacing mode to docs format#886

Open
clawsweeper[bot] wants to merge 3 commits into
mainfrom
clawsweeper/issue-openclaw-gogcli-885
Open

feat(docs): add spacing mode to docs format#886
clawsweeper[bot] wants to merge 3 commits into
mainfrom
clawsweeper/issue-openclaw-gogcli-885

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add --spacing-mode to gog docs format for paragraphStyle.spacingMode
  • accept NEVER_COLLAPSE and COLLAPSE_LISTS, with invalid values rejected before sending Docs API requests
  • include spacingMode in dry-run output, request field masks, generated command docs, and the Docs editing guide

Testing

  • make fmt
  • make docs-commands
  • go test ./internal/docsformat ./internal/cmd
  • make ci

Closes #885

Thanks @odyssey4me for the focused report.

@clawsweeper clawsweeper Bot added clawsweeper Tracked by ClawSweeper automation clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:autofix Bounded ClawSweeper-reviewed autofix without merge labels Jun 29, 2026
@clawsweeper

clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Codex review: passed. Reviewed June 29, 2026, 7:17 AM ET / 11:17 UTC.

Summary
Adds a --spacing-mode option for Google Docs paragraph style updates, including validation, dry-run output, command docs, user docs, and focused tests.

Reproducibility: yes. for the feature gap: current main lacks a --spacing-mode flag and paragraphStyle.spacingMode request wiring, while the linked issue describes that missing surface clearly. I did not run a live Docs mutation in this read-only review.

Review metrics: 2 noteworthy metrics.

  • Net changed files: 10 modified, 0 added, 0 removed. The patch scope stays focused on Docs formatting implementation, generated/user docs, and tests.
  • Release-owned files touched: 0 in net diff. The current head no longer changes CHANGELOG.md, keeping release notes out of this normal PR.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #885
Summary: This PR is the implementation candidate for the linked spacing-mode feature request.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Mantis proof suggestion
A live Google Docs proof would usefully confirm the visible rendered spacing behavior that request-construction tests cannot show. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify gog docs format --spacing-mode NEVER_COLLAPSE keeps spaceBelow visible between Google Docs list items.

Risk before merge

  • [P1] This read-only review did not observe live Google Docs persistence or rendered list spacing; maintainers may still want visual proof before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused spacing-mode implementation after normal CI and maintainer review, with optional live Docs proof if maintainers want rendering confirmation.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair lane is needed; this is already the open implementation candidate and has no actionable code finding.

Security
Cleared: No security or supply-chain concern was found; the diff only touches Docs formatting code, generated/user docs, and tests.

Review details

Best possible solution:

Land the focused spacing-mode implementation after normal CI and maintainer review, with optional live Docs proof if maintainers want rendering confirmation.

Do we have a high-confidence way to reproduce the issue?

Yes for the feature gap: current main lacks a --spacing-mode flag and paragraphStyle.spacingMode request wiring, while the linked issue describes that missing surface clearly. I did not run a live Docs mutation in this read-only review.

Is this the best way to solve the issue?

Yes: extending the existing DocsFormatFlags and docsformat.BuildRequests paragraph-style path is the narrowest maintainable solution, and no markdown import behavior needs to change.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 213ddb60d7d1.

Label changes

Label justifications:

  • P3: This is a small Docs formatting feature in an existing command with limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a ClawSweeper-generated bot/autofix PR, so the external contributor proof gate does not apply; no live Docs proof is attached.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully and its PR-link review guidance was applied without switching branches or editing files. (AGENTS.md:1, 213ddb60d7d1)
  • Linked implementation candidate: The PR body closes the linked spacing-mode feature request and GitHub reports that issue in closingIssuesReferences. (9b7c384f48ba)
  • Current main lacks the CLI flag: Current main exposes paragraph controls such as alignment, line spacing, indentation, and space above/below, but has no SpacingMode or --spacing-mode flag in DocsFormatFlags. (internal/cmd/docs_format.go:31, 213ddb60d7d1)
  • Current main lacks request wiring: Current main's docsformat.Options and paragraph-style builder wire existing paragraph fields but do not set ParagraphStyle.SpacingMode or append a spacingMode field mask. (internal/docsformat/format.go:50, 213ddb60d7d1)
  • PR adds CLI plumbing: The PR head adds the spacing-mode flag, includes it in dry-run output, preserves it through paragraph-only splitting, and maps it into docsformat.Options. (internal/cmd/docs_format.go:47, 9b7c384f48ba)
  • PR adds request builder support: The PR head validates NEVER_COLLAPSE and COLLAPSE_LISTS, sets ParagraphStyle.SpacingMode, and includes spacingMode in the update field mask. (internal/docsformat/format.go:302, 9b7c384f48ba)

Likely related people:

  • Peter Steinberger: Introduced the rich Docs formatting command, carried later formatting request-planner work, authored the paragraph-list formatting expansion, and appears in current blame for the central files. (role: feature owner and recent area contributor; confidence: high; commits: b4d6f559c399, 49a9c6da9c31, 360310f49093; files: internal/cmd/docs_format.go, internal/docsformat/format.go, internal/docsedit/planner.go)
  • chrischall: Added the prior named-style and heading-level paragraph controls in the same docs format command surface with tests and docs. (role: adjacent feature contributor; confidence: medium; commits: dff8bb00c37e; files: internal/cmd/docs_format.go, internal/cmd/docs_format_headings_test.go, docs/docs-editing.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jun 29, 2026
@clawsweeper

clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

🦞🔧
ClawSweeper applied a repair to this PR branch.

Repair: kept the fix on this contributor branch instead of opening a replacement PR.
Validation: git diff --check
Updated head: 9b7c384f48ba
Run: https://github.com/openclaw/clawsweeper/actions/runs/28367311178

Current state: exact-head review queued immediately; GitHub checks and the review verdict gate final merge.

Automerge progress:

  • 2026-06-29 10:56:47 UTC review queued 8d8329eece78 (after repair)
  • 2026-06-29 11:01:42 UTC review requested repair 8d8329eece78 (structured ClawSweeper marker: fix-required (finding=review-feedback sha=8d8329...)
  • 2026-06-29 11:08:48 UTC review queued 9b7c384f48ba (after repair)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:autofix Bounded ClawSweeper-reviewed autofix without merge clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper Tracked by ClawSweeper automation P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(docs): add --spacing-mode flag to docs format for paragraph spacing control

0 participants