You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bypass-permissions confirm dialog overflows and hides its buttons when the working directory path is long #226
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
Open a session whose working directory is deeply nested, e.g. /private/tmp/<long-folder-name>/<another-long-folder-name>/project.
In the permission mode selector, choose Bypass permissions.
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