Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • double click to rename workspace and folders shortcut, similar to arc browser onDoubleClick

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Nov 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Nov 12, 2025 4:18am

@waleedlatif1 waleedlatif1 merged commit 81411c7 into staging Nov 12, 2025
4 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/registry branch November 12, 2025 04:19
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 12, 2025

Greptile Overview

Greptile Summary

This PR added double-click to rename functionality for both folders and workflows in the sidebar, providing a more intuitive UX similar to Arc browser.

  • Added handleDoubleClick callback in both folder-item.tsx and workflow-item.tsx that prevents default behavior, stops propagation, and triggers the existing handleStartEdit() function
  • Attached onDoubleClick handler to the name display elements (span for folders, div for workflows)
  • Implementation is consistent across both components with proper React event handling
  • Leverages existing useItemRename hook infrastructure, requiring no changes to underlying rename logic

Confidence Score: 5/5

  • This PR is safe to merge with no issues found
  • The implementation is simple, consistent, and follows established patterns. It properly handles events with preventDefault() and stopPropagation(), uses the existing useItemRename hook correctly, and mirrors the implementation across both components without introducing any new dependencies or edge cases.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/workflow-list/components/folder-item/folder-item.tsx 5/5 Added double-click to rename functionality for folders using handleDoubleClick handler with proper event handling
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components-new/workflow-list/components/workflow-item/workflow-item.tsx 5/5 Added double-click to rename functionality for workflows using handleDoubleClick handler with proper event handling

Sequence Diagram

sequenceDiagram
    participant User
    participant FolderItem/WorkflowItem
    participant handleDoubleClick
    participant useItemRename
    participant handleStartEdit
    participant Input

    User->>FolderItem/WorkflowItem: Double-click on name
    FolderItem/WorkflowItem->>handleDoubleClick: onDoubleClick event
    handleDoubleClick->>handleDoubleClick: e.preventDefault()
    handleDoubleClick->>handleDoubleClick: e.stopPropagation()
    handleDoubleClick->>handleStartEdit: Call handleStartEdit()
    handleStartEdit->>useItemRename: Update state
    useItemRename->>useItemRename: setIsEditing(true)
    useItemRename->>useItemRename: setEditValue(initialName)
    useItemRename->>Input: Focus and select input
    Input-->>User: Show editable input field
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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.

2 participants