Skip to content

feat(slides): add paragraph styling for shapes and cells - #1123

Merged
steipete merged 1 commit into
mainfrom
feat/slides-paragraph-style-b2
Sep 11, 2026
Merged

feat(slides): add paragraph styling for shapes and cells#1123
steipete merged 1 commit into
mainfrom
feat/slides-paragraph-style-b2

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

Add slides paragraph-style for alignment, line spacing, paragraph spacing, indentation and direction on shapes or individual table cells. Optional UTF-16 ranges affect intersecting paragraphs; omitted ranges select all text. Only supplied fields are changed, including explicit zero dimensions.

Reuse the existing mutation helpers for complete auth-free dry-run plans and normal command guards. Cell targets are validated against the current table and protected by the presentation revision. The supplied baked profiles leave the new mutation disabled.

The built CLI passed live Google checks for range-scoped alignment while preserving the second paragraph, spacing reset to zero, hanging indentation, table-cell alignment/line spacing/direction and invalid-row refusal. The disposable presentation was trashed and verified. Tests cover field masks, wire-level zeros, ranges, validation, cell targeting/revision checks and complete dry-run values. Codex autoreview is clean through P2.

Closes #1098. Thanks @sebsnyk. The changelog entry is reserved for the final notes PR; exact-head CI proof will be posted before handoff.

@steipete
steipete requested a review from a team as a code owner September 11, 2026 22:47
@clawsweeper

clawsweeper Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. 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. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 11, 2026, 6:50 PM ET / 22:50 UTC.

ClawSweeper review

What this changes

Adds a Slides command for paragraph alignment, spacing, indentation, and direction in shapes or individual table cells, with documentation, tests, and safety-profile exclusions.

Merge readiness

Needs changes before merge - 1 item remains

Keep open: this is a useful, focused addition that current main does not provide as a dedicated command. No blocking correctness or security defect was found.

Priority: P2
Reviewed head: 53b37d547a6224720b80a28927d395a7d382a634

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with relevant regression coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; its body reports live Google execution of the new shape and cell paths, including range isolation and invalid-row refusal.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; its body reports live Google execution of the new shape and cell paths, including range isolation and invalid-row refusal.
Evidence reviewed 7 items Introduced implementation and coverage: The pinned base-to-head diff adds field-specific paragraph requests, explicit zero serialization, optional UTF-16 ranges, paired cell coordinates, and five focused tests. Production Go grows by 125 lines and tests by 151 lines. Tests were inspected, not executed during this read-only review.
Current capability and release boundary: Main's Slides registration lacks paragraph-style. Existing character styling and vertical table-cell alignment do not expose these paragraph fields; the Markdown renderer only applies preset alignment while creating slides. The new implementation file is also absent from v0.39.1.
Existing lower-level alternative: The Discovery API command already accepts arbitrary request bodies with existing authentication and explicit write opt-in. This qualifies the linked issue's second-client claim, but does not supply the validated first-class paragraph interface proposed here.
Findings None None.
Security None None.

How this fits together

The Slides CLI converts presentation IDs, element targets, and formatting flags into authenticated Google Slides requests. Existing mutation helpers handle dry runs, output, and table revision checks.

flowchart TD
 A[Presentation and element IDs] --> B[Validate formatting and range]
 B --> C{Table cell selected?}
 C -->|Yes| D[Validate cell and capture revision]
 C -->|No| E[Existing mutation helper]
 D --> E
 E --> F[Dry-run plan or Google Slides update]
Loading

Before merge

  • Complete next step (P2) - Include the reserved paragraph-style entry in the final notes PR as this feature lands, under Unreleased with the issue/PR links and contributor thanks.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth production +125, tests +151 The production growth implements a bounded command while reusing existing mutation helpers.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #1098
Summary: This PR is the explicit implementation candidate for the open paragraph-formatting request.

Members:

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

Technical review

Best possible solution:

Provide one focused paragraph-formatting command that preserves unspecified fields and shares existing authentication, dry-run, and mutation safeguards.

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

Not applicable as a feature addition; source confirms the missing dedicated command, and the author reports live Google validation of the new behavior.

Is this the best way to solve the issue?

Yes: a thin, validated wrapper fits the existing Slides command design and avoids requiring users to construct raw Discovery API requests.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 73d0b9eba394.

Labels

Label changes:

  • add P2: This is a bounded improvement to formatting existing Slides presentations, with a lower-level API workaround already available.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; its body reports live Google execution of the new shape and cell paths, including range isolation and invalid-row refusal.

Label justifications:

  • P2: This is a bounded improvement to formatting existing Slides presentations, with a lower-level API workaround already available.
  • 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: The external-contributor proof gate does not apply to this collaborator-authored PR; its body reports live Google execution of the new shape and cell paths, including range isolation and invalid-row refusal.

Evidence

What I checked:

  • Introduced implementation and coverage: The pinned base-to-head diff adds field-specific paragraph requests, explicit zero serialization, optional UTF-16 ranges, paired cell coordinates, and five focused tests. Production Go grows by 125 lines and tests by 151 lines. Tests were inspected, not executed during this read-only review. (internal/cmd/slides_paragraph_style.go:28, 53b37d547a62)
  • Current capability and release boundary: Main's Slides registration lacks paragraph-style. Existing character styling and vertical table-cell alignment do not expose these paragraph fields; the Markdown renderer only applies preset alignment while creating slides. The new implementation file is also absent from v0.39.1. (internal/cmd/slides.go:41, 73d0b9eba394)
  • Existing lower-level alternative: The Discovery API command already accepts arbitrary request bodies with existing authentication and explicit write opt-in. This qualifies the linked issue's second-client claim, but does not supply the validated first-class paragraph interface proposed here. (internal/cmd/api.go:40, 53b37d547a62)
  • Mutation safety: The new command uses existing authenticated mutation helpers; table edits validate coordinates before batch update and use the fetched revision. Runtime read-only transport rejects Slides batch-update POSTs, and both baked profiles explicitly disable the new command. No credential, dependency, permission, or persisted-authority changes are introduced. (internal/googleapi/read_only.go:49, 53b37d547a62)
  • Discussion and reported live validation: The captured PR body connects this implementation to feat(slides): no paragraph-style command — alignment, spacing and indentation unreachable (updateParagraphStyle) #1098 and reports live Google checks for range isolation, zero spacing, hanging indentation, table-cell formatting, and invalid-row refusal. A REST read returned the same body and pinned head. These are author-reported results, not reviewer-executed observations. (53b37d547a62)
  • Area history: Main history connects Peter Steinberger to native element operations, structural tables, table styling, and the recent mutation-helper refactor. The table-style source at commit 971c637 contains the current vertical-alignment declaration; its raw recorded parent lacks that file. (internal/cmd/slides_table_style.go:42, 971c63788d39)

Likely related people:

  • Peter Steinberger: Raw commit 971c637 adds internal/cmd/slides_table_style.go:42 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 971c63788d39; files: internal/cmd/slides_table_style.go)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete

Copy link
Copy Markdown
Collaborator Author

Maintainer proof at 53b37d5:

  • The built CLI set shape paragraph alignment and spacing, changed only the first intersecting paragraph, reset spacing to explicit zero, and applied a hanging indent. Raw Google readback verified each result and preserved the second paragraph's alignment.
  • A real table-cell update verified alignment, line spacing and direction; invalid-row input was refused. The disposable presentation was trashed and verified.
  • Tests verify selective field masks, serialized zero dimensions, UTF-16 ranges, table revision protection, invalid inputs, and complete auth-free dry-run plans containing the actual values and ranges.
  • Full local make ci, final local/branch Codex autoreview through P2, and x/tools v0.50 formatting plus Darwin/Linux deadcode checks passed.
  • Exact-head CI passed: https://github.com/openclaw/gogcli/actions/runs/34655542638

Ready for orchestrator-approved squash; closes #1098 on merge. Release notes are in the final batch notes PR.

@steipete
steipete merged commit 208cc26 into main Sep 11, 2026
18 checks passed
@steipete
steipete deleted the feat/slides-paragraph-style-b2 branch September 11, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. 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(slides): no paragraph-style command — alignment, spacing and indentation unreachable (updateParagraphStyle)

1 participant