feat(files): zoom controls for inline mermaid and images in markdown#4411
feat(files): zoom controls for inline mermaid and images in markdown#4411waleedlatif1 wants to merge 3 commits intostagingfrom
Conversation
… fit zoom upscaling
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Wraps markdown-embedded images in Reviewed by Cursor Bugbot for commit cd5f27e. Configure here. |
Greptile SummaryThis PR adds pan/zoom controls to inline mermaid diagrams and images in markdown previews, and fixes
Confidence Score: 4/5Safe to merge after fixing raster image upscaling; the mermaid zoom feature works correctly. One P1 issue: initialScale='fit' on raster images combined with the removed upscaling cap will visibly pixelate small embedded images. No P0 issues; the mermaid zoom additions are otherwise correct. preview-panel.tsx — the img handler's initialScale='fit' needs attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Markdown rendered] --> B{Element type?}
B -->|mermaid-diagram| C[MermaidDiagram with zoomable prop]
B -->|img| D[ZoomablePreview with fit scale]
C --> E[ZoomablePreview with fit scale and resetKey]
E --> F[getFitZoom - upscaling cap removed]
D --> F
F --> G{Content vs container size?}
G -->|Smaller content, SVG| H[Upscales to fill container - crisp]
G -->|Smaller content, Raster| I[Upscales up to 4x - pixelated]
G -->|Larger content| J[Downscales to fit with padding]
Reviews (2): Last reviewed commit: "revert(files): remove vfs url rewriting,..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cd5f27e. Configure here.

Summary
Type of Change
Testing
Tested manually
Checklist