feat: add copy path button to diff headers#2403
feat: add copy path button to diff headers#2403ipanasenko wants to merge 3 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 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 558bb17. Configure here.
ApprovabilityVerdict: Needs human review An unresolved review comment identifies a potential event propagation bug where clicking the copy button may also trigger the parent's file-open action. This interaction issue should be verified by a human reviewer. You can customize Macroscope's approvability policy. Learn more. |

Hey guys!
I find myself in a need to copy a file path from diff view quite often. I use it to paste into the chat and ask questions about this specific file. I think it makes it much more obvious for model (and for me) what file we are talking about.
Currently the best workflow in T3 Code I found for copying file path is to manually select file path and do Cmd+C. I think this can be improved by adding a copy button, GitHub-style.
Summary
renderHeaderMetadataslotNote
Add copy path button to diff file headers
renderHeaderMetadataprop on each file diff header.showAnchoredCopySuccessToast,showAnchoredCopyErrorToast) into a new anchoredCopyToast.ts module and updates MessageCopyButton to use them.Macroscope summarized ff25a41.
Note
Low Risk
UI-only changes that reuse existing clipboard/toast infrastructure; risk is limited to minor regressions in copy/toast behavior and diff header interactions.
Overview
Adds a GitHub-style copy file path control to each diff file header via
FileDiff’srenderHeaderMetadata, with tooltip/icon feedback and anchored success/error toasts.Introduces a shared
ui/anchoredCopyToasthelper (timeout + success/error toast functions) and refactorsMessageCopyButtonto use it instead of duplicating toast wiring.Reviewed by Cursor Bugbot for commit ff25a41. Bugbot is set up for automated code reviews on this repo. Configure here.