feat(pptx): view issues renderer-approximation audit (textWarp/textFill) - #382
Open
ylz92871-dotcom wants to merge 1 commit into
Open
ylz92871-dotcom wants to merge 1 commit into
ylz92871-dotcom wants to merge 1 commit into
Conversation
Two new view-issues subtypes surface text effects stored correctly in OOXML but only approximated by the HTML/SVG preview: textWarp presets (Info — preview marks, cannot warp glyphs) and image/path/3+-stop gradient text fills (Warning — preview reduces them to a single color). The OOXML is correct and PowerPoint renders it; the warning makes the doc-vs-preview gap observable instead of silently screening wrong. Faithfully-rendered cases (no fill, solid, two-stop linear) stay silent; one report per shape. Tests: XLSX numeric-fit regression green; Release build 0 errors; publish single-file smoke; CLI demo in PR body.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Extends
view issuesfor pptx with a renderer-approximation audit: two new issue subtypes surface text effects that are stored correctly in the OOXML but that the HTML/SVG preview can only approximate, so a deck that "validates clean" no longer silently screens wrong:text_warp_renderer_approximated(Info) — atextWarppreset is only marked in the preview; it cannot warp individual glyphs like PowerPoint does.text_fill_renderer_approximated(Warning) — a run's text fill is an image (blip) fill, a path gradient, or a gradient with 3+ stops — the forms the CSS preview path reduces to a single color.Faithfully-rendered cases stay silent: no explicit fill, un-transformed solid, or a simple two-stop un-transformed linear gradient. One report per shape (mirrors the LowContrast policy).
Why
The document and the preview disagree in one direction only: the OOXML is correct (PowerPoint renders the gradient/warp), but the agent's HTML preview shows a solid/straight approximation. That is the silent-acceptance gap — an agent shipping a deck from preview feedback believes the delivered look is verified when it is not. Surfacing the gap in
view issuesmakes it observable and actionable ("run a screenshot to confirm the delivered look") without flagging anything actually wrong in the file.How to verify
Actual terminal output:
A plain solid-fill shape with no warp reports neither (no false positives on the common case).
Implementation
src/officecli/Handlers/Pptx/PowerPointHandler.View.cs— per-shape audit in the existing issues walk:GetTextWarpApproximation(readsbodyPr/prstTxWarp @prst, null for absent/textNoShape) andTextFillApproximationReason(blip fill / path gradient / >2 stops), each emitting aDocumentIssuewith the existing subtype/validation machinery.src/officecli/Core/IssueSubtypes.cs— the two new subtypes +ValidSubtypesregistration, soview issues --type text_fill_renderer_approximatedopt-in filtering works like every other subtype.Tests
dotnet build -c Release— 0 errors.dotnet publish -c Release— single-file exe smoke OK; the demo above was produced with the built binary.