You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve each selected Markdown table once into a reusable render containing expected comparison content and prepared API requests. Reuse it for comparison and upload, binding actual table object IDs only when emitting requests.
Fetch the current presentation at the start of each Apply and take a deep snapshot of text, shape, and table styles. Intermediate presentation refreshes do not replace this snapshot; the next Apply reloads styles, including in watch mode. Removed template styles are cleared, and errors release the frozen state.
Preserve original Markdown flags so automatic header bold cannot trigger the named bold inline style.
Preserve unchanged tables during other slide edits and leave unselected API-derived slides untouched during partial applies.
Keep the intentionally limited comparison scope: structure, text, horizontal alignment, bold, italic, link, and inferred code. Do not compare authoring style names, colors, font sizes, backgrounds, borders, placement, or sizing; changes limited to those properties may intentionally produce no update.
Merge equivalent adjacent fragments and normalize only the single API-added cell terminator. Preserve leading, internal, trailing, and newline-only user text, including soft line breaks. Treat user whitespace as content when clearing or refilling tables.
Preserve existing table request ordering and batching.
Regression coverage
Unchanged styled tables require one initial presentation GET per Apply and zero writes, including partial page applies with an unselected styled slide.
Additional cases cover custom styles that unset bold, explicit bold addition/removal, named styles, template alignment, merged text runs, actual content changes, insertion/deletion/reordering, and retaining original Markdown styles in generated actions.
Render-reuse tests cover immutable prepared output, independent object-ID binding, UTF-16 ranges, request counts, and upload reuse. Mocked Apply lifecycle tests verify nested style values remain fixed across intermediate refreshes and source-layout mutations, reload on the next Apply, clear removed styles, and release the snapshot on errors.
Text tests cover leading and trailing newlines, multiple trailing newlines, separately styled API terminators, paragraph boundaries, soft line breaks, newline-only cells, and whitespace content. Removing a user newline must still trigger an update.
Validation
go test -race ./... -count=1
golangci-lint run ./...
git diff --check
No live Google Slides presentation was modified during verification.
Account for table and inline styles without changing the Markdown used for rendering. Avoid unnecessary slide updates and table rewrites, including partial page applies.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 73f03903-f3f5-4f68-ba46-b9f550a79c8c
Resolve table styles once into a reusable render containing expected content and prepared API requests. Reuse it during action selection, structural updates, and content upload; bind table IDs without resolving styles again.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 73f03903-f3f5-4f68-ba46-b9f550a79c8c
Include all emitted style properties in table comparisons
table.go:456
The comparison render only stores a Table, which represents horizontal alignment and the limited Fragment flags. Styles that are emitted solely as requests—cell background, vertical alignment, borders, and text properties such as font size, arbitrary font/color, underline, or strikethrough—are absent from both this expected value and convertSlidesToTable. Consequently, changing any of those supported template styles leaves the tables equal and suppresses the update, so the new style is never applied. Include all emitted style properties in the comparison representation (and extract the corresponding current properties) before using it to skip updates.
Preserve trailing and newline-only fragments during comparison
table.go:545
Rendering the expected fragment through convertTextRunToFragment applies API-response normalization to Markdown input. In particular, it trims a trailing newline and drops a newline-only fragment, so a table cell containing <br> or a hard line break is rendered for comparison without that break, while the uploaded request still includes it. The refreshed Slides table therefore never equals this render and is rewritten on every apply. Preserve the original fragment value while deriving only its effective style (or split style extraction from API text normalization).
Reload the presentation at the start of each apply, deep-copy text, shape, and table styles, and keep them fixed through intermediate refreshes. Reload edits and remove stale styles on the next apply, including watch mode.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 73f03903-f3f5-4f68-ba46-b9f550a79c8c
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
The implementation is coherent, preserves request behavior, and includes comprehensive regression coverage for the affected lifecycle and comparison paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
boldinline style.Regression coverage
Unchanged styled tables require one initial presentation GET per Apply and zero writes, including partial page applies with an unselected styled slide.
Additional cases cover custom styles that unset bold, explicit bold addition/removal, named styles, template alignment, merged text runs, actual content changes, insertion/deletion/reordering, and retaining original Markdown styles in generated actions.
Render-reuse tests cover immutable prepared output, independent object-ID binding, UTF-16 ranges, request counts, and upload reuse. Mocked Apply lifecycle tests verify nested style values remain fixed across intermediate refreshes and source-layout mutations, reload on the next Apply, clear removed styles, and release the snapshot on errors.
Text tests cover leading and trailing newlines, multiple trailing newlines, separately styled API terminators, paragraph boundaries, soft line breaks, newline-only cells, and whitespace content. Removing a user newline must still trigger an update.
Validation
go test -race ./... -count=1golangci-lint run ./...git diff --checkNo live Google Slides presentation was modified during verification.