feat(files): add Markdown PDF export - #6504
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview The rich Markdown editor reports when its content is loaded and safe to print; the action stays disabled until the current file is ready. Export marks the editor root with print attributes, temporarily sets Scoped Reviewed by Cursor Bugbot for commit da78a4b. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryAdds browser-native PDF export for open Markdown files by marking the active rich editor as the print root and invoking the browser print dialog.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css | Adds scoped print rules and now preserves the hidden state of the inactive editor surface. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx | Marks each loaded rich Markdown editor with a file-specific print-root attribute. |
| apps/sim/app/workspace/[workspaceId]/files/files.tsx | Adds the Markdown-only PDF action and manages print scoping, title restoration, and cleanup. |
Reviews (2): Last reviewed commit: "fix(files): scope Markdown print styles" | Re-trigger Greptile
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a7a306a. Configure here.
|
Closing as superseded. The replacement will implement direct Markdown-to-PDF generation and download instead of browser print preview. |

Summary
Adds a browser-native Save as PDF… action for open Markdown files.
window.print()with the file name as the temporary document titleType of Change
Testing
Automated checks:
bunx biome check --no-errors-on-unmatched --files-ignore-unknown=trueon the three changed filescd apps/sim && bun run type-checkgit diff --checkLocal smoke checks:
A dedicated button-level test was intentionally not added because equivalent Files header actions do not have button-level tests. Browser print-preview testing and screenshots were not available from this session because no controllable browser was attached. Reviewers should manually verify dialog cancellation, suggested filename, both app themes, non-Markdown gating, and a multi-page document with headings, lists, code, tables, links, and images.
Checklist
Screenshots/Videos
Not available from this session; browser automation reported no attached browser.