Skip to content

Add Copy Path to the session context menu - #245

Open
jsgrrchg wants to merge 1 commit into
zeronsh:mainfrom
jsgrrchg:zeron/copy-path-menu-feature
Open

Add Copy Path to the session context menu#245
jsgrrchg wants to merge 1 commit into
zeronsh:mainfrom
jsgrrchg:zeron/copy-path-menu-feature

Conversation

@jsgrrchg

@jsgrrchg jsgrrchg commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a Copy Path action to the desktop session context menu.
  • Prefer the host-resolved Git checkout root when it matches the current working directory, with the current absolute working directory as a safe fallback.
  • Support remote sessions by copying the path in the host device filesystem namespace without requiring an RPC.
  • Hide the action when no absolute checkout path is available, including projectless sessions that use ~.

UX note

Copy Path is intentionally silent: it writes to the clipboard and closes the menu without showing a confirmation banner. If you prefer it to not be silent, let me know.

The existing copy items use sidebar_notice for confirmation. In normal use, those banners disappear only when the user clicks them; they do not currently have a timeout. The component also appears to have been designed primarily for error handling, as indicated by its persistent danger styling. A follow-up should consider giving these confirmation banners a timeout or introducing a dedicated transient success notification.

Testing

  • cargo test -p zeron-ui copy_path
  • git diff --check

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

jsgrrchg added a commit to jsgrrchg/comet that referenced this pull request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant