Skip to content

feat: Support client-side rendering for PPTX and PPT files#1341

Open
spider-yamet wants to merge 18 commits intoeigent-ai:mainfrom
spider-yamet:feat/support-client-side-render-PPTX-PPT
Open

feat: Support client-side rendering for PPTX and PPT files#1341
spider-yamet wants to merge 18 commits intoeigent-ai:mainfrom
spider-yamet:feat/support-client-side-render-PPTX-PPT

Conversation

@spider-yamet
Copy link
Contributor

Related Issue

Closes #1339

Description

This PR adds client-side rendering for PPTX (and PPT) files in the Agent Folder, as requested in #1339.

What changed:

  • Data path: Main process exposes getFileAsDataUrl(path, type?) (in FileReader) so the renderer receives raw PPTX bytes as a data URL. Remote URLs are downloaded to a temp path first, then read and returned as a data URL.
  • IPC: New get-file-dataurl handler and getFileAsDataUrl on electronAPI; preload and electron.d.ts updated.
  • Viewer: New PptxViewer component (lazy-loaded) that decodes the data URL, parses the PPTX in the renderer with JSZip and the browser’s DOMParser, and renders slides with a filmstrip and prev/next controls.
  • Folder flow: When a user selects a PPTX file, the app calls get-file-dataurl instead of open-file; content area shows PptxViewer when content is a data URL. If IPC is unavailable (e.g. browser-only), a short message explains that PPTX preview is available in the desktop app.
  • Dependency: Added jszip for browser-safe PPTX unzip in the renderer.

Why: Preview was previously done in the main process (text-only HTML). Moving to client-side rendering matches the PDF pattern (raw bytes → renderer), supports remote files via the same path, and allows a proper slide-by-slide UI. Legacy .ppt is out of scope for this change.

Testing Evidence (REQUIRED)

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.
  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

@spider-yamet
Copy link
Contributor Author

spider-yamet commented Feb 23, 2026

PPT file

image

PPT renderer

image

@spider-yamet
Copy link
Contributor Author

Please review my PR, @bytecii , @Wendong-Fan

@spider-yamet
Copy link
Contributor Author

@bytecii @Wendong-Fan could you please review this PR?

@spider-yamet
Copy link
Contributor Author

@bytecii @Wendong-Fan could you please review this PR?

@spider-yamet
Copy link
Contributor Author

@fengju0213 could you please review this pr?

@4pmtong 4pmtong self-requested a review March 3, 2026 04:17
@4pmtong
Copy link
Collaborator

4pmtong commented Mar 3, 2026

Thanks @spider-yamet for your contribution and your patience! Sorry for the delayed response — I'll do a detailed code review next and will follow up soon.

@4pmtong 4pmtong requested a review from a7m-1st March 3, 2026 04:19
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.

[Feature Request] Support client-side rendering for PPTX and PPT files

2 participants