diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 716728e2a..334c6873a 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -209,7 +209,7 @@ function createWindow(): void { // navigate the privileged window away from the app origin. External links go to // the OS browser. Keep this in place before exposing any daemon output to the renderer. mainWindow.webContents.setWindowOpenHandler(({ url }) => { - if (/^(https?:\/\/|mailto:)/.test(url)) { + if (/^https?:\/\//.test(url)) { void shell.openExternal(url); } return { action: "deny" }; diff --git a/frontend/src/renderer/components/ReportProblemDialog.tsx b/frontend/src/renderer/components/ReportProblemDialog.tsx index 07e91e097..243fbfef1 100644 --- a/frontend/src/renderer/components/ReportProblemDialog.tsx +++ b/frontend/src/renderer/components/ReportProblemDialog.tsx @@ -5,6 +5,7 @@ import { collectReportProblemDiagnostics, formatReportProblemDraft, reportProblemDestinationUrl, + reportProblemFieldCopy, type ReportProblemDiagnostics, type ReportProblemInput, type ReportProblemOutput, @@ -82,13 +83,17 @@ export function ReportProblemDialog({ open, onOpenChange }: ReportProblemDialogP () => formatReportProblemDraft(input, diagnostics, previewOutput), [input, diagnostics, previewOutput], ); + const fieldCopy = reportProblemFieldCopy(type); const copyDraft = async (output: ReportProblemOutput) => { setCopyError(null); setPreviewOutput(output); try { await aoBridge.clipboard.writeText(formatReportProblemDraft(input, diagnostics, output)); - window.open(reportProblemDestinationUrl(input, diagnostics, output), "_blank", "noopener,noreferrer"); + const destinationUrl = reportProblemDestinationUrl(input, diagnostics, output); + if (destinationUrl) { + window.open(destinationUrl, "_blank", "noopener,noreferrer"); + } setCopiedOutput(output); } catch (err) { setCopyError(err instanceof Error ? err.message : "Could not copy report draft"); @@ -140,39 +145,39 @@ export function ReportProblemDialog({ open, onOpenChange }: ReportProblemDialogP
setSummary(event.target.value)} - placeholder="One sentence summary" + placeholder={fieldCopy.summaryPlaceholder} />