forked from HeyPuter/puter
-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
Current Behavior
There is no direct way to duplicate a file from the context menu. Users must use Copy (Ctrl+C) followed by Paste (Ctrl+V), which creates a copy but doesn't automatically generate a unique filename.
Reproduction Steps:
- Open Puter in a web browser
- Navigate to any folder and create a test file named
document.txt - Right-click on
document.txtto open the context menu - Observe: The menu shows options like Open, Rename, Copy, Delete, etc.
Expected Behavior
When right-clicking on a file, the context menu should include a "Duplicate" option that creates a copy of the file in the same directory with an automatically generated name that avoids conflicts.
Acceptance Criteria:
- A "Duplicate" menu item appears in the file context menu (not for folders, only files)
- Clicking "Duplicate" creates a copy in the same directory
- The duplicated file has an automatically generated name (e.g.,
document copy.txtordocument (1).txt) - If a file with the generated name already exists, the system adds a number suffix (e.g.,
document (2).txt,document (3).txt) - The newly duplicated file appears in the file list immediately without requiring a refresh
Steps To Test
Manual Testing:
- Open Puter and create a test file
test.txtwith some content - Right-click on
test.txtand select "Duplicate" - Verify a new file appears named
test copy.txt - Verify the content of both files is identical
- Right-click on
test.txtagain and select "Duplicate" again - Verify a new file appears with a unique name like
test (2).txtortest copy 2.txt
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx
Metadata
Metadata
Assignees
Labels
No labels