fix(files): only show Share in context menu for files, not folders#5147
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@greptile review |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 5b29199. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR fixes a UX bug where the "Share" context menu item was incorrectly displayed for folders in the file browser, even though the share handler only operates on files. The fix gates the
Confidence Score: 5/5Safe to merge — the change is a one-line conditional that correctly suppresses a no-op menu item for folders. The fix is minimal and the logic is sound: contextMenuItemRef.current is always written synchronously before openContextMenu fires the re-render, so the kind check is never stale. The downstream component (FileRowContextMenu) already conditionally renders the Share item only when onShare is defined, so no secondary changes were needed. No new state, no new code paths, no regressions visible. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(files): only show Share in context m..." | Re-trigger Greptile |
Summary
Type of Change
Testing
Tested manually. Lint and
check:api-validation:strictpass.Checklist