Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(pr): add copy link action to PR block menu (#8290)

Jacob Beckerman99c3900636e4
diff --git a/apps/web/src/features/block-pr/component/PrSplitHeader.tsx b/apps/web/src/features/block-pr/component/PrSplitHeader.tsx
index e714dc884e..ca3375d4ca 100644
--- a/apps/web/src/features/block-pr/component/PrSplitHeader.tsx
+++ b/apps/web/src/features/block-pr/component/PrSplitHeader.tsx
@@ -8,9 +8,11 @@ import {
StaticSplitLabel,
} from '@components/app/split-layout/components/SplitLabel';
import { Permissions } from '@core/component/SharePermissions';
+import { toast } from '@core/component/Toast/Toast';
import { isTouchDevice } from '@core/mobile/isTouchDevice';
import { openExternalUrl } from '@core/util/url';
import GithubIcon from '@icon/mcp-github.svg';
+import Link from '@phosphor/link.svg';
import type { GithubPullRequest } from '@service-storage/generated/schemas';
import type { PrRef } from '../util/prKey';
@@ -30,7 +32,17 @@ export function PrSplitHeader(props: {
const title = () => props.enrichment?.name ?? prDisplayName(props.prRef);
const githubUrl = () => props.enrichment?.url ?? prHtmlUrl(props.prRef);
+ const copyLink = async () => {
+ await navigator.clipboard.writeText(githubUrl());
+ toast.success('Link copied to clipboard');
+ };
+
const ops: FileOperation[] = [
+ {
+ label: 'Copy link',
+ icon: Link,
+ action: copyLink,
+ },
{
label: 'Open on GitHub',
icon: GithubIcon,