Skip to content

fix(copilot): fix sent message width - #1904

Merged
Sg312 merged 1 commit into
stagingfrom
fix/copilot-width
Nov 11, 2025
Merged

fix(copilot): fix sent message width#1904
Sg312 merged 1 commit into
stagingfrom
fix/copilot-width

Conversation

@Sg312

Copy link
Copy Markdown
Collaborator

Summary

Fix copilot sent message width

Type of Change

  • Bug fix

Testing

Manual

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

vercelBot commented Nov 11, 2025

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedNov 11, 2025 11:30pm

@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Standardized width calculations across copilot message components to fix alignment issues with sent messages.

  • Changed width calculation from panelWidth - 17px to panelWidth - 16px in user-input.tsx to match message components
  • Added CSS custom property --panel-max-width to both user and assistant message wrapper divs for consistent width constraints
  • Moved pl-[2px] padding from wrapper to inner content div in assistant messages to maintain proper spacing
  • Added explicit w-full class to message box and input container elements
  • Removed unused copilot-scrollable class from scroll container

These changes ensure user messages, assistant messages, and the input box all have consistent widths and proper alignment within the copilot panel.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are purely cosmetic CSS/styling adjustments that standardize width calculations and add explicit width classes for better alignment. No logic changes, no security concerns, and the changes are straightforward and well-contained.
  • No files require special attention

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/copilot/components/copilot-message/copilot-message.tsx5/5Consistent width constraint implementation for user and assistant messages with proper padding adjustments
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/copilot/components/user-input/user-input.tsx5/5Aligned width calculation with message components (changed from -17px to -16px) and added explicit w-full class
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/copilot/copilot.tsx5/5Removed copilot-scrollable class from scroll container (likely unused CSS class)

Sequence Diagram

sequenceDiagram
participant Copilot
participant CopilotMessage
participant UserInput
Note over Copilot: panelWidth prop received
Copilot->>UserInput: Pass panelWidth
Note over UserInput: Calculate max-width<br/>panelWidth - 16px<br/>Apply w-full class
Copilot->>CopilotMessage: Pass panelWidth
alt User Message
Note over CopilotMessage: Calculate max-width<br/>panelWidth - 16px<br/>Apply to wrapper div<br/>Add w-full to message box
else Assistant Message
Note over CopilotMessage: Calculate max-width<br/>panelWidth - 16px<br/>Apply to wrapper div<br/>Move px-[2px] to inner div
end
Note over CopilotMessage,UserInput: Consistent width calculation<br/>ensures proper alignment
Loading

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Sg312
Sg312 merged commit 77ba4d1 into stagingNov 11, 2025
9 checks passed
waleedlatif1 pushed a commit that referenced this pull request Nov 12, 2025
waleedlatif1 pushed a commit that referenced this pull request Nov 12, 2025
@waleedlatif1waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
@waleedlatif1
waleedlatif1 deleted the fix/copilot-width branch November 18, 2025 01:28
Sign up for freeto 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.

1 participant

@Sg312