feat(files): zoom controls for inline mermaid and images in markdown#4411
feat(files): zoom controls for inline mermaid and images in markdown#4411waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
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.
c3d8151 to
8a63893
Compare
- Add pan/zoom/fit controls to mermaid diagrams rendered inline in markdown — same experience as the standalone .mmd viewer - Wrap inline markdown images in ZoomablePreview with fit-to-container scale - Allow fit zoom to upscale small diagrams to fill the view (previously capped at 100%)
8a63893 to
5017a77
Compare

Summary
Type of Change
Testing
Tested manually
Checklist