Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • fix workspace name truncation on sidebar preview

Type of Change

  • Bug fix

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 Dec 29, 2025

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Dec 29, 2025 5:38pm

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 29, 2025

Greptile Summary

  • Fixed workspace name truncation in collapsed sidebar mode by adding conditional max-w-[120px] constraint
  • Changed collapsed header container from fixed max-w-[232px] to dynamic w-fit for proper auto-sizing
  • Hides Invite badge in collapsed mode to prevent layout overflow
  • Applied conditional layout classes to prevent min-width conflicts when collapsed

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are focused, well-implemented UI fixes that properly handle conditional styling based on collapse state. No logical issues or security concerns found.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.tsx Fixed workspace name truncation in collapsed mode by adding conditional max-width constraint and hiding Invite badge
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx Changed collapsed header container from fixed max-width to dynamic w-fit for proper sizing

Sequence Diagram

sequenceDiagram
    participant User
    participant Sidebar
    participant WorkspaceHeader
    participant Store as SidebarStore

    User->>Sidebar: Click collapse toggle
    Sidebar->>Store: setIsCollapsed(true)
    Store-->>Sidebar: isCollapsed = true
    
    alt Sidebar Collapsed
        Sidebar->>WorkspaceHeader: Render with isCollapsed=true
        WorkspaceHeader->>WorkspaceHeader: Apply max-w-[120px] truncate to workspace name
        WorkspaceHeader->>WorkspaceHeader: Hide Invite badge
        WorkspaceHeader->>WorkspaceHeader: Remove -mx-[6px] min-w-0 max-w-full from button
        WorkspaceHeader->>WorkspaceHeader: Set parent gap to gap-[8px]
        WorkspaceHeader-->>Sidebar: Return minimal pill UI with w-fit
    else Sidebar Expanded
        Sidebar->>WorkspaceHeader: Render with isCollapsed=false
        WorkspaceHeader->>WorkspaceHeader: Apply truncate only to workspace name
        WorkspaceHeader->>WorkspaceHeader: Show Invite badge
        WorkspaceHeader->>WorkspaceHeader: Apply min-w-0 flex-1 for overflow handling
        WorkspaceHeader-->>Sidebar: Return full header with justify-between
    end
Loading

@waleedlatif1 waleedlatif1 merged commit da1f668 into staging Dec 29, 2025
11 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/sidebar branch December 29, 2025 19:11
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