GeezerVison is showing github.com — fix(web): a deleted task's URL is not shown, and only full URLs copy · pingdotgg/t3code@ed888aa
File tree
Expand file treeCollapse file tree
Open diff view settings
apps/web/src/components/settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: apps/web/src/components/settings/ScheduledTasksSettings.tsx +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -707,6 +707,8 @@ function WebhookEndpointField({ |
707 | 707 | size="sm" |
708 | 708 | variant="outline" |
709 | 709 | type="button" |
| 710 | + // A bare path is not a URL a sender can call. |
| 711 | + disabled={!url.startsWith("http")} |
710 | 712 | onClick={() => copyToClipboard(url, undefined)} |
711 | 713 | > |
712 | 714 | <CopyIcon /> |
@@ -782,7 +784,10 @@ function ScheduledTaskEditorDialog({ |
782 | 784 | tasksQuery.data !== null && |
783 | 785 | !tasksQuery.data.tasks.some((entry) => entry.id === draft.editingId); |
784 | 786 | // The live row, so a rotated URL shows up without reopening the dialog. |
785 | | - const liveTask = tasksQuery.data?.tasks.find((entry) => entry.id === draft.editingId) ?? task; |
| 787 | + // Once the list has loaded, a missing task is gone; don't keep showing its URL. |
| 788 | + const liveTask = tasksQuery.data |
| 789 | + ? (tasksQuery.data.tasks.find((entry) => entry.id === draft.editingId) ?? null) |
| 790 | + : task; |
786 | 791 | const selectedProjectId = draft.projectId || projects[0]?.id || ""; |
787 | 792 | const selectedProject = projects.find((project) => project.id === selectedProjectId); |
788 | 793 |
|
|