Skip to content

feat(slides): add object-scoped text editing primitives#835

Merged
steipete merged 1 commit into
mainfrom
clawsweeper/issue-openclaw-gogcli-823
Jun 18, 2026
Merged

feat(slides): add object-scoped text editing primitives#835
steipete merged 1 commit into
mainfrom
clawsweeper/issue-openclaw-gogcli-823

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add slides style-text for exact UTF-16 ranges with bold/italic/underline set or clear, font, size, and color
  • add slides link for applying or clearing links and slides bullets for enabling or removing paragraph bullets
  • add shape-object-scoped replacement using slides locate's exact API-index mapping and revision control
  • require every replace-text invocation to select --object, repeatable --page, or deliberate deck-wide --all
  • rewrite the generated four-commit stack into one reviewed commit and add user/migration docs

Closes #823.

Breaking change

Unscoped slides replace-text <deck> <find> <replacement> is rejected before auth/API access. Existing scripts that intentionally replace across the entire deck must add --all.

Verification

  • focused request, validation, dry-run, discontinuous-run, grouped-shape, nonzero-index, and UTF-16 regression tests
  • make ci
  • local diff and full branch autoreview: no actionable findings
  • live Google Slides proof on a disposable deck: unscoped refusal; style set/unset; link set/clear; bullets on/off; emoji-safe object replacement; page-scoped replacement; explicit --all
  • disposable live deck moved to trash and verified trashed

Docs

  • add docs/slides-text-editing.md
  • update README examples and generated command reference

Thanks @sebsnyk for the 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 18, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jun 18, 2026
@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Codex review: passed. Reviewed June 18, 2026, 2:38 AM ET / 06:38 UTC.

Summary
The PR adds gog slides style-text, link, and bullets, plus replace-text --object, generated command docs, dry-run coverage, and focused Slides tests.

Reproducibility: yes. Source inspection of current main reproduces the linked command-surface gap, and exact-head inspection shows the PR now adds the missing commands and object-scoped replacement path.

Review metrics: 2 noteworthy metrics.

  • Slides mutation surface: 3 commands added, 1 command extended. The PR adds several deck-writing command paths, so live API semantics matter beyond generated docs and unit fixtures.
  • Diff scope: 13 files changed, +1154/-2. Most size is generated docs and tests, but the implementation still adds two focused command code paths that maintainers should review before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #823
Summary: This PR is the implementation candidate for the open Slides text-editing issue; the separate native slide-structure PR is adjacent but not the same root cause.

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:

  • Wait for the in-progress test and windows CI jobs to complete on the exact head.
  • Run a live Google Slides smoke covering style, link, bullets, grouped object replacement, and revision-pinned object replacement before manual merge.

Risk before merge

  • [P1] The PR adds multiple authenticated Slides content-mutation paths, and unit tests cannot fully prove live Google Slides API behavior for style, link, bullets, and object-scoped replacement.
  • [P1] At review time GitHub still showed test and windows CI jobs in progress for the exact head, so final manual merge should wait for completed checks.

Maintainer options:

  1. Manual live deck smoke before merge (recommended)
    Use a small authenticated Slides deck to verify style, link, bullet on/off, grouped object replacement, and revision-conflict behavior before landing this generated mutation surface.
  2. Accept unit-test-only coverage
    Maintainers can choose to merge after green CI without live proof, but they would be accepting the risk that Google Slides API behavior differs from the httptest fixtures.
  3. Pause for a narrower branch
    If live verification is not available, pause this PR and land only the safest subset or a human-authored follow-up later.

Next step before merge

  • [P2] No current actionable code repair remains, but this generated feature PR needs maintainer-controlled merge timing, completed CI, and live Slides validation.

Security
Cleared: The diff adds Slides API command code, generated docs, and tests without new dependencies, workflows, secrets handling, or supply-chain surface.

Review details

Best possible solution:

Land this branch manually only after CI is green and a maintainer live-smokes style, link, bullets, and object-scoped replacement on a small Google Slides deck.

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

Yes. Source inspection of current main reproduces the linked command-surface gap, and exact-head inspection shows the PR now adds the missing commands and object-scoped replacement path.

Is this the best way to solve the issue?

