fix(files): render image previews inline - #7024
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit a40d4de. Configure here. |
aa5a7bf to
a40d4de
Compare
|
@cursor review |
Greptile SummaryThe PR routes browser-renderable workspace images through the authenticated inline endpoint while retaining derivative-backed preview URLs for HEIC/HEIF and public shares.
Confidence Score: 5/5The PR appears safe to merge with no concrete correctness or security regressions identified. The changed URL paths preserve HEIC derivatives and public-share behavior, workspace keys provide correct cache identity, current callers maintain workspace scoping, and inferred MIME types continue through the existing secure response-header policy.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/workspaces/[id]/files/inline/route.ts | Resolves generic stored MIME types before applying the existing secure inline-header policy. |
| apps/sim/hooks/use-file-content-source.tsx | Adds context-specific image URL generation, routing ordinary workspace images inline while preserving HEIC and public preview behavior. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/image-preview.tsx | Delegates image URL selection to the active file-content source without changing preview fallback behavior. |
| apps/sim/app/api/workspaces/[id]/files/inline/route.test.ts | Covers MIME derivation and inline disposition for generically typed PNG storage. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/image-preview.test.tsx | Adds provider-backed coverage confirming browser-renderable images use the workspace inline endpoint. |
Reviews (2): Last reviewed commit: "fix(files): preserve generic image previ..." | Re-trigger Greptile
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a40d4de. Configure here.
fix(files): render image previews inline
Summary
Type of Change
Testing
Checklist