Skip to content

feat(google-slides): complete API surface for branded slide generation#4678

Merged
waleedlatif1 merged 3 commits into
stagingfrom
waleedlatif1/google-slides-full-api
May 20, 2026
Merged

feat(google-slides): complete API surface for branded slide generation#4678
waleedlatif1 merged 3 commits into
stagingfrom
waleedlatif1/google-slides-full-api

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Adds 38 new Google Slides tools covering the full Slides REST API: text/paragraph styling, image replacement, shape/page/slide/element properties, transforms, z-order, grouping, lines, the full table API, Sheets chart embedding, video, raw batchUpdate, Drive copy, and multi-format export.
  • Wires all 38 ops into the existing Google Slides block (52 operations total now exposed in V2), with conditional subBlocks, canonical param IDs, hex-color inputs, FieldMask escape hatches, and per-op param remapping.
  • Adds shared tools/google_slides/utils.ts with helpers for color conversion, text-range/cell-location building, EMU dimensions, FieldMask construction, and standard URL/header builders.
  • Zero changes to the 14 pre-existing slides tools — purely additive.

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

Tested manually. Validated wire shapes for every new tool against the official Slides v1 Discovery doc and Drive v3 reference via multiple parallel validation passes. bun run type-check, bun run check:api-validation, and bun run lint all pass clean.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped May 20, 2026 8:34pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 20, 2026

PR Summary

Medium Risk
Large additive expansion of Google Slides capabilities (many new operations and params) that touches tool wiring and request/param mapping; risk is primarily integration/parameter mismatches with the external Google APIs rather than regressions in existing flows.

Overview
Greatly expands the Google Slides (Legacy) block to support end-to-end branded deck generation, adding operations for Drive copy/export, raw Slides batchUpdate, and a broad set of editing actions (text/paragraph styling, image replacement/properties, shape/page/slide/element updates, transforms, z-order, grouping, lines/connectors, table row/column and merge ops, Sheets chart embed/refresh, and video embed/property updates).

Adds corresponding tool implementations (e.g. copy_presentation, export_presentation, batch_update, and multiple new Slides batchUpdate wrappers) and wires them into the block via new conditional sub-block inputs, expanded tool access list, operation-to-tool routing, and extensive param remapping/number parsing and new output fields for these operations.

Reviewed by Cursor Bugbot for commit 2b11ce2. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 20, 2026

Greptile Summary

This PR adds 38 new Google Slides tools covering the full Slides REST API surface (text/paragraph styling, image replacement, shape/page/slide properties, transforms, z-order, grouping, lines, the complete table API, Sheets chart embedding, video, raw batchUpdate, Drive copy, and multi-format export), wiring all 38 operations into the existing block alongside a new shared utils.ts helper module. The 14 pre-existing tools are untouched.

  • 38 new tool files each implement a single batchUpdate or Drive API operation; param remapping, field-mask computation, and color conversion are consistent across the set.
  • Block wiring (google_slides.ts) correctly separates each operation's subBlock fields, uses canonical param IDs with toNum() coercion, and handles naming conflicts (e.g. the z-order operation field overwrite) via explicit guards.
  • utils.ts provides hexToOpaqueColor, buildTextRange, buildCellLocation, buildElementProperties, and URL/header builders — all exercised by the new tools.

Confidence Score: 4/5

The 38 new tool files and their block wiring are correct; the single flaw is the wand assistant on the raw batch_update field.

Across ~8900 lines of new code the param remapping, color conversion, EMU math, and field-mask logic are all correct. The one defect is the requestsJson wand config using generationType json-object, which adds a system instruction telling the AI to produce object output — exactly what the batchUpdateTool rejects. Any user who invokes the wand to fill in the batch request array will receive an unusable value and a runtime error.

apps/sim/blocks/blocks/google_slides.ts — specifically the requestsJson subBlock wandConfig around the batch_update operation.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/google_slides.ts Adds 38 new operations to the block (52 total); param remapping is thorough and correct, but the requestsJson wand uses generationType: 'json-object' for a field that must receive a JSON array, causing every wand-assisted batch_update to fail validation.
apps/sim/tools/google_slides/utils.ts New shared utility module with hex-to-color conversion, text range/cell location builders, EMU dimension helpers, and URL/header builders — all well-formed and used consistently across the 38 new tool files.
apps/sim/tools/google_slides/batch_update.ts Raw batchUpdate tool with JSON parsing, array validation, and optional writeControl — correct and safe.
apps/sim/tools/google_slides/export_presentation.ts Drive export tool returning base64-encoded content via Buffer.from(buffer).toString('base64'); previously fixed O(n²) loop is gone.
apps/sim/tools/google_slides/copy_presentation.ts Drive Files.copy wrapper for presentation template duplication; URL, headers, and body construction are all correct.
apps/sim/tools/google_slides/update_text_style.ts Text styling tool with field-mask computation, color conversion, and styleJson escape hatch — logic is sound.
apps/sim/tools/google_slides/update_page_elements_z_order.ts Z-order tool receiving comma-separated objectIds; block mapping correctly overwrites the operation field to prevent the block operation string from leaking through.
apps/sim/tools/google_slides/index.ts Barrel exports all 38 new tools with consistent naming convention.
apps/sim/tools/registry.ts Registers all 38 new tools with canonical snake_case IDs matching the tool definitions.

Reviews (2): Last reviewed commit: "fix(google-slides): declare z-order oper..." | Re-trigger Greptile

Comment thread apps/sim/blocks/blocks/google_slides.ts
Comment thread apps/sim/tools/google_slides/export_presentation.ts Outdated
Comment thread apps/sim/tools/google_slides/utils.ts Outdated
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2b11ce2. Configure here.

@waleedlatif1 waleedlatif1 merged commit b6679a9 into staging May 20, 2026
14 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/google-slides-full-api branch May 20, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant