Skip to content

fix: check the matching actions before keyboard copy, cut and paste - #3925

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/keyboard-clipboard-guards
Oct 22, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/keyboard-clipboard-guards

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

  • Shortcuts: Ctrl+C, Ctrl+X and Ctrl+V now run the isVisible/isDisabled checks of Copy to, Move to and Paste, so spaces, items without the needed permission and read-only targets no longer hit the server and fail. The hand-written vault checks are covered by the actions.
  • Paste in public links: public spaces have no graph permissions, so Paste checks canCreate of the current folder there. This also enables the context menu Paste in editable public links.
  • Same folder: cut and paste into the same folder still shows the existing hint.

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest), browser tests (Playwright) against a local OpenCloud
  • test case 1: unit: keyboard copy, cut and paste with spaces, missing permissions, vaults, public links and the same folder
  • test case 2: browser: Spaces overview, read-only share, Favorites, Search, personal and project spaces, editable, upload-only and read-only public links, same folder hint, OS clipboard upload, vault

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@tammi-23 tammi-23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 LGTM

@AlexAndBear
AlexAndBear merged commit 03586d4 into main Oct 22, 2026
28 checks passed
@AlexAndBear
AlexAndBear deleted the fix/keyboard-clipboard-guards branch October 22, 2026 10:08
@openclouders openclouders mentioned this pull request Oct 22, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyboard copy, cut and paste skip the checks of the matching actions

2 participants