Skip to content

Long file names break the "Add project" modal #1112

Closed

Description

@HernanJrG

Steps to reproduce

  1. Click on "New project"
  2. If folder or file name is long it causes it to break the modal
Image

Suggested fix:

Stop the dialog box from growing - packages/shared-ui/src/components/ui/dialog.tsx

// old
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-sm duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",

// new
"fixed left-[50%] top-[50%] z-50 grid grid-cols-[minmax(0,1fr)] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-sm duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
// old
"grid gap-4 overflow-y-auto px-4 pt-2 pb-[max(1rem,env(safe-area-inset-bottom))]",

// new
"grid grid-cols-[minmax(0,1fr)] gap-4 overflow-y-auto px-4 pt-2 pb-[max(1rem,env(safe-area-inset-bottom))]",

Make the file rows truncate properly - apps/app/src/components/dialogs/RemotePathBrowser.tsx

// old  — line 250 and line 266
<span className="truncate">{entry.name}</span>

// new
<span className="min-w-0 truncate" title={entry.name}>
  {entry.name}
</span>

Truncate the project name line - apps/app/src/components/dialogs/ProjectPathDialog.tsx

// old
<p className="text-sm text-muted-foreground">
  Project name:{" "}
  <span className="font-medium text-foreground">
    {derivedProjectName}
  </span>
</p>

// new
<p className="flex min-w-0 gap-1 text-sm text-muted-foreground">
  <span className="shrink-0">Project name:</span>
  <span className="min-w-0 truncate font-medium text-foreground">
    {derivedProjectName}
  </span>
</p>

Add a safety net on the form - apps/app/src/components/dialogs/ProjectPathDialog.tsx

// old
<form className="space-y-4" onSubmit={handleSubmit}>

// new
<form className="min-w-0 space-y-4" onSubmit={handleSubmit}>

Activity

  1. self-assigned this
    on Aug 7, 2026
  2. added a commit that references this issue on Aug 7, 2026
    5b5b9ed
  3. added a commit that references this issue on Aug 14, 2026
    440eae2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions