Skip to content

feat: add safe object copy and move actions - #221

Merged
cxymds merged 1 commit into
mainfrom
cxymds/feat-object-copy-move
Sep 7, 2026
Merged

feat: add safe object copy and move actions#221
cxymds merged 1 commit into
mainfrom
cxymds/feat-object-copy-move

Conversation

@cxymds

@cxymds cxymds commented Sep 7, 2026

Copy link
Copy Markdown
Member

Pull Request

Description

Add single-object Copy and Move actions to the object browser, with a destination bucket and full object path. Users can transfer an object between paths or buckets on the current server without downloading it.

  • Protect existing destinations with conditional writes; validate paths without normalizing literal object keys.
  • Use server-side multipart copy above 5 GiB, preserving source metadata and tags and cleaning up unfinished uploads on failure.
  • For moves, confirm the copy, recheck the source, and then issue a conditional delete without deleting historical versions. Show explicit recovery guidance if source deletion fails or cannot be confirmed.
  • Check source and exact destination permissions separately; provide progress, accessible field errors, bucket-list retry/manual entry, focus restoration, and mobile/dark-mode layouts.
  • Add 52 regression tests and all 33 new messages across the 14 supported locales.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed

All checks passed in an isolated worktree based on the latest main:

nvm use v22
pnpm install --frozen-lockfile
pnpm type-check
pnpm lint
pnpm format:check
pnpm test:run
pnpm build
  • Full suite: 534 passed, 0 failed, including 52 new transfer/permission regression tests.
  • Browser testing used the real UI and AWS SDK against a local mock S3 endpoint, covering cross-bucket Unicode keys, same-location validation, existing-target conflicts, successful moves, source-delete denial/partial success, bucket-list failure and retry, and a simulated 6 GiB multipart transfer.
  • Checked progress/disabled controls, Escape prevention while running, keyboard focus restoration, 390 px mobile layout, and light/dark modes.
  • Independent correctness/simplification, testing, and UX/i18n reviews completed. Live RustFS integration testing has not been performed.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Implements the requested single-object copy/move workflow. No linked GitHub issue.

Screenshots (if applicable)

These are new dialogs, so there is no previous dialog to show as a before state. The after screenshots below use local fixture objects and a mock endpoint, not production data.

Desktop: destination form

New copy dialog with destination bucket and full object path
Desktop: validation and destination-conflict states

Same-location validation:

Destination path validation with field focus

Existing destination conflict, without overwriting:

Conditional copy conflict with a link to the destination

Mobile: dark mode and recovery states

Dark-mode copy Bucket suggestions unavailable Copy succeeded; source deletion failed
Mobile copy dialog in dark mode Manual bucket entry and retry after bucket suggestions fail Partial move result names the copied destination and prevents automatic retry

Additional Notes

  • Scope is one object on the current server; recursive folders, bulk transfers, and background-task integration are not included.
  • A move is copy followed by conditional delete, not an atomic rename. Uncertain deletion is not automatically retried, and a confirmed copied destination is retained for recovery.
  • The server must support the conditional S3 operations. Versioned sources and multipart tag preservation may require the corresponding version/tag read permissions in addition to the basic source/destination permissions.
  • No backend changes or new dependencies are included.

Let users copy or move a single object between paths and buckets without downloading it. Protect existing destinations with conditional writes and remove the source only after copying is confirmed, with explicit recovery guidance for partial failures.

Support server-side multipart copy, exact-key permission checks, accessible transfer dialogs, and translations for all supported locales. Cover transfer and permission edge cases with 52 regression tests.
@cxymds
cxymds merged commit 96ae12e into main Sep 7, 2026
10 checks passed
@cxymds
cxymds deleted the cxymds/feat-object-copy-move branch September 7, 2026 01:52
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