Skip to content

Conversation

@emir-karabeg
Copy link
Collaborator

Summary

Fixes chat dragging UX and workflow block UI improvement.

Chat has button to add inputs to start block.

Type of Change

  • New feature

Testing

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • 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 19, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Nov 20, 2025 2:14am

@emir-karabeg
Copy link
Collaborator Author

@waleedlatif1 for the add inputs, can you add the sockets events to chat.tsx?

All throwaway code is commented in that file, but the UI conditional render portion is correct.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 19, 2025

Greptile Summary

  • Fixed chat drag-and-resize UX by adding viewport boundary clamping to prevent chat from growing beyond screen limits
  • Improved UI styling with workflow block borders, increased chat default width from 250px to 330px, and refactored header layout
  • Removed workflow import functionality and added commented-out "Add inputs" button feature for future implementation

Confidence Score: 4/5

  • This PR is safe to merge with minor style considerations
  • The changes are primarily UI improvements and bug fixes with well-implemented boundary clamping logic. One minor concern: editing globals.css goes against project guidelines, though the impact is minimal.
  • Review apps/sim/app/globals.css - consider moving the color variable to local component styles per project guidelines

Important Files Changed

Filename Overview
apps/sim/app/globals.css Added new color variable --c-CFCFCF to global styles
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/hooks/use-chat-resize.ts Added clamping logic to prevent chat from growing beyond viewport boundaries during resize operations
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx Refactored header layout, swapped Clear/Download menu items, updated empty state text, added commented-out inputs button feature

Sequence Diagram

sequenceDiagram
    participant User
    participant Chat
    participant ChatResize
    participant ChatStore
    participant WorkflowExecution

    User->>Chat: Open chat modal
    Chat->>ChatStore: Get chat position and dimensions
    ChatStore-->>Chat: Return position (x, y, width=330, height=286)
    Chat->>Chat: Render chat at position
    
    User->>Chat: Drag resize handle
    Chat->>ChatResize: handleMouseMove(event)
    ChatResize->>ChatResize: Calculate deltaX and deltaY
    ChatResize->>ChatResize: Clamp deltas to viewport boundaries
    ChatResize->>ChatStore: Update position and dimensions
    ChatStore-->>Chat: Updated position applied
    
    User->>Chat: Select workflow output
    Chat->>ChatStore: setSelectedWorkflowOutput(workflowId, outputs)
    
    User->>Chat: Send message
    Chat->>WorkflowExecution: Execute workflow with input
    WorkflowExecution-->>Chat: Return execution results
    Chat->>Chat: Display messages
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.

7 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@waleedlatif1 waleedlatif1 changed the title feat(chat): add inputs feat(chat): add 'add inputs' button to chat window Nov 20, 2025
@waleedlatif1 waleedlatif1 merged commit d9cb63c into staging Nov 20, 2025
3 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/chat-notice branch November 20, 2025 02:12
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