Skip to content

Bypass-permissions confirm dialog overflows and hides its buttons when the working directory path is long #226

Closed

Description

@GoDiao

What happens

When a session's working directory has a long path (roughly 100+ characters with no spaces), the Enable bypass permissions? confirm dialog overflows. The path box runs past the dialog's right edge, and the Cancel / Enable buttons in the footer can no longer be seen or clicked.

Steps to reproduce

  1. Open a session whose working directory is deeply nested, e.g. /private/tmp/<long-folder-name>/<another-long-folder-name>/project.
  2. In the permission mode selector, choose Bypass permissions.
  3. The confirm dialog opens with the path spilling out of the box, and the buttons are gone.

Expected

The path is truncated with an ellipsis inside the box (the full path is already in the tooltip). The dialog keeps its width, and the buttons stay visible.

Where to look

  • The dialog body is in desktop/src/components/controls/PermissionModeSelector.tsx (around lines 198-235). The path is a <code className="... truncate"> inside a flex row.
  • It renders through ConfirmDialog (desktop/src/components/shared/ConfirmDialog.tsx), built on the shadcn alert-dialog primitives in desktop/src/components/shared/ui/.
  • Likely cause, to be confirmed: the dialog's layout children are grid or flex items with the default min-width: auto, so an unbreakable string widens them past the dialog and truncate never applies. If so, the fix belongs where it helps every ConfirmDialog with long content (for example min-w-0 on the right child), not only this path row.

Done when

  • The dialog stays within its width for a long path, the path shows an ellipsis, and both buttons are visible and clickable.
  • A vitest covers it and fails without the fix.
  • Checks in AGENTS.md pass: bun run lint and bun run test -- --run in desktop/. New code has no comments.

Activity

  1. added
    bug
    good first issue
    area:desktop
    area:ux
    difficulty:1
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:desktoparea:uxbugdifficulty:1good first issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions