Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(calls): add call again button to call records (#3199)
Aidan Holloway-Bidwell0ffb58a7c820
diff --git a/js/app/packages/block-call/component/CallRecording/CallRecordingMetaStrip.tsx b/js/app/packages/block-call/component/CallRecording/CallRecordingMetaStrip.tsxindex 0f1d576821..7bfd361b36 100644--- a/js/app/packages/block-call/component/CallRecording/CallRecordingMetaStrip.tsx+++ b/js/app/packages/block-call/component/CallRecording/CallRecordingMetaStrip.tsx@@ -1,3 +1,4 @@+import { CallAgainButton } from '@channel/Call/CallAgainButton';import Subtitles from '@phosphor-icons/core/assets/regular/subtitles.svg';import SubtitlesSlash from '@phosphor-icons/core/assets/regular/subtitles-slash.svg';import UserCircle from '@phosphor-icons/core/assets/regular/user-circle.svg';@@ -42,6 +43,12 @@ export function CallRecordingMetaStrip(props: {</Show></div><div class="flex items-center gap-1.5">+ <Show when={!props.record.isActive}>+ <CallAgainButton+ channelId={props.record.channelId}+ class={cn(CALL_META_STRIP_TOGGLE_IDLE, 'shrink-0')}+ />+ </Show><buttontype="button"class={cn(diff --git a/js/app/packages/channel/Call/CallAgainButton.tsx b/js/app/packages/channel/Call/CallAgainButton.tsxnew file mode 100644index 0000000000..96744e9afe--- /dev/null+++ b/js/app/packages/channel/Call/CallAgainButton.tsx@@ -0,0 +1,21 @@+import PhoneCallIcon from '@macro-icons/wide/call.svg';+import { useCall } from './use-call';++export function CallAgainButton(props: { channelId: string; class?: string }) {+ const call = useCall(() => props.channelId);+ return (+ <button+ type="button"+ class={props.class}+ disabled={call.isJoining()}+ title="Call again"+ onClick={(e) => {+ e.stopPropagation();+ void call.joinCall();+ }}+ >+ <PhoneCallIcon class="size-4 shrink-0" />+ Call again+ </button>+ );+}diff --git a/js/app/packages/entity/src/composed/list-entity/wide-layout.tsx b/js/app/packages/entity/src/composed/list-entity/wide-layout.tsxindex 0c15edd9b2..8697489d52 100644--- a/js/app/packages/entity/src/composed/list-entity/wide-layout.tsx+++ b/js/app/packages/entity/src/composed/list-entity/wide-layout.tsx@@ -1,4 +1,5 @@import { useMaybeSoupView } from '@app/component/next-soup/soup-view/soup-view-context';+import { CallAgainButton } from '@channel/Call/CallAgainButton';import { cn } from '@ui';import { Match, Show, Switch } from 'solid-js';import { AttendanceBadge, SharedBadge } from '../../components/Badges';@@ -117,6 +118,12 @@ export function WideLayout(props: LayoutProps) {<Show when={isCallEntity(props.entity) && props.entity}>{(entity) => (<>+ <Show when={!entity().isActive}>+ <CallAgainButton+ channelId={entity().channelId}+ class="opacity-0 group-hover/narrow:opacity-100 transition-opacity flex shrink-0 items-center gap-1 rounded-xs border border-edge-muted px-1.5 py-1 text-xs font-medium text-ink-muted hover:bg-hover hover:text-ink focus-visible:outline-none"+ />+ </Show><Show when={(soupView?.activeTab() ?? 'all') === 'all'}><AttendanceBadge attended={entity().attended} /></Show>