Skip to content

Add “Copy File Path” Button in File Inspector #2

@lucyb0207

Description

@lucyb0207

Task

Add a small button in the File Inspector sidebar that lets users quickly copy the currently selected file path.

Right now, users have to manually highlight and copy the path, which is slow when exploring large repositories. This should be a simple one-click action.

The button should appear next to the file path in the FILE section and only show when a file is selected.

On click, it should copy the file path using:

navigator.clipboard.writeText(selectedFile || "");

After copying, show a small temporary feedback state like “Copied” or a checkmark for 1–2 seconds before resetting.

The UI should stay minimal and not affect layout or spacing in the sidebar.

No backend changes are needed, and no extra libraries should be used.

Acceptance Criteria

Button appears only when a file is selected
Clicking copies the correct file path
User gets visual feedback after copy
No layout break or console errors

Notes

Keep implementation simple and consistent with the existing UI style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions