Skip to content

fix(client): show toast notifications on file/folder rename validatio…#4177

Open
Dakshx07 wants to merge 1 commit into
processing:developfrom
Dakshx07:fix/rename-validation-toast
Open

fix(client): show toast notifications on file/folder rename validatio…#4177
Dakshx07 wants to merge 1 commit into
processing:developfrom
Dakshx07:fix/rename-validation-toast

Conversation

@Dakshx07

Copy link
Copy Markdown

Issue:

Fixes #4176

Description:

This PR resolves a usability issue where file and folder rename inputs fail validation silently and revert back to their original names. We now display appropriate toast messages explaining why the rename failed:

  • Reverts empty file name -> shows "Please enter a name".
  • Reverts empty folder name -> shows "Please enter a name".
  • Reverts folder name containing dots/extension -> shows "Folder name cannot contain an extension".
  • Reverts file name with missing or unsupported extension -> shows "Invalid file type...".

Changes:

  • Refactored validateFileName in FileNode.jsx to check and dispatch showToast notifications on validation failures.
  • Updated FileNode.unit.test.jsx to mock showToast and assert that it is called on all validation failures.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.

@welcome

welcome Bot commented Jun 14, 2026

Copy link
Copy Markdown

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

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.

[UX] File and folder renaming fails silently on validation errors

1 participant