Skip to content

fix(pptx): preserve OLE previews and select supported markup branches - #207

Open
crown-sports wants to merge 2 commits into
firecrawl:mainfrom
crown-sports:fix/pptx-ole-previews
Open

crown-sports wants to merge 2 commits into
firecrawl:mainfrom
crown-sports:fix/pptx-ole-previews

Conversation

@crown-sports

@crown-sports crown-sports commented Oct 25, 2026 •

Copy link
Copy Markdown

Summary

PPTX embedded objects can expose their OLE compound payload as an image while silently losing the preview that the slide actually displays. Prefer the object's preview image, retain the original OLE payload in Document.assets, and preserve the existing payload fallback when no usable preview exists.

Graphic-frame searches now traverse only the selected mc:AlternateContent branch, including nested alternatives and later sibling content. This prevents rejected tables or OLE objects from hiding the supported representation. Shape-level OLE wrappers use the same parsing path, and the supported namespace set includes the chart and diagram formats this reader already handles.

Fixes #182. Thanks to the report and follow-up analysis there for identifying both the lost preview and the payload-retention requirement.

Validation

  • Added 13 end-to-end PPTX tests covering preview/payload identity, ordinary adjacent pictures and deduplication, supported and unsupported choices, missing fallback, nested/sibling alternatives, external and missing previews, missing payloads, and chart/diagram content in both frame-level and shape-level choices.
  • On unmodified main (e7178e099b6bf9171e2c52b832cbdb4134b69112), these tests produce 12 failures / 1 pass; with this change, 13 pass.
  • cargo test --locked: 311 passed, 1 ignored (the existing optional local-samples test).
  • cargo fmt --all --check: passed.
  • cargo clippy --workspace --all-targets --all-features -- -D warnings: passed.
  • An independent reviewer inspected the change and reran all 13 regression tests successfully.

AI assistance was used for implementation, testing, and independent review. Node/Python/Wasm runtime tests were not run locally; their crates are covered by the workspace Clippy check above.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.

View guided diff | Re-trigger cubic

Comment thread src/formats/pptx/mod.rs Resolved

This branch has not been deployed

No deployments
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.

PPTX: images silently dropped in two mc:AlternateContent structures (oleObj preview not walked; first_descendant walks through AlternateContent)

1 participant