feat(v2): inline PPTX preview via server-side OfficeCLI render#306
Merged
feat(v2): inline PPTX preview via server-side OfficeCLI render#306
Conversation
Adds OfficeCLI v1.0.70 binary to the backend image (SHA256-pinned), exposes GET /api/uploads/:fileName/preview-pptx-html that runs `officecli view html` on the uploaded .pptx and returns rendered HTML, and a PptxPreview component in V2PodInspector that srcdoc's it into a sandboxed iframe. Completes the DOCX/XLSX/PPTX inline preview trio in the inspector. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
samxu01
pushed a commit
that referenced
this pull request
May 6, 2026
PR #306 added the PptxPreview component but forgot to add the `if (kind === 'pptx') return <PptxPreview .../>` line to the switch in ArtifactPreview, so .pptx artifacts fell through to `return null` and showed nothing. The /api/uploads/:fileName/preview-pptx-html backend route + the PptxPreview component itself work fine when invoked directly — the wire was just missing. DOCX (mammoth) and XLSX (SheetJS) wires are intact; bundle inspection confirms `t==="docx"?.../t==="xlsx"?...` chain in the minified ArtifactPreview, plus mammoth.browser-*.js and xlsx-*.js chunks load 200 from /assets/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
GET /api/uploads/:fileName/preview-pptx-html— fetches the .pptx from object storage / legacy Mongo bytes, runsofficecli view <file> html, returns the rendered HTML (text/html, 30s render timeout, 5min private cache).PptxPreviewcomponent in V2PodInspector — fetches the rendered HTML and injects it into a sandboxed iframe (srcDoc, sandbox="allow-scripts allow-same-origin").Test plan
GET /api/uploads/<name>/preview-pptx-htmlreturns 200 text/html.🤖 Generated with Claude Code