Skip to content

feat: rename files and folders with extension-preserving selection #11

Description

@nextestudios

Summary

Rename the focused file or folder from the actions menu using the virtual keyboard.

Motivation

Rename is one of the most frequent file tasks and does not exist yet.

Requirements

  • Actions menu (North) → Rename… on files and folders in physical locations (not inside archives).
  • Keyboard opens with the full name; the caret starts before the extension (e.g. example-file|.zip). When keyboard selection lands (enhancement: add text selection to the virtual keyboard (select all, select stem) #44), the stem is pre-selected.
  • Windows name rules validated before touching the disk (WindowsNameRules); a changed or removed extension requires explicit confirmation.
  • Case-only renames work (foto.JPG → foto.jpg).
  • Name collisions are refused with a clear message; nothing is overwritten.
  • Focus stays on the renamed item.

Controller UX

North → Rename… → type with the D-pad/stick → Start (Done) or the DONE key to apply, East/B to cancel without changes.

Technical Notes

Add to LocalFileSystemProvider (or the new operation service) using a same-directory move; reuse VirtualKeyboard(TextFieldKind.FileName) and FileListState.FocusById.

Acceptance Criteria

  • Renaming keeps focus on the item and refreshes the list.
  • Changing the extension asks for confirmation; cancelling keeps the original name.
  • Reserved names and collisions are refused without modifying anything.

Testing

Unit tests for new branches and for every bug reproduced before a fix (no trivial variations, see AGENTS.md). Windows integration test for a case-only rename. Manual: rename with an Xbox and a DualSense controller.

Dependencies


Priority: critical · Milestone: 1 · Core File Operations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions