The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): Send Diagnostics dialog no longer clips the link behind a horizontal scrollbar
Tekniumbdf10471b5df
diff --git a/apps/desktop/src/components/send-diagnostics-dialog.tsx b/apps/desktop/src/components/send-diagnostics-dialog.tsxindex e871d8fb476..e0f3ef1a848 100644--- a/apps/desktop/src/components/send-diagnostics-dialog.tsx+++ b/apps/desktop/src/components/send-diagnostics-dialog.tsx@@ -21,7 +21,7 @@ import {DialogTitle} from '@/components/ui/dialog'import { useI18n } from '@/i18n'-import { openExternalLink } from '@/lib/external-link'+import { ExternalLink as ExternalLinkAnchor, openExternalLink } from '@/lib/external-link'import { ExternalLink, Loader2Icon, Lock } from '@/lib/icons'import { $sendDiagnostics, confirmSendDiagnostics, dismissSendDiagnostics } from '@/store/send-diagnostics'@@ -97,12 +97,34 @@ export function SendDiagnosticsHost() {<DialogDescription className="text-left">{copy.doneDescription}</DialogDescription></DialogHeader>{(state.result?.viewUrl || state.result?.uploadId) && (- <div className="flex items-center gap-2 rounded-md border border-(--ui-stroke-tertiary) px-3 py-2">- <code className="min-w-0 flex-1 truncate text-[0.78rem] text-(--ui-text-secondary)">- {state.result.viewUrl ?? copy.uploadIdFallback(state.result.uploadId ?? '')}- </code>+ <div+ className="flex items-center gap-2 rounded-md border border-(--ui-stroke-tertiary) px-3 py-2"+ data-selectable-text="true"+ >+ {state.result.viewUrl ? (+ // A real anchor, not a <code> span: right-click resolves the+ // link context menu (open / copy URL), left-click opens it,+ // and the row's data-selectable-text keeps drag-to-select+ // working. `truncate` only clips the paint — selection and+ // copy still carry the full URL. `native` because the in-app+ // preview pane would open BEHIND this modal dialog; the+ // support buttons below already go to the system browser.+ <ExternalLinkAnchor+ className="min-w-0 flex-1 truncate font-mono text-[0.78rem] text-(--ui-text-secondary)"+ href={state.result.viewUrl}+ native+ title={state.result.viewUrl}+ >+ {state.result.viewUrl}+ </ExternalLinkAnchor>+ ) : (+ <code className="min-w-0 flex-1 truncate text-[0.78rem] text-(--ui-text-secondary)">+ {copy.uploadIdFallback(state.result.uploadId ?? '')}+ </code>+ )}<CopyButtonappearance="inline"+ className="shrink-0"label={copy.copyLink}text={state.result.viewUrl ?? state.result.uploadId ?? ''}/>diff --git a/apps/desktop/src/components/ui/dialog.tsx b/apps/desktop/src/components/ui/dialog.tsxindex 9c09fa87dbf..62fb0d7f78e 100644--- a/apps/desktop/src/components/ui/dialog.tsx+++ b/apps/desktop/src/components/ui/dialog.tsx@@ -148,7 +148,12 @@ function DialogContent({<DialogPortalContainerContext.Provider value={contentNode}>{/* Scroll lives on an inner box so this shell keeps a painted bottom radius. */}<div className="relative z-10 overflow-hidden rounded-xl border border-b-0 border-(--stroke-nous) bg-(--ui-chat-bubble-background)">- <div className={cn('grid max-h-[calc(85vh-5rem)] min-h-0 gap-3 overflow-y-auto p-4', bodyClassName)}>+ <div+ className={cn(+ 'grid max-h-[calc(85vh-5rem)] min-h-0 grid-cols-[minmax(0,1fr)] gap-3 overflow-y-auto p-4',+ bodyClassName+ )}+ >{children}</div></div>@@ -194,8 +199,17 @@ function DialogContent({<DialogPortalContainerContext.Provider value={contentNode}>{/* The BODY: layout and scroll. `min-h-0` lets this box shrink insidethe max-height of the shell. The overflow then scrolls here- instead of pushing the shell past the viewport. */}- <div className={cn('grid min-h-0 gap-3 overflow-y-auto rounded-[inherit] p-4', bodyClassName)}>+ instead of pushing the shell past the viewport. The explicit+ `minmax(0,1fr)` column keeps the implicit grid track from sizing+ to unbreakable content (a long URL in a nowrap <code>), which+ otherwise widens the track past the dialog and grows a horizontal+ scrollbar that clips the content instead of truncating it. */}+ <div+ className={cn(+ 'grid min-h-0 grid-cols-[minmax(0,1fr)] gap-3 overflow-y-auto rounded-[inherit] p-4',+ bodyClassName+ )}+ >{children}</div>{closeButton}