Skip to content

Conversation

@NamanRai64
Copy link
Collaborator

What does this PR do?

Related issue

Fixes #

Checklist

  • I tested my changes
  • I didn’t break existing functionality
  • I followed repo style

@NamanRai64 NamanRai64 requested a review from 7sg56 as a code owner January 30, 2026 16:46
Copy link
Owner

@7sg56 7sg56 left a comment

Choose a reason for hiding this comment

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

What changes are done brief them

@7sg56 7sg56 merged commit f467445 into main Jan 30, 2026
1 check failed
@NamanRai64
Copy link
Collaborator Author

Store Logic (
src/store/useAppStore.ts
)

Real Files: Updated
createNewTab
to create an actual file node (e.g., untitled.md) in the mock file system instead of a temporary "blank" tab.
Unique Naming: Added logic to automatically append numbers (e.g., untitled-1.md) if a file with that name already exists.
Renaming State: Introduced renamingFileId and
setRenamingFileId
to track which file is currently being edited.
Rename Action: Added
renameFile
to commit name changes to the file system.
Workflow: Triggering "New Tab" now creates the file, opens it, and immediately sets it to rename mode.
2. Explorer UI (
src/components/layout/explorer/FileTreeItem.tsx
)
Double-Click: Added an onDoubleClick handler to start renaming any file.
Input Field: Conditionally renders an field instead of the file name when in rename mode.
Controls:
Enter: Saves the new name.
Escape: Cancels the rename.
Blur: Auto-saves on click away.

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.

3 participants