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): improve call ui (#3220)
teo772182e7555c
diff --git a/js/app/packages/block-call/component/CallBlockAdapter.tsx b/js/app/packages/block-call/component/CallBlockAdapter.tsxindex e5345473cb..68eece8c52 100644--- a/js/app/packages/block-call/component/CallBlockAdapter.tsx+++ b/js/app/packages/block-call/component/CallBlockAdapter.tsx@@ -10,6 +10,7 @@ import { useSearchParams } from '@solidjs/router';import { createSignal, Match, Switch } from 'solid-js';import { CallRecordingBody } from './CallRecording/CallRecordingBody';import { CallRecordingSplitHeaderLoading } from './CallRecording/CallRecordingSplitHeader';+import { ModalsProvider } from './ModalsProvider';function isUnauthorized(error: Error | null): boolean {if (error instanceof MaybeResultError) {@@ -58,35 +59,37 @@ export function CallBlockAdapter(props: CallBlockProps) {});return (- <div class="h-full flex flex-col @container">- <Switch>- <Match when={callRecord.data}>- {(data) => (- <CallRecordingBody- data={data}- transcriptTarget={transcriptTarget}- />- )}- </Match>- <Match when={callRecord.isLoading}>- <CallRecordingSplitHeaderLoading />- <div class="flex flex-1 min-h-0 items-center justify-center text-sm text-ink-faint">- Loading call...- </div>- </Match>- <Match when={callRecord.isError && isUnauthorized(callRecord.error)}>- <CallRecordingSplitHeaderLoading />- <div class="flex flex-1 min-h-0 overflow-hidden">- <Unauthorized />- </div>- </Match>- <Match when={callRecord.isError}>- <CallRecordingSplitHeaderLoading />- <div class="flex flex-1 min-h-0 items-center justify-center text-sm text-failure">- Failed to load call recording.- </div>- </Match>- </Switch>- </div>+ <ModalsProvider>+ <div class="h-full flex flex-col @container">+ <Switch>+ <Match when={callRecord.data}>+ {(data) => (+ <CallRecordingBody+ data={data}+ transcriptTarget={transcriptTarget}+ />+ )}+ </Match>+ <Match when={callRecord.isLoading}>+ <CallRecordingSplitHeaderLoading />+ <div class="flex flex-1 min-h-0 items-center justify-center text-sm text-ink-faint">+ Loading call...+ </div>+ </Match>+ <Match when={callRecord.isError && isUnauthorized(callRecord.error)}>+ <CallRecordingSplitHeaderLoading />+ <div class="flex flex-1 min-h-0 overflow-hidden">+ <Unauthorized />+ </div>+ </Match>+ <Match when={callRecord.isError}>+ <CallRecordingSplitHeaderLoading />+ <div class="flex flex-1 min-h-0 items-center justify-center text-sm text-failure">+ Failed to load call recording.+ </div>+ </Match>+ </Switch>+ </div>+ </ModalsProvider>);}diff --git a/js/app/packages/block-call/component/CallRecording/CallRecordingBody.tsx b/js/app/packages/block-call/component/CallRecording/CallRecordingBody.tsxindex f5ba7178df..7e04666e3c 100644--- a/js/app/packages/block-call/component/CallRecording/CallRecordingBody.tsx+++ b/js/app/packages/block-call/component/CallRecording/CallRecordingBody.tsx@@ -1,29 +1,21 @@+import { CustomScrollbar } from '@core/component/CustomScrollbar';import type { CallRecord } from '@service-storage/generated/schemas/callRecord';-import { cn } from '@ui';+import { format } from 'date-fns';import type { Accessor } from 'solid-js';-import {- createEffect,- createMemo,- createSignal,- on,- onCleanup,- untrack,-} from 'solid-js';+import { createEffect, createMemo, createSignal, on, Show } from 'solid-js';+import { formatCallDuration } from '../../utils';import type { CallTranscriptTarget } from '../CallBlockAdapter';+import { CallTranscript } from '../CallTranscript';import {getActiveTranscriptSequenceNum,getSegmentVideoSeconds,sortTranscriptSegments,} from '../transcript-playback';-import {- CallRecordingMediaColumn,- type CallRecordingTimeUpdateSource,-} from './CallRecordingMediaColumn';-import { CallRecordingMetaStrip } from './CallRecordingMetaStrip';+import { CallRecordingParticipantsSection } from './CallRecordingParticipants';import { CallRecordingSplitHeader } from './CallRecordingSplitHeader';-import { CallRecordingTranscriptColumn } from './CallRecordingTranscriptColumn';+import { CallRecordingSummarySection } from './CallRecordingSummary';+import { CallRecordingVideo } from './CallRecordingVideo';import {- isCallRecordingStackedLayout,seekDedupeKey,shouldCoalesceSeekGenerationBump,} from './call-recording-utils';@@ -37,38 +29,20 @@ export function CallRecordingBody(props: {const [playbackSeconds, setPlaybackSeconds] = createSignal(0);const [allowFutureLead, setAllowFutureLead] = createSignal(true);const [videoRef, setVideoRef] = createSignal<HTMLVideoElement>();- const [containerRef, setContainerRef] = createSignal<HTMLDivElement>();- const [isStacked, setIsStacked] = createSignal(false);+ const [scrollRef, setScrollRef] = createSignal<HTMLDivElement>();const sortedTranscript = createMemo(() =>sortTranscriptSegments(record().transcript));+ const [videoSeekGeneration, setVideoSeekGeneration] = createSignal(0);+ let lastVideoSeekBumpKey: string | null = null;+ let lastVideoSeekBumpAtMs = 0;- // Anchor transcript-to-audio sync to the recording's actual start when- // available. `startedAt` is call-creation time; the room composite egress- // starts a few seconds later, so using `startedAt` makes the audio- // appear to lag the transcript on every segment. `recordingStartedAt`- // (captured from the LiveKit `egress_started` webhook) is the encoder's- // true t=0. Falls back to `startedAt` for older records.const timelineStartMs = createMemo(() => {const anchor = record().recordingStartedAt ?? record().startedAt;const ms = new Date(anchor).getTime();return Number.isFinite(ms) ? ms : null;});- const [transcriptOpen, setTranscriptOpen] = createSignal(true);- const [participantsOpen, setParticipantsOpen] = createSignal(false);- const [layoutDefaultsSeeded, setLayoutDefaultsSeeded] = createSignal(false);- const [suppressWideParticipantsMotion, setSuppressWideParticipantsMotion] =- createSignal(false);- const [participantsContentRef, setParticipantsContentRef] =- createSignal<HTMLDivElement>();- const [participantsContentHeight, setParticipantsContentHeight] =- createSignal(0);- const [videoSeekGeneration, setVideoSeekGeneration] = createSignal(0);- let lastVideoSeekBumpKey: string | null = null;- let lastVideoSeekBumpAtMs = 0;- let prevLayoutStacked: boolean | undefined;-const bumpVideoSeekGeneration = (seconds: number) => {if (!Number.isFinite(seconds)) return;const key = seekDedupeKey(seconds);@@ -98,7 +72,7 @@ export function CallRecordingBody(props: {const handleTimeUpdate = (seconds: number,- source: CallRecordingTimeUpdateSource+ source: 'playback' | 'seeking' | 'seeked') => {setPlaybackSeconds(seconds);setAllowFutureLead(source === 'playback');@@ -135,126 +109,94 @@ export function CallRecordingBody(props: {() => props.transcriptTarget?.(),(target) => {if (!target) return;- if (hasTranscripts()) setTranscriptOpen(true);goToTranscriptSegment(target.transcriptId);}));- const toggleTranscript = () => {- setTranscriptOpen((open) => {- const next = !open;- if (next && isStacked()) setParticipantsOpen(false);- return next;- });- };-- const toggleParticipants = () => {- setParticipantsOpen((open) => {- const next = !open;- if (next && isStacked()) setTranscriptOpen(false);- return next;- });- };-- createEffect(() => {- const el = containerRef();- if (!el) return;-- const updateLayout = () => {- const stacked = isCallRecordingStackedLayout(el.clientWidth);- setIsStacked(stacked);-- if (!layoutDefaultsSeeded()) {- if (!stacked) setSuppressWideParticipantsMotion(true);- setParticipantsOpen(!stacked);- setLayoutDefaultsSeeded(true);- prevLayoutStacked = stacked;- queueMicrotask(() => setSuppressWideParticipantsMotion(false));- return;- }-- const prev = prevLayoutStacked;- if (prev !== undefined && prev !== stacked) {- if (stacked) {- if (transcriptOpen() && participantsOpen())- setParticipantsOpen(false);- } else {- setSuppressWideParticipantsMotion(true);- setTranscriptOpen(hasTranscripts());- setParticipantsOpen(true);- queueMicrotask(() => setSuppressWideParticipantsMotion(false));- }- }-- prevLayoutStacked = stacked;- };+ const callTitle = createMemo(() => record().channelName ?? 'Call Recording');- const observer = new ResizeObserver(updateLayout);- observer.observe(el);- untrack(() => updateLayout());- onCleanup(() => observer.disconnect());+ const formattedDate = createMemo(() => {+ const ended = record().endedAt;+ if (!ended) return null;+ return format(new Date(ended), 'MMM d, yyyy · h:mm a');});- createEffect(() => {- const el = participantsContentRef();- if (!el) return;- const updateHeight = () => setParticipantsContentHeight(el.scrollHeight);- updateHeight();- const observer = new ResizeObserver(updateHeight);- observer.observe(el);- onCleanup(() => observer.disconnect());+ const formattedDuration = createMemo(() => {+ const ms = record().durationMs;+ if (!ms) return null;+ return formatCallDuration(ms);});return (<><CallRecordingSplitHeader record={record} />- <CallRecordingMetaStrip- record={record()}- transcriptOpen={transcriptOpen()}- participantsOpen={participantsOpen()}- onToggleTranscript={toggleTranscript}- onToggleParticipants={toggleParticipants}- /><div- ref={setContainerRef}- class={cn(- 'grid min-h-0 flex-1 overflow-hidden grid-cols-1',- isStacked()- ? 'grid-rows-1'- : 'transition-[grid-template-columns] duration-300 linear grid-rows-1',- !isStacked() &&- (transcriptOpen()- ? 'grid-cols-[minmax(0,6fr)_minmax(0,4fr)]'- : 'grid-cols-[minmax(0,1fr)_minmax(0,0fr)]')- )}+ class="relative flex-1 min-h-0 overflow-y-auto scrollbar-hidden"+ ref={setScrollRef}>- <div class="contents @[860px]:contents">- <CallRecordingMediaColumn- record={record}- hasTranscripts={hasTranscripts}- isStacked={isStacked}- participantsOpen={participantsOpen}- suppressWideParticipantsMotion={suppressWideParticipantsMotion}- participantsContentHeight={participantsContentHeight}- setParticipantsContentRef={setParticipantsContentRef}- onTimeUpdate={handleTimeUpdate}- setVideoRef={setVideoRef}- />- <CallRecordingTranscriptColumn- record={record}- hasTranscripts={hasTranscripts}- isStacked={isStacked}- transcriptOpen={transcriptOpen}- participantsOpen={participantsOpen}- activeSequenceNum={activeSequenceNum}- timelineStartMs={timelineStartMs}- videoSeekGeneration={videoSeekGeneration}- onToggleTranscript={toggleTranscript}- onToggleParticipants={toggleParticipants}- onSeekToSeconds={seekToSeconds}- />+ <div class="mx-auto max-w-3xl min-w-0 px-6 pt-10 pb-16">+ <div class="flex flex-col gap-10">+ <header>+ <h1 class="text-4xl font-semibold text-ink text-balance">+ {callTitle()}+ </h1>+ <div class="mt-3 flex flex-wrap items-center gap-x-2 text-sm text-ink-muted">+ <Show when={formattedDate()}>+ {(date) => <span>{date()}</span>}+ </Show>+ <Show when={formattedDuration()}>+ {(dur) => (+ <>+ <span class="text-ink-extra-muted">·</span>+ <span>{dur()}</span>+ </>+ )}+ </Show>+ <Show when={record().isActive}>+ <span class="text-success font-medium">In progress</span>+ </Show>+ </div>+ </header>++ <CallRecordingSummarySection record={record} />++ <CallRecordingParticipantsSection record={record} />++ <Show when={record().recordingUrl}>+ {(url) => (+ <section class="flex flex-col gap-3">+ <h3 class="text-sm font-semibold text-ink">Recording</h3>+ <div class="overflow-hidden rounded border border-edge-muted/50">+ <CallRecordingVideo+ url={url()}+ onTimeUpdate={handleTimeUpdate}+ setVideoRef={setVideoRef}+ />+ </div>+ </section>+ )}+ </Show>++ <Show when={hasTranscripts()}>+ <section class="flex flex-col gap-3">+ <h3 class="text-sm font-semibold text-ink">Transcript</h3>+ <div class="flex flex-col max-h-[min(600px,60vh)] overflow-hidden rounded border border-edge-muted/50">+ <CallTranscript+ transcript={record().transcript}+ channelId={record().channelId}+ timelineStartMs={timelineStartMs()}+ activeSequenceNum={activeSequenceNum()}+ videoSeekGeneration={videoSeekGeneration()}+ onSeekToSeconds={seekToSeconds}+ hideHeader+ />+ </div>+ </section>+ </Show>+ </div></div>+ <CustomScrollbar scrollContainer={scrollRef} /></div></>);diff --git a/js/app/packages/block-call/component/CallRecording/CallRecordingMetaStrip.tsx b/js/app/packages/block-call/component/CallRecording/CallRecordingMetaStrip.tsxindex 7bfd361b36..f1771be1dd 100644--- a/js/app/packages/block-call/component/CallRecording/CallRecordingMetaStrip.tsx+++ b/js/app/packages/block-call/component/CallRecording/CallRecordingMetaStrip.tsx@@ -1,29 +1,15 @@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';-import UserCircleMinus from '@phosphor-icons/core/assets/regular/user-circle-minus.svg';import type { CallRecord } from '@service-storage/generated/schemas/callRecord';-import { cn } from '@ui';import { format } from 'date-fns';import { Show } from 'solid-js';import { formatCallDuration } from '../../utils';-import {- CALL_META_STRIP_TOGGLE_ACTIVE,- CALL_META_STRIP_TOGGLE_IDLE,-} from './call-recording-utils';+import { CALL_META_STRIP_TOGGLE_IDLE } from './call-recording-utils';function formatCallDate(dateStr: string): string {return format(new Date(dateStr), 'MMM d, yyyy h:mm a');}-export function CallRecordingMetaStrip(props: {- record: CallRecord;- transcriptOpen: boolean;- participantsOpen: boolean;- onToggleTranscript: () => void;- onToggleParticipants: () => void;-}) {+export function CallRecordingMetaStrip(props: { record: CallRecord }) {return (<div class="flex shrink-0 items-center justify-between gap-3 border-b border-edge-muted/50 px-4 py-2"><div class="flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-ink-muted">@@ -46,55 +32,9 @@ export function CallRecordingMetaStrip(props: {<Show when={!props.record.isActive}><CallAgainButtonchannelId={props.record.channelId}- class={cn(CALL_META_STRIP_TOGGLE_IDLE, 'shrink-0')}+ class={CALL_META_STRIP_TOGGLE_IDLE + ' shrink-0'}/></Show>- <button- type="button"- class={cn(- 'shrink-0',- props.transcriptOpen- ? CALL_META_STRIP_TOGGLE_ACTIVE- : CALL_META_STRIP_TOGGLE_IDLE- )}- aria-expanded={props.transcriptOpen}- aria-label={- props.transcriptOpen ? 'Hide transcript' : 'Show transcript'- }- title={props.transcriptOpen ? 'Hide transcript' : 'Show transcript'}- onClick={() => props.onToggleTranscript()}- >- <Show when={props.transcriptOpen}>- <Subtitles class="size-4 shrink-0" />- </Show>- <Show when={!props.transcriptOpen}>- <SubtitlesSlash class="size-4 shrink-0" />- </Show>- </button>- <button- type="button"- class={cn(- 'shrink-0',- props.participantsOpen- ? CALL_META_STRIP_TOGGLE_ACTIVE- : CALL_META_STRIP_TOGGLE_IDLE- )}- aria-expanded={props.participantsOpen}- aria-label={- props.participantsOpen ? 'Hide participants' : 'Show participants'- }- title={- props.participantsOpen ? 'Hide participants' : 'Show participants'- }- onClick={() => props.onToggleParticipants()}- >- <Show when={props.participantsOpen}>- <UserCircle class="size-4 shrink-0" />- </Show>- <Show when={!props.participantsOpen}>- <UserCircleMinus class="size-4 shrink-0" />- </Show>- </button></div></div>);diff --git a/js/app/packages/block-call/component/CallRecording/CallRecordingParticipants.tsx b/js/app/packages/block-call/component/CallRecording/CallRecordingParticipants.tsxindex 1569bdbf33..c6455c3364 100644--- a/js/app/packages/block-call/component/CallRecording/CallRecordingParticipants.tsx+++ b/js/app/packages/block-call/component/CallRecording/CallRecordingParticipants.tsx@@ -1,42 +1,23 @@import { useSplitLayout } from '@app/component/split-layout/layout';-import { ParticipantsEmptyState } from '@channel/Participants/ParticipantsEmptyState';-import { ParticipantsSearchInput } from '@channel/Participants/ParticipantsSearchInput';import { UserIcon } from '@core/component/UserIcon';import { idToEmail } from '@core/user';import { isOk } from '@core/util/maybeResult';-import UsersThree from '@phosphor-icons/core/assets/regular/users-three.svg';import { commsServiceClient } from '@service-comms/client';import type { CallRecord } from '@service-storage/generated/schemas/callRecord';import type { Accessor } from 'solid-js';-import { createMemo, createSignal, For, Show } from 'solid-js';-import { CallRecordingSectionShell } from './CallRecordingSectionShell';+import { createMemo, For } from 'solid-js';import { dedupeCallRecordingParticipants } from './call-recording-utils';export function CallRecordingParticipantsSection(props: {record: Accessor<CallRecord>;- withShell?: boolean;- open?: boolean;}) {const { replaceOrInsertSplit } = useSplitLayout();- const [searchQuery, setSearchQuery] = createSignal('');const participants = createMemo(() =>dedupeCallRecordingParticipants(props.record().participants,props.record().createdBy));- const filteredParticipants = createMemo(() => {- const query = searchQuery().trim().toLowerCase();- if (query.length === 0) return participants();- return participants().filter((participant) => {- const email = idToEmail(participant.userId).toLowerCase();- return (- email.includes(query) ||- participant.userId.toLowerCase().includes(query) ||- participant.role.includes(query)- );- });- });const openDirectMessage = async (participantId: string) => {const result = await commsServiceClient.getOrCreateDirectMessage({@@ -50,53 +31,31 @@ export function CallRecordingParticipantsSection(props: {});};- const body = (- <div class="min-h-0 flex h-full flex-col gap-2 p-4 pt-3">- <ParticipantsSearchInput value={searchQuery()} onInput={setSearchQuery} />- <Show- when={filteredParticipants().length > 0}- fallback={<ParticipantsEmptyState searchQuery={searchQuery()} />}- >- <div class="min-h-0 flex-1 overflow-y-auto scrollbar-hidden">- <div class="flex flex-col border-t border-edge-muted/50">- <For each={filteredParticipants()}>- {(participant) => (- <button- type="button"- class="flex items-center gap-2 min-h-10 p-2 text-sm w-full border-b border-edge-muted/50 last:border-b-0 hover:bg-hover text-left"- onClick={() => openDirectMessage(participant.userId)}- >- <div class="shrink-0">- <UserIcon- id={participant.userId}- size="sm"- isDeleted={false}- />- </div>- <span class="font-semibold truncate flex-1 text-ink">- {idToEmail(participant.userId)}- </span>- <span class="text-xs font-mono text-ink-extra-muted uppercase font-light shrink-0">- {participant.role}- </span>- </button>- )}- </For>- </div>- </div>- </Show>- </div>- );-- if (props.withShell === false) return body;-return (- <CallRecordingSectionShell- title="Participants"- icon={<UsersThree class="size-4 text-ink shrink-0" />}- open={props.open}- >- {body}- </CallRecordingSectionShell>+ <section class="flex flex-col gap-3">+ <h3 class="text-sm font-semibold text-ink">+ Participants+ <span class="ml-1.5 text-ink-muted font-normal tabular-nums">+ {participants().length}+ </span>+ </h3>+ <div class="flex flex-wrap gap-2" role="list">+ <For each={participants()}>+ {(participant) => (+ <button+ type="button"+ role="listitem"+ class="inline-flex items-center gap-1.5 rounded-full border border-edge-muted/50 py-1 pr-2.5 pl-1 text-sm text-ink transition-colors hover:bg-hover"+ onClick={() => openDirectMessage(participant.userId)}+ >+ <UserIcon id={participant.userId} size="sm" isDeleted={false} />+ <span class="truncate max-w-48">+ {idToEmail(participant.userId)}+ </span>+ </button>+ )}+ </For>+ </div>+ </section>);}diff --git a/js/app/packages/block-call/component/CallRecording/CallRecordingSplitHeader.tsx b/js/app/packages/block-call/component/CallRecording/CallRecordingSplitHeader.tsxindex 6b9c07d91e..05b6ca0411 100644--- a/js/app/packages/block-call/component/CallRecording/CallRecordingSplitHeader.tsx+++ b/js/app/packages/block-call/component/CallRecording/CallRecordingSplitHeader.tsx@@ -1,6 +1,28 @@-import { SplitHeaderLeft } from '@app/component/split-layout/components/SplitHeader';+import {+ ChatWithAgentButton,+ ChatWithAgentIcon,+ openChatWithAgent,+} from '@app/component/ChatWithAgentButton';+import {+ type BlockTool,+ ResponsiveBlockToolbar,+ ResponsivePermissionsBadge,+} from '@app/component/ResponsiveBlockToolbar';+import {+ SplitHeaderLeft,+ SplitHeaderRight,+} from '@app/component/split-layout/components/SplitHeader';import { StaticSplitLabel } from '@app/component/split-layout/components/SplitLabel';+import { useCall } from '@channel/Call/use-call';+import { useBlockId } from '@core/block';+import { BlockLiveIndicators } from '@core/component/LiveIndicators';+import {+ getShareDrawerRecipientInput,+ ShareTrigger,+ useShareDialogContext,+} from '@core/component/TopBar/ShareButton';import PhoneCallIcon from '@macro-icons/wide/call.svg';+import IconShared from '@macro-icons/wide/share.svg';import type { CallRecord } from '@service-storage/generated/schemas/callRecord';import type { Accessor } from 'solid-js';@@ -25,18 +47,79 @@ export function CallRecordingSplitHeader(props: {record: Accessor<CallRecord>;}) {const record = props.record;+ const blockId = useBlockId();+ const shareCtx = useShareDialogContext();+ const callName = () => record().channelName ?? 'Call';+ const call = useCall(() => record().channelId);++ const tools: BlockTool[] = [+ {+ label: 'Call Again',+ icon: PhoneCallIcon,+ action: () => call.joinCall(),+ condition: () => !record().isActive,+ },+ {+ label: 'Chat',+ icon: ChatWithAgentIcon,+ action: () =>+ openChatWithAgent({+ type: 'document',+ id: blockId,+ name: callName(),+ fileType: 'call',+ }),+ divideAbove: true,+ buttonComponent: () => (+ <ChatWithAgentButton+ entity={{+ type: 'document',+ id: blockId,+ name: callName(),+ fileType: 'call',+ }}+ />+ ),+ },+ {+ label: 'Share',+ icon: IconShared,+ action: () => shareCtx.open(),+ buttonComponent: () => <ShareTrigger />,+ focusTarget: getShareDrawerRecipientInput,+ },+ ];+return (- <SplitHeaderLeft>- <div class="h-full my-auto flex min-w-0 items-center justify-start gap-3">- <div class="ph-no-capture z-page-overlay relative flex h-full max-w-full min-w-0 shrink items-center gap-2">- <StaticSplitLabel- label={record().channelName ?? 'Call'}- icon={- <PhoneCallIcon class="size-4 touch:size-6 shrink-0 text-ink-muted" />- }- />+ <>+ <SplitHeaderLeft>+ <div class="h-full my-auto flex min-w-0 items-center justify-start gap-3">+ <div class="ph-no-capture z-page-overlay relative flex h-full max-w-full min-w-0 shrink items-center gap-2">+ <StaticSplitLabel+ label={callName()}+ icon={+ <PhoneCallIcon class="size-4 touch:size-6 shrink-0 text-ink-muted" />+ }+ />+ </div></div>- </div>- </SplitHeaderLeft>+ </SplitHeaderLeft>++ <SplitHeaderRight>+ <div class="-order-1">+ <BlockLiveIndicators />+ </div>+ </SplitHeaderRight>++ <ResponsivePermissionsBadge />++ <ResponsiveBlockToolbar+ tools={tools}+ ops={[{ op: 'copy' }]}+ id={blockId}+ itemType="call"+ name={callName()}+ />+ </>);}diff --git a/js/app/packages/block-call/component/CallRecording/CallRecordingSummary.tsx b/js/app/packages/block-call/component/CallRecording/CallRecordingSummary.tsxindex 6298208256..34e7f36673 100644--- a/js/app/packages/block-call/component/CallRecording/CallRecordingSummary.tsx+++ b/js/app/packages/block-call/component/CallRecording/CallRecordingSummary.tsx@@ -1,8 +1,6 @@-import Notepad from '@phosphor-icons/core/assets/regular/notepad.svg';import type { CallRecord } from '@service-storage/generated/schemas/callRecord';import type { Accessor } from 'solid-js';-import { createMemo, createSignal, Show } from 'solid-js';-import { CallRecordingSectionShell } from './CallRecordingSectionShell';+import { createMemo, Show } from 'solid-js';export function CallRecordingSummarySection(props: {record: Accessor<CallRecord>;@@ -13,24 +11,36 @@ export function CallRecordingSummarySection(props: {const trimmed = value.trim();return trimmed.length > 0 ? trimmed : null;});- const [open, setOpen] = createSignal(true);++ const isPending = createMemo(+ () =>+ !summary() &&+ !props.record().isActive &&+ props.record().transcript.length > 0+ );++ const shouldShow = createMemo(() => summary() || isPending());return (- <Show when={summary()}>- {(text) => (- <CallRecordingSectionShell- title="Summary"- icon={<Notepad class="size-4 text-ink shrink-0" />}- accordion- accordionOpenMaxVh={45}- open={open()}- onToggle={() => setOpen((v) => !v)}+ <Show when={shouldShow()}>+ <section class="flex flex-col gap-3">+ <h3 class="text-sm font-semibold text-ink">Summary</h3>+ <Show+ when={summary()}+ fallback={+ <div class="flex items-center gap-2 animate-pulse">+ <div class="size-3.5 shrink-0 animate-spin rounded-full border-2 border-ink-extra-muted border-t-ink-muted" />+ <span class="text-sm text-ink-faint">Generating summary…</span>+ </div>+ }>- <div class="min-h-0 flex-1 overflow-y-auto scrollbar-hidden px-4 py-3">- <p class="whitespace-pre-wrap text-sm text-ink">{text()}</p>- </div>- </CallRecordingSectionShell>- )}+ {(text) => (+ <p class="text-sm/6 text-ink text-pretty whitespace-pre-wrap">+ {text()}+ </p>+ )}+ </Show>+ </section></Show>);}diff --git a/js/app/packages/block-call/component/CallRecording/CallRecordingTranscriptColumn.tsx b/js/app/packages/block-call/component/CallRecording/CallRecordingTranscriptColumn.tsxindex 2c793ff870..71f9d7290e 100644--- a/js/app/packages/block-call/component/CallRecording/CallRecordingTranscriptColumn.tsx+++ b/js/app/packages/block-call/component/CallRecording/CallRecordingTranscriptColumn.tsx@@ -76,10 +76,7 @@ export function CallRecordingTranscriptColumn(props: {accordionOpenMaxVh={38}onToggle={props.onToggleParticipants}>- <CallRecordingParticipantsSection- record={props.record}- withShell={false}- />+ <CallRecordingParticipantsSection record={props.record} /></CallRecordingSectionShell></Show></div>diff --git a/js/app/packages/block-call/component/CallRecording/CallRecordingVideo.tsx b/js/app/packages/block-call/component/CallRecording/CallRecordingVideo.tsxindex 4ac6c1c250..c33e667d73 100644--- a/js/app/packages/block-call/component/CallRecording/CallRecordingVideo.tsx+++ b/js/app/packages/block-call/component/CallRecording/CallRecordingVideo.tsx@@ -33,7 +33,7 @@ export function CallRecordingVideo(props: {onCleanup(stopTicking);return (- <div class="p-4 h-full min-h-0 flex justify-center items-start overflow-hidden">+ <div class="p-4 flex justify-center items-start overflow-hidden"><videoref={props.setVideoRef}class="max-w-full max-h-full rounded transition-opacity duration-200"diff --git a/js/app/packages/block-call/component/ModalsProvider.tsx b/js/app/packages/block-call/component/ModalsProvider.tsxnew file mode 100644index 0000000000..f1add6f334--- /dev/null+++ b/js/app/packages/block-call/component/ModalsProvider.tsx@@ -0,0 +1,25 @@+import { useBlockId } from '@core/block';+import { DetailsDrawer } from '@core/component/DetailsDrawer';+import {+ ShareBlockModal,+ ShareDialogContext,+} from '@core/component/TopBar/ShareButton';+import { createSignal, type ParentProps } from 'solid-js';++export function ModalsProvider(props: ParentProps) {+ const blockId = useBlockId();+ const [shareOpen, setShareOpen] = createSignal(false);+ return (+ <ShareDialogContext.Provider+ value={{+ isOpen: shareOpen,+ open: () => setShareOpen(true),+ close: () => setShareOpen(false),+ }}+ >+ {props.children}+ <DetailsDrawer documentId={blockId} />+ <ShareBlockModal />+ </ShareDialogContext.Provider>+ );+}