Yes, with manual merge gating. The repaired implementation is a narrow additive v1 that preserves the existing unscoped default while adding focused object/range-scoped primitives.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • 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: This is a ClawSweeper bot-generated autofix PR, so the external-contributor real-behavior proof gate does not apply; manual live validation is still the merge-safety path.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded Slides command feature and linked issue fix with limited blast radius, not an urgent production regression.
  • merge-risk: 🚨 other: Merging adds new Google Slides content mutation primitives whose live API behavior is not fully settled by local unit tests.
  • 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 bot-generated autofix PR, so the external-contributor real-behavior proof gate does not apply; manual live validation is still the merge-safety path.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully and its PR-review guidance was applied by using gh pr view/gh pr diff, avoiding branch switches, and keeping the checkout read-only. (AGENTS.md:1, fa3fa1638b5a)
  • Current main command gap: Current main registers insert-text and replace-text but has no style-text, link, bullets, or object-scoped replacement flag, matching the linked issue's remaining command-surface gap. (internal/cmd/slides.go:17, fa3fa1638b5a)
  • Exact-head command registration: The PR head registers the three new Slides text-editing commands without changing the existing unscoped replace-text default. (internal/cmd/slides.go:33, 54614f004538)
  • Object-scoped index mapping: Exact head now matches against text content while mapping matched UTF-16 offsets back through preserved Slides TextElement start indexes before emitting DeleteText/InsertText requests. (internal/cmd/slides_replace_text.go:189, 54614f004538)
  • Grouped-shape traversal: The object lookup recurses through ElementGroup.Children, so nested group children are no longer reported as missing when their shape object ID is targeted. (internal/cmd/slides_replace_text.go:270, 54614f004538)
  • Revision-pinned object writes: Object-scoped replacement now copies the presentation read revision into BatchUpdatePresentationRequest.WriteControl.RequiredRevisionId when available. (internal/cmd/slides_replace_text.go:146, 54614f004538)

Likely related people:

  • steipete: Blame and recent history tie the current Slides command registry and replace-text tests to recent release and Slides maintenance work. (role: recent area contributor; confidence: high; commits: 6bc67d7dd770, 32a6dddf8d86; files: internal/cmd/slides.go, internal/cmd/slides_replace_text.go, internal/cmd/slides_replace_text_test.go)
  • Chris Sanchez: git log -S shows the original Slides insert-text and replace-text command implementation came from the Slides text command commit. (role: introduced behavior; confidence: high; commits: d047a0325f12; files: internal/cmd/slides.go, internal/cmd/slides_insert_text.go, internal/cmd/slides_replace_text.go)
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.

@steipete

Copy link
Copy Markdown
Collaborator

@clawsweeper autofix

@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

🦞🧹
ClawSweeper autofix is enabled.

  • Head: 13c73f98394f
  • Label: clawsweeper:autofix
  • Action: exact-head review queued (workflow sweep.yml, event repository_dispatch).
  • Flow: review this head, repair/rebase only if needed, then re-review the exact repaired head until no actionable findings remain.

This is fix-only; I will not merge this PR.

Re-review progress:

@clawsweeper clawsweeper Bot force-pushed the clawsweeper/issue-openclaw-gogcli-823 branch from 13c73f9 to ddca19d Compare June 18, 2026 05:56
@clawsweeper

clawsweeper Bot commented Jun 18, 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: ddca19df7ab3
Run: https://github.com/openclaw/clawsweeper/actions/runs/27739592537

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

Automerge progress:

  • 2026-06-18 05:56:51 UTC review queued ddca19df7ab3 (after repair)

@steipete

Copy link
Copy Markdown
Collaborator

@clawsweeper autofix

Accepted review finding: object-scoped replace-text only scans top-level slide PageElements. A text shape nested under PageElement.Group.Children has a valid object ID but is reported as not found. Traverse group children recursively when resolving the target shape, add grouped-shape regression coverage, and preserve the existing text-index repair.

@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@clawsweeper

clawsweeper Bot commented Jun 18, 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: 0a43abbc6b0d
Run: https://github.com/openclaw/clawsweeper/actions/runs/27740311598

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

Automerge progress:

  • 2026-06-18 06:14:03 UTC review queued 0a43abbc6b0d (after repair)

@steipete

Copy link
Copy Markdown
Collaborator

@clawsweeper autofix

Accepted review finding: object-scoped replace-text computes absolute Slides text indexes from Presentations.Get, but BatchUpdate does not bind the write to that presentation revision. A concurrent edit can shift those indexes and make the batch alter the wrong text. Set BatchUpdatePresentationRequest.WriteControl.RequiredRevisionId from pres.RevisionId when available, capture/assert the request write control in regression coverage, and preserve the existing text-index and grouped-shape fixes.

@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@clawsweeper

clawsweeper Bot commented Jun 18, 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: 54614f004538
Run: https://github.com/openclaw/clawsweeper/actions/runs/27740989649

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

Automerge progress:

  • 2026-06-18 06:31:30 UTC review queued 54614f004538 (after repair)

@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. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 18, 2026
@clawsweeper

clawsweeper Bot commented Jun 18, 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: c24ed95e6118
Run: https://github.com/openclaw/clawsweeper/actions/runs/27742248414

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

Automerge progress:

  • 2026-06-18 07:02:38 UTC review queued c24ed95e6118 (after repair)

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
@steipete steipete force-pushed the clawsweeper/issue-openclaw-gogcli-823 branch from c24ed95 to b28530b Compare June 18, 2026 07:08
@steipete

Copy link
Copy Markdown
Collaborator

@clawsweeper autofix

Accepted review findings in the conflict rewrite:

  • Preserve the existing unscoped replace-text default. The source job explicitly requires adding object scope without changing that default; requiring --object/--page/--all is an unrelated breaking CLI change.
  • Remove the PR's CHANGELOG.md edit. gogcli release notes are release-owned, and this generated PR must keep release-note context in its body/commits instead.
  • Keep the rebase narrow: retain the previously reviewed text-editing implementation and its index, grouped-shape, and revision-control fixes; resolve only the current Slides registry/generated-doc conflicts from PR 836. Avoid unrelated README or standalone guide expansion unless strictly required by the command-doc generator.

Add regression coverage that the unscoped command still emits the existing deck-wide ReplaceAllText request.

@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@clawsweeper

clawsweeper Bot commented Jun 18, 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: d8c9c9c139e7
Run: https://github.com/openclaw/clawsweeper/actions/runs/27743485327

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

Automerge progress:

  • 2026-06-18 07:29:08 UTC review queued d8c9c9c139e7 (after repair)

@steipete

Copy link
Copy Markdown
Collaborator

@clawsweeper stop

Maintainer has completed the rewrite, live provider validation, local CI, and autoreview. Stop active repair/re-review automation so the reviewed exact head can be restored and landed.

@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

🦞✅
Got it. ClawSweeper will leave this item for human review.

I added clawsweeper:human-review, removed clawsweeper:autofix, and paused the automation trail until a maintainer asks again.

@clawsweeper clawsweeper Bot added clawsweeper:human-review ClawSweeper automerge is paused for maintainer review and removed clawsweeper:autofix Bounded ClawSweeper-reviewed autofix without merge labels Jun 18, 2026
@steipete steipete force-pushed the clawsweeper/issue-openclaw-gogcli-823 branch from d8c9c9c to b28530b Compare June 18, 2026 07:36
@steipete steipete merged commit 21ca030 into main Jun 18, 2026
17 of 18 checks passed
@steipete

Copy link
Copy Markdown
Collaborator

Landed as 21ca030d.

Maintainer validation:

  • focused request, scope, grouped-shape, discontinuous-index, UTF-16/emoji, link-clear, and dry-run tests passed
  • make ci passed
  • local and exact-branch autoreviews found no actionable defects
  • live disposable-deck proof verified: unscoped replacement refusal; style set/unset; link set/clear; bullets on/off; emoji-aware object replacement; page-scoped replacement; explicit --all replacement
  • disposable deck cleanup verified
  • all exact-head push and pull-request checks passed, including Windows

Thanks @sebsnyk for the issue and command-shape guidance.

@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

ClawSweeper 🐠 automerge status

ClawSweeper took another look; no safe branch change was available on this pass.

Executor outcome: no planned fix actions.
Worker summary: this PR is already merged and closed as commit 21ca030 on current origin/main. The canonical issue #823 is also already closed by that landed fix. No merge, close, or repair action is allowed or needed; #833 is an adjacent Slides structure PR for a different root cause and should remain outside this cluster.

Worker actions:

  • keep_closed on this PR: skipped - Canonical PR already landed on current main; no repair or merge action remains.
  • keep_closed on #823: skipped - Issue is already closed after the canonical fix landed.
  • keep_related on #833: planned - Adjacent Slides command work, but not a duplicate or merge target for the this PR automerge cluster.

Nothing moved downstream from this pass: no branch update, replacement PR, merge, or re-review.

fish notes: reasoning high; reviewed against b28530b.

Automerge progress:

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

Labels

clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:human-review ClawSweeper automerge is paused for maintainer review clawsweeper Tracked by ClawSweeper automation merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. 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.

slides: no text-formatting commands; replace-text can't scope to one element and spans the whole deck by default

1 participant