From e8b93e3298ded922596a473333f540d46f1949b0 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Fri, 3 Oct 2025 16:53:52 -0700 Subject: [PATCH] Label pro (#1440) > [!NOTE] > Conditionally appends the `pro` label to prefilled GitHub issue URLs for Dyad Pro users. > > - **Help dialog issue links**: > - For `Report a Bug`: build `labels` array starting with `bug`, append `pro` when `isDyadProUser` is true; pass labels via `labels=${labels}`. > - For `Session Report`: build `labels` array starting with `support`, append `pro` when `isDyadProUser` is true; pass labels via `labels=${labels}`. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1b0928f201ff9f38284445ee2f29ae2966a59403. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- src/components/HelpDialog.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/HelpDialog.tsx b/src/components/HelpDialog.tsx index 27c4948..91bdffc 100644 --- a/src/components/HelpDialog.tsx +++ b/src/components/HelpDialog.tsx @@ -110,7 +110,11 @@ ${debugInfo.logs.slice(-3_500) || "No logs available"} // Create the GitHub issue URL with the pre-filled body const encodedBody = encodeURIComponent(issueBody); const encodedTitle = encodeURIComponent("[bug] "); - const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=bug,filed-from-app&body=${encodedBody}`; + const labels = ["bug"]; + if (isDyadProUser) { + labels.push("pro"); + } + const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=${labels}&body=${encodedBody}`; // Open the pre-filled GitHub issue page IpcClient.getInstance().openExternalUrl(githubIssueUrl); @@ -230,7 +234,11 @@ Session ID: ${sessionId} const encodedBody = encodeURIComponent(issueBody); const encodedTitle = encodeURIComponent("[session report] "); - const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=support&body=${encodedBody}`; + const labels = ["support"]; + if (isDyadProUser) { + labels.push("pro"); + } + const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=${labels}&body=${encodedBody}`; IpcClient.getInstance().openExternalUrl(githubIssueUrl); handleClose();