Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions ui/src/pages/GoalDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { projectsApi } from "../api/projects";
import { assetsApi } from "../api/assets";
import { usePanel } from "../context/PanelContext";
import { useCompany } from "../context/CompanyContext";
import { useToast } from "../context/ToastContext";
import { useDialog } from "../context/DialogContext";
import { useBreadcrumbs } from "../context/BreadcrumbContext";
import { queryKeys } from "../lib/queryKeys";
Expand All @@ -24,6 +25,7 @@ import type { Goal, Project } from "@paperclipai/shared";
export function GoalDetail() {
const { goalId } = useParams<{ goalId: string }>();
const { selectedCompanyId, setSelectedCompanyId } = useCompany();
const { pushToast } = useToast();
const { openNewGoal } = useDialog();
const { openPanel, closePanel } = usePanel();
const { setBreadcrumbs } = useBreadcrumbs();
Expand Down Expand Up @@ -122,6 +124,21 @@ export function GoalDetail() {
{goal.level}
</span>
<StatusBadge status={goal.status} />
<button
type="button"
className="text-xs font-mono text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
title="Click to copy goal ID"
onClick={async () => {
try {
await navigator.clipboard.writeText(goal.id);
pushToast({ title: "Goal ID copied", tone: "success" });
} catch {
pushToast({ title: "Failed to copy goal ID", tone: "error" });
}
}}
>
{goal.id.slice(0, 8)}
</button>
</div>

<InlineEditor
Expand Down
Loading