Skip to content

feat: add "Copy link" to file context menu#140

Merged
k1LoW merged 1 commit intomainfrom
feat/deeplink-copy
Mar 26, 2026
Merged

feat: add "Copy link" to file context menu#140
k1LoW merged 1 commit intomainfrom
feat/deeplink-copy

Conversation

@k1LoW
Copy link
Copy Markdown
Owner

@k1LoW k1LoW commented Mar 26, 2026

Summary

CleanShot 2026-03-26 at 11  06 18@2x
  • Add a "Copy link" item to the file kebab menu that copies the deep link URL (/<group>?file=<id>) to the clipboard
  • Uses the existing buildFileUrl() utility to generate the URL
  • Makes the existing deep link feature more discoverable

Closes #139

Add a menu item that copies the deep link URL for a file to the
clipboard, making existing deep links more discoverable.

Closes #139
@k1LoW k1LoW self-assigned this Mar 26, 2026
@k1LoW k1LoW added the enhancement New feature or request label Mar 26, 2026
@k1LoW k1LoW requested a review from Copilot March 26, 2026 02:05
@github-actions
Copy link
Copy Markdown
Contributor

Code Metrics Report

main (d44a869) #140 (b19004a) +/-
Coverage 57.1% 57.0% -0.1%
Code to Test Ratio 1:0.5 1:0.5 -0.1
Test Execution Time 30s 30s 0s
Details
  |                     | main (d44a869) | #140 (b19004a) |  +/-  |
  |---------------------|----------------|----------------|-------|
- | Coverage            |          57.1% |          57.0% | -0.1% |
  |   Files             |             39 |             39 |     0 |
  |   Lines             |           3256 |           3261 |    +5 |
+ |   Covered           |           1861 |           1862 |    +1 |
- | Code to Test Ratio  |          1:0.5 |          1:0.5 |  -0.1 |
  |   Code              |           5014 |           5047 |   +33 |
  |   Test              |           2846 |           2846 |     0 |
  | Test Execution Time |            30s |            30s |    0s |

Code coverage of files in pull request scope (43.1% → 42.3%)

Files Coverage +/- Status
internal/frontend/src/components/FileContextMenu.tsx 20.0% -2.3% modified
internal/frontend/src/components/Sidebar.tsx 59.2% -1.4% modified
internal/frontend/src/components/TreeView.tsx 2.6% 0.0% modified

Reported by octocov

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “Copy link” action to the file context (kebab) menu in the React frontend to make existing deep-linking more discoverable and easy to share.

Changes:

  • Add onCopyLink plumbing through SidebarTreeViewFileContextMenu
  • Implement clipboard copy of an absolute deep-link URL using existing buildFileUrl(activeGroup, id)
  • Add a new “Copy link” menu item in the file context menu UI

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/frontend/src/components/TreeView.tsx Wires new onCopyLink callback through tree-view file node rendering into the context menu.
internal/frontend/src/components/Sidebar.tsx Implements handleCopyLink to build an absolute deep link and copy it to the clipboard; passes handler to list/tree render paths.
internal/frontend/src/components/FileContextMenu.tsx Adds a “Copy link” menu item that triggers the new callback with the current file ID.

@k1LoW k1LoW merged commit 94a900e into main Mar 26, 2026
7 checks passed
@k1LoW k1LoW deleted the feat/deeplink-copy branch March 26, 2026 06:18
@github-actions github-actions bot mentioned this pull request Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tagpr:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Include file path in URL

2 participants