Skip to content

feat(files): add explorer copy context menu - #364

Merged
Yuqing (mydmdm) merged 1 commit into
alphafrom
fix/issue-349-file-context-menu
Oct 29, 2026
Merged

Yuqing (mydmdm) merged 1 commit into
alphafrom
fix/issue-349-file-context-menu

Conversation

@mydmdm

Copy link
Copy Markdown
Contributor

Summary

  • Replace the native browser context menu on Files explorer file/folder rows with Copy name, Copy relative path, and Copy full path.
  • Resolve relative paths from the currently opened root using displayed ancestry, preserving symlink names and the source device's separators; copy full device paths without URL encoding or shell quoting.
  • Reuse Common DropdownMenu and the existing clipboard helper/fallback. An independent actions button becomes visible on hover or keyboard focus; Shift+F10, the Context Menu key, standard menu navigation, Escape and outside dismissal work without nesting interactive controls.
  • Keep the path input's native editing menu and existing disclosure, Add and copy-only drag behavior. Surface clipboard failures and clear them on successful retry.
  • Add English/Chinese labels and document the behavior in the device-files architecture reference.

Validation

  • pnpm typecheck
  • pnpm format
  • pnpm lint:fix
  • 48 focused tests across FilesPanel, Common DropdownMenu and clipboard suites.
  • pnpm check:i18n and node scripts/check-headers.mjs.

Coverage includes file/folder metadata-only copying, nested POSIX/Windows/UNC paths, symlink hierarchy and root aliases, literal Unicode/backslash/space/shell-like names, context-menu event cancellation on rows/menu items but not path inputs, keyboard navigation/dismissal, clipboard failure/retry, and existing lazy expansion/Add/drag/root-switch behavior. Native browser menus are suppressed through contextmenu.preventDefault(); platform-specific native menu contents were not inspected in Windows/macOS desktop runs.

This is the user-approved follow-up to merged #355. No new API, dependency, file-content read or filesystem mutation is introduced.

References #349.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mydmdm
Yuqing (mydmdm) merged commit 8f2b532 into alpha Oct 29, 2026
4 checks passed
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