Skip to content

Round 3: outline groups once, empty placeholders, table styles and flags - #10

Merged
uvrt merged 4 commits into
mainfrom
r3-groups-placeholders-tablestyles
Oct 11, 2026
Merged

uvrt merged 4 commits into
mainfrom
r3-groups-placeholders-tablestyles

Conversation

@uvrt

@uvrt uvrt commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Production feedback round 3, items D3, A3 and A4.

D3, the outline lists every grouped shape twice. slide.shapes lists a group and then its members; the outline walked the groups as well. It now walks the slide's own shapes and their groups once and marks each group around its blocks, <!-- 256.5 group "Agenda item 1" --> ... <!-- /256.5 --> (docx-agent's closing form), nested as the groups are. ppt_read_slides outline, outline_blocks, find_text and replace_text follow. The other readers of slide.shapes (fit, collisions, layout and design facts, comments) already deduplicated; a new test holds them to the same facts grouped or not. Repro d3_group_outline.py: BUG PRESENT -> fixed.

A3, empty placeholders. slide.empty_placeholders() and slide.delete_empty_placeholders(titles=False) (one undo step). Empty: a p:sp placeholder with no text body, no paragraphs, or only whitespace/empty paragraphs, and no field. A placeholder that took a picture, table, chart or SmartArt (a p:pic/p:graphicFrame) is not empty. Date, footer, slide number and header are left out, and so is a hidden shape. Titles and subtitles count (they show "Click to add title/subtitle"), but deleting keeps an empty title unless asked: a title names the slide in navigation and to a screen reader. The tools report empty_placeholders: [{shape, type, idx}] in every changing call's checks and in check (with fit, the default), and save_document lists the ones left under unresolved. ppt_manage_slides gains delete_empty_placeholders.

A4, table styles and Table Design flags. deck.table_styles -> [{id, name, builtin}] lists the deck's own styles (tableStyles.xml) and then PowerPoint's 74 built-in styles (GUIDs and names from pptx2svg's catalogue, measured in PowerPoint). The default is marked. table.style can be read, and set by name or id. table.flags and table.set_flags(...) cover the six flags. add_table(style=) also takes a name and refuses an id that neither the deck nor PowerPoint knows. Tools: ppt_add_table style, ppt_edit_table set_style/set_flags, style and flags in table results, and describe theme.table_styles.

Budget: core unchanged (3,398 estimated, about 5,029 counted, budget 5,500). All definitions 10,269 -> 10,464 (guard 10,500, stays). Strict tool set unchanged.

Golden p14: a chart slide on "Title and Content" with its empty body deleted, and a table in the template's own style ("Harbor Lane Table", added to the business review's tableStyles.xml by the input builder) with banding off. 10 calls, 18/18 checks.

PowerPoint verification (PowerPoint 16, Dutch UI; PDF exports and Normal-view screenshots):

  • An empty body placeholder (no text, or one empty paragraph) shows "Klikken om tekst toe te voegen" ("Click to add text") with the content icons in edit view. The PDF draws no prompt.
  • A whitespace-only body shows no prompt but draws a bullet, both in edit view and in the PDF. It stays reported: it is a stray bullet.
  • Several empty paragraphs show nothing at all.
  • An empty placeholder's own fill is drawn in the PDF. So delete_empty_placeholders now keeps a placeholder that draws a fill or outline (its own or its layout's) and reports it as kept_drawn (commit 8f3e17c).
  • Built-in table styles: when PowerPoint saves a deck using Light Style 2 - Accent 3, Medium Style 2 - Accent 2 and Dark Style 1 - Accent 1, tableStyles.xml keeps only def and the deck's own style. Built-ins are referenced by GUID only, as implemented. PowerPoint writes the flag attributes in the same order as set_flags.
  • The p14 output exports with no prompt or repair dialog. It shows the branded header and no banding. Its table-slide title wrapped to two lines in PowerPoint, so the title is shorter now and check_p14 checks one line as drawn.
  • The renderer gaps this found are fixed separately in Empty placeholder boxes, Light Style 2 lines, a deck style's unstated edges (measured) pptx2svg#24.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WCxhY1fvWQPiWCwz7SYUVh

uvrt and others added 4 commits October 11, 2026 01:00
slide.shapes lists a group and then its members; the outline walked the groups as well, so
every grouped shape came twice (to_outline, ppt_read_slides outline, outline_blocks,
find_text, replace_text). The outline now walks the slide's own shapes and their groups
once, and marks a group's blocks between <!-- 256.5 group "Name" --> and <!-- /256.5 -->,
docx-agent's closing form; insert_outline reads the marks as nothing. A test holds the
other readers of slide.shapes (collisions, design facts, find_text) to the same facts
grouped or not. Production feedback round 3, D3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCxhY1fvWQPiWCwz7SYUVh
slide.empty_placeholders() names the placeholders PowerPoint shows as "Click to add
text" while editing and draws nothing for in a show or an export: a p:sp placeholder with
no text, only whitespace or only empty paragraphs, and no field. One that took a picture,
table, chart or SmartArt holds it; date, footer, slide number and header are PowerPoint's
to fill and are left out; titles and subtitles count. delete_empty_placeholders() deletes
them in one undo step and keeps an empty title unless titles=True.

The tools report empty_placeholders (shape, type, idx) in every changing call's checks and
in check (with fit, the default); save_document lists those left under unresolved;
ppt_manage_slides gains delete_empty_placeholders. Also Document.table_styles (the next
commit's), and find_shapes' docstring says what it returns. Production feedback round 3,
A3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCxhY1fvWQPiWCwz7SYUVh
deck.table_styles lists the deck's own styles (tableStyles.xml) and PowerPoint's 74
built-in ones by GUID and name (pptx2svg's measured catalogue), the default marked.
table.style reads one and sets it by name or id; table.flags and table.set_flags turn the
Header Row, Total Row, First and Last Column and Banded Rows and Columns on and off, as
PowerPoint writes them. add_table(style=) takes a name too and refuses an unknown id.

Tools: ppt_add_table's style, ppt_edit_table's set_style and set_flags, a table's style and
flags in its results, describe's theme.table_styles. Every definition 10,269 -> 10,464
estimated tokens (guard 10,500), the core unchanged at 3,398 (about 5,029 counted).

Golden p14: a chart slide on a content layout with its empty body deleted, and a table in
the template's own style without banding. SUPPORTED, GUIDANCE, USAGE and the changelog.
Production feedback round 3, A4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCxhY1fvWQPiWCwz7SYUVh
Measured in PowerPoint 16 (probe deck exported and viewed in Normal view): an empty
placeholder (no text, or one empty paragraph) shows its prompt while editing and none in
the export; a whitespace-only one shows no prompt but a bullet, exported too; several empty
paragraphs show nothing; and a placeholder's own fill is drawn in the export whether it
holds text or not. So delete_empty_placeholders now keeps a placeholder that draws a fill
or an outline (its own, or its layout placeholder's) and the tool says which it kept; the
docstrings, the checks' note, GUIDANCE, USAGE and the changelog say what PowerPoint shows.

p14's table-slide title wrapped to two lines in PowerPoint's export; it is shorter now, and
its check asks for one line as drawn (text_fit), as p9's does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WCxhY1fvWQPiWCwz7SYUVh
@uvrt
uvrt merged commit 4eecde9 into main Oct 11, 2026
19 checks passed
@uvrt
uvrt deleted the r3-groups-placeholders-tablestyles branch October 11, 2026 06:24
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