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.

fix(ui): dechud calls

teo3d709d866229
diff --git a/js/app/packages/channel/Call/CallControls/CallControlButton.tsx b/js/app/packages/channel/Call/CallControls/CallControlButton.tsx
deleted file mode 100644
index 9634d4050f..0000000000
--- a/js/app/packages/channel/Call/CallControls/CallControlButton.tsx
+++ /dev/null
@@ -1,95 +0,0 @@
-import type { OverrideComponentProps } from '@kobalte/core';
-import { cn } from '@ui';
-import {
- type Component,
- createMemo,
- createSignal,
- type JSX,
- splitProps,
-} from 'solid-js';
-
-export type CallControlButtonSize = 'sm' | 'md';
-export type CallControlButtonVariant = 'default' | 'active' | 'danger';
-
-export const callControlButtonStyles = {
- base: 'flex items-center justify-center outline outline-transarent bg-transparent transition-colors',
-
- size: {
- sm: 'w-6 h-6 rounded-md',
- md: 'w-10 h-10 rounded-lg',
- },
-
- variant: {
- default: 'text-ink outline-edge-muted hover:bg-edge/20',
- active: 'text-success outline-success bg-success/25 hover:bg-success/20',
- danger: 'text-failure outline-failure/50 hover:bg-failure hover:text-ink',
- },
-};
-
-export type CallControlButtonProps = OverrideComponentProps<
- 'button',
- {
- onClick: () => Promise<void> | void;
- active?: boolean;
- danger?: boolean;
- variant?: CallControlButtonVariant;
- children?: JSX.Element;
- disabled?: boolean;
- size?: CallControlButtonSize;
- class?: string;
- }
->;
-
-export const CallControlButton: Component<CallControlButtonProps> = (props) => {
- const [local, others] = splitProps(props, [
- 'active',
- 'danger',
- 'variant',
- 'size',
- 'onClick',
- 'disabled',
- 'class',
- 'children',
- ]);
-
- const [isPending, setIsPending] = createSignal(false);
- const interactionDisabled = createMemo(() => isPending() || !!local.disabled);
-
- const handleClick = async () => {
- if (interactionDisabled()) return;
- setIsPending(true);
- try {
- await local.onClick();
- } catch (e) {
- console.error('ControlButton action failed', e);
- } finally {
- setIsPending(false);
- }
- };
-
- const size = () => local.size ?? 'md';
-
- const variant = (): CallControlButtonVariant => {
- if (local.variant) return local.variant;
- if (local.danger) return 'danger';
- if (local.active) return 'active';
- return 'default';
- };
-
- return (
- <button
- onClick={handleClick}
- disabled={interactionDisabled()}
- class={cn(
- callControlButtonStyles.base,
- callControlButtonStyles.size[size()],
- callControlButtonStyles.variant[variant()],
- interactionDisabled() && 'pointer-events-none opacity-50',
- local.class
- )}
- {...others}
- >
- {local.children}
- </button>
- );
-};
diff --git a/js/app/packages/channel/Call/CallControls/CallControlButtonWithDropdown.tsx b/js/app/packages/channel/Call/CallControls/CallControlButtonWithDropdown.tsx
deleted file mode 100644
index dbb8ca7799..0000000000
--- a/js/app/packages/channel/Call/CallControls/CallControlButtonWithDropdown.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import CaretDown from '@phosphor/caret-down.svg';
-import { cn, Dropdown } from '@ui';
-import { createMemo, type JSX, Show } from 'solid-js';
-import {
- CallControlButton,
- type CallControlButtonSize,
- callControlButtonStyles,
-} from './CallControlButton';
-
-export function CallControlButtonWithDropdown(props: {
- onClick: () => Promise<void> | void;
- active?: boolean;
- danger?: boolean;
- children?: JSX.Element;
- dropdownContent: () => JSX.Element;
- disabled?: boolean;
- size?: CallControlButtonSize;
-}) {
- const interactionDisabled = createMemo(() => !!props.disabled);
-
- const handleClick = () => {
- if (interactionDisabled()) return;
- props.onClick();
- };
-
- const size = () => props.size ?? 'md';
- const isMd = () => size() === 'md';
- const isSm = () => size() === 'sm';
-
- return (
- <div
- class={cn(
- 'isolate flex items-center transition-colors',
- isMd() &&
- cn(
- 'rounded-lg p-1 gap-1 outline outline-edge-muted',
- props.active && callControlButtonStyles.variant.active,
- interactionDisabled() && 'pointer-events-none opacity-50'
- ),
- isSm() &&
- cn(
- 'bg-transparent p-0.5 shadow-none outline-none',
- interactionDisabled() && 'pointer-events-none opacity-50'
- )
- )}
- >
- <CallControlButton
- onClick={handleClick}
- disabled={interactionDisabled()}
- active={props.active}
- danger={props.danger}
- size={props.size}
- class={cn('outline-0 bg-transparent', isMd() && 'h-8')}
- >
- {props.children}
- </CallControlButton>
-
- <Show when={!isSm()}>
- <div class="w-px h-8 bg-ink/20 pointer-events-none" />
- </Show>
-
- <Dropdown>
- <Dropdown.Trigger
- as={CallControlButton}
- active={props.active}
- danger={props.danger}
- size={props.size}
- class={cn(
- 'outline-0 bg-transparent w-auto px-1 rounded-md',
- isMd() && 'h-8'
- )}
- >
- <CaretDown class={isSm() ? 'size-2.5 shrink-0' : 'size-3 shrink-0'} />
- </Dropdown.Trigger>
- <Dropdown.Content>{props.dropdownContent()}</Dropdown.Content>
- </Dropdown>
- </div>
- );
-}
diff --git a/js/app/packages/channel/Call/CallControls/CallControls.tsx b/js/app/packages/channel/Call/CallControls/CallControls.tsx
index e3e0133e5c..29b91e124e 100644
--- a/js/app/packages/channel/Call/CallControls/CallControls.tsx
+++ b/js/app/packages/channel/Call/CallControls/CallControls.tsx
@@ -1,5 +1,4 @@
-import { type Accessor, Match, mergeProps, Show, Switch } from 'solid-js';
-import type { CallControlButtonSize } from './CallControlButton';
+import { type Accessor, Show } from 'solid-js';
import { CallControlsDefaultAndPanelRow } from './CallControlsDefaultAndPanelRow';
import { CallControlsPanelSmallRow } from './CallControlsPanelSmallRow';
@@ -19,33 +18,19 @@ function readWhen(when: boolean | Accessor<boolean> | undefined): boolean {
/**
* Mic / camera / screen / leave wired to `useCallContext()`. Single place for
- * control markup so Call overlay and sidebar InCall panel stay in sync.
+ * control markup so the Call overlay and the sidebar InCall panel stay in
+ * sync. The slim `panel-small` variant renders a single gear-menu instead of
+ * the inline pill row.
*/
-export function CallControls(rawProps: CallControlsProps) {
- const props = mergeProps(
- { variant: 'default' as CallControlsVariant },
- rawProps
- );
-
- const variant = () => props.variant ?? 'default';
-
- const buttonSize = (): CallControlButtonSize =>
- variant() === 'default' ? 'md' : 'sm';
-
+export function CallControls(props: CallControlsProps) {
return (
<Show when={() => readWhen(props.when)}>
- <Switch
- fallback={
- <CallControlsDefaultAndPanelRow
- size={buttonSize}
- onLeave={props.onLeave}
- />
- }
+ <Show
+ when={props.variant === 'panel-small'}
+ fallback={<CallControlsDefaultAndPanelRow onLeave={props.onLeave} />}
>
- <Match when={variant() === 'panel-small'}>
- <CallControlsPanelSmallRow onLeave={props.onLeave} />
- </Match>
- </Switch>
+ <CallControlsPanelSmallRow />
+ </Show>
</Show>
);
}
diff --git a/js/app/packages/channel/Call/CallControls/CallControlsDefaultAndPanelRow.tsx b/js/app/packages/channel/Call/CallControls/CallControlsDefaultAndPanelRow.tsx
index d3801d4680..921addc44a 100644
--- a/js/app/packages/channel/Call/CallControls/CallControlsDefaultAndPanelRow.tsx
+++ b/js/app/packages/channel/Call/CallControls/CallControlsDefaultAndPanelRow.tsx
@@ -1,29 +1,25 @@
import PhoneDisconnect from '@icon/wide-call-disconnect.svg';
-import CheckIcon from '@phosphor/check.svg';
+import { DropdownMenu } from '@kobalte/core/dropdown-menu';
+import Gear from '@phosphor/gear.svg';
import Microphone from '@phosphor/microphone.svg';
import MicrophoneSlash from '@phosphor/microphone-slash.svg';
import Screencast from '@phosphor/screencast.svg';
import VideoCamera from '@phosphor/video-camera.svg';
import VideoCameraSlash from '@phosphor/video-camera-slash.svg';
-import { cn, Dropdown } from '@ui';
-import { type Accessor, For, Show } from 'solid-js';
+import { Button, Dropdown } from '@ui';
+import { For, type JSX, Show } from 'solid-js';
import { match } from 'ts-pattern';
-import { useCallContext } from '../CallContext';
+import { BACKGROUND_IMAGES, useCallContext } from '../CallContext';
import { CallDeviceList } from '../CallDeviceList';
-import {
- CallControlButton,
- type CallControlButtonSize,
-} from './CallControlButton';
-import { CallControlButtonWithDropdown } from './CallControlButtonWithDropdown';
+
+import { MenuDivider, MenuLabel } from './CallMenuPrimitives';
export type CallControlsDefaultAndPanelRowProps = {
- size: Accessor<CallControlButtonSize>;
- class?: string;
onLeave: () => void | Promise<void>;
};
-// Mirrors @livekit/track-processors' supportsBackgroundProcessors()
-// so this menu can render without statically importing heavy processor bundles.
+// Mirrors @livekit/track-processors' supportsBackgroundProcessors() so this
+// menu can render without statically importing heavy processor bundles.
function isBackgroundBlurSupported(): boolean {
if (typeof window === 'undefined') return false;
if (
@@ -47,23 +43,14 @@ function isBackgroundBlurSupported(): boolean {
return hasStreamProcessor || hasFallback;
}
-const BACKGROUND_OPTIONS = [
- { value: 'none', label: 'None' },
- { value: 'blur-light', label: 'Small blur' },
- { value: 'blur-medium', label: 'Medium blur' },
- { value: 'blur-heavy', label: 'Large blur' },
-] as const;
-
-type BackgroundOptionValue = (typeof BACKGROUND_OPTIONS)[number]['value'];
-
function BackgroundEffectSelector() {
const callCtx = useCallContext();
- const currentEffectValue = (): BackgroundOptionValue | '' => {
+ const currentEffectValue = () => {
const effect = callCtx.backgroundEffect();
if (effect.type === 'none') return 'none';
if (effect.type === 'blur') return `blur-${effect.intensity}`;
- return '';
+ return `image-${effect.id}`;
};
const handleChange = (value: string) => {
@@ -79,35 +66,62 @@ function BackgroundEffectSelector() {
| 'heavy';
callCtx.setBackgroundEffect({ type: 'blur', intensity });
+ return;
+ }
+
+ if (value.startsWith('image-')) {
+ const id = value.replace('image-', '');
+ const bg = BACKGROUND_IMAGES.find((b) => b.id === id);
+
+ if (!bg) return;
+
+ callCtx.setBackgroundEffect({
+ type: 'image',
+ id: bg.id,
+ path: bg.path,
+ });
}
};
return (
<Dropdown.RadioGroup value={currentEffectValue()} onChange={handleChange}>
- <Dropdown.Group>
- <Dropdown.GroupLabel>Background</Dropdown.GroupLabel>
- <For each={BACKGROUND_OPTIONS}>
- {(option) => (
- <Dropdown.RadioItem value={option.value}>
- <span class="flex-1 truncate">{option.label}</span>
- <Dropdown.ItemIndicator>
- <CheckIcon class="size-3.5 text-accent" />
- </Dropdown.ItemIndicator>
+ <MenuLabel>Background</MenuLabel>
+ <Dropdown.RadioItem value="none">None</Dropdown.RadioItem>
+ <MenuDivider />
+ <MenuLabel>Blur</MenuLabel>
+ <Dropdown.RadioItem value="blur-light">Light</Dropdown.RadioItem>
+ <Dropdown.RadioItem value="blur-medium">Medium</Dropdown.RadioItem>
+ <Dropdown.RadioItem value="blur-heavy">Heavy</Dropdown.RadioItem>
+ <Show when={BACKGROUND_IMAGES.length}>
+ <MenuDivider />
+ <MenuLabel>Image</MenuLabel>
+ <For each={BACKGROUND_IMAGES}>
+ {(bg) => (
+ <Dropdown.RadioItem value={`image-${bg.id}`}>
+ {bg.label}
</Dropdown.RadioItem>
)}
</For>
- </Dropdown.Group>
+ </Show>
</Dropdown.RadioGroup>
);
}
+function Cell(props: { children: JSX.Element }) {
+ return <div class="flex items-center p-1">{props.children}</div>;
+}
+
+/**
+ * Mic / camera / screen-share / settings / hang-up arranged as a single
+ * rounded card with hairline dividers — matches the in-call sidebar panel
+ * styling. Each cell holds a plain ghost `Button`, so the hover stays
+ * contained inside the button rather than filling the cell to the dividers.
+ */
export function CallControlsDefaultAndPanelRow(
props: CallControlsDefaultAndPanelRowProps
) {
const callCtx = useCallContext();
const isConnecting = () => callCtx.isConnecting();
- const size = () => props.size();
- const iconClass = () => (size() === 'sm' ? 'w-4 h-4' : 'w-5 h-5');
const noiseSuppressionModeLabel = () =>
match(callCtx.noiseSuppressionMode())
.with('krisp', () => 'Krisp')
@@ -116,106 +130,118 @@ export function CallControlsDefaultAndPanelRow(
.exhaustive();
return (
- <div
- data-call-controls
- class={cn(
- 'flex flex-row flex-wrap items-center',
- size() === 'md' && 'justify-center gap-3',
- size() === 'sm' && 'justify-around gap-0 py-1',
- props.class
- )}
- >
- <CallControlButtonWithDropdown
- size={size()}
- onClick={() => callCtx.toggleAudio()}
- active={!callCtx.isAudioMuted()}
- disabled={isConnecting()}
- dropdownContent={() => (
- <>
- <CallDeviceList
- label="Microphone"
- devices={callCtx.audioInputDevices()}
- activeDeviceId={callCtx.activeAudioInputDeviceId()}
- onSelect={(id) => callCtx.switchAudioInput(id)}
- />
- <Show when={callCtx.audioOutputDevices().length > 0}>
+ <div class="inline-flex items-center overflow-hidden rounded-lg border border-ink-muted/[0.08] bg-ink-muted/[0.025] divide-x divide-ink-muted/[0.08]">
+ <Cell>
+ <Button
+ size="icon-sm"
+ onClick={() => void callCtx.toggleAudio()}
+ disabled={isConnecting()}
+ aria-label={
+ callCtx.isAudioMuted() ? 'Unmute microphone' : 'Mute microphone'
+ }
+ aria-pressed={!callCtx.isAudioMuted()}
+ >
+ <Show when={!callCtx.isAudioMuted()} fallback={<MicrophoneSlash />}>
+ <Microphone />
+ </Show>
+ </Button>
+ </Cell>
+
+ <Cell>
+ <Button
+ size="icon-sm"
+ onClick={() => void callCtx.toggleVideo()}
+ disabled={isConnecting()}
+ aria-label={
+ callCtx.isVideoMuted() ? 'Turn on camera' : 'Turn off camera'
+ }
+ aria-pressed={!callCtx.isVideoMuted()}
+ >
+ <Show when={!callCtx.isVideoMuted()} fallback={<VideoCameraSlash />}>
+ <VideoCamera />
+ </Show>
+ </Button>
+ </Cell>
+
+ <Cell>
+ <Button
+ size="icon-sm"
+ onClick={() => void callCtx.toggleScreenShare()}
+ disabled={isConnecting()}
+ aria-label={
+ callCtx.isScreenSharing() ? 'Stop sharing screen' : 'Share screen'
+ }
+ aria-pressed={callCtx.isScreenSharing()}
+ >
+ <Screencast />
+ </Button>
+ </Cell>
+
+ <Cell>
+ <Dropdown placement="top" gutter={6}>
+ <DropdownMenu.Trigger
+ as={Button}
+ size="icon-sm"
+ disabled={isConnecting()}
+ aria-label="Call settings"
+ >
+ <Gear />
+ </DropdownMenu.Trigger>
+ <Dropdown.Content class="min-w-56">
+ <Dropdown.Group>
<CallDeviceList
- label="Speaker"
- devices={callCtx.audioOutputDevices()}
- activeDeviceId={callCtx.activeAudioOutputDeviceId()}
- onSelect={(id) => callCtx.switchAudioOutput(id)}
+ label="Microphone"
+ devices={callCtx.audioInputDevices()}
+ activeDeviceId={callCtx.activeAudioInputDeviceId()}
+ onSelect={(id) => callCtx.switchAudioInput(id)}
/>
- </Show>
- <Dropdown.Group>
- <Dropdown.GroupLabel>Audio processing</Dropdown.GroupLabel>
- <Dropdown.CheckboxItem
- checked={callCtx.isNoiseSuppressed()}
+ <Show when={callCtx.audioOutputDevices().length > 0}>
+ <MenuDivider />
+ <CallDeviceList
+ label="Speaker"
+ devices={callCtx.audioOutputDevices()}
+ activeDeviceId={callCtx.activeAudioOutputDeviceId()}
+ onSelect={(id) => callCtx.switchAudioOutput(id)}
+ />
+ </Show>
+ <MenuDivider />
+ <CallDeviceList
+ label="Camera"
+ devices={callCtx.videoInputDevices()}
+ activeDeviceId={callCtx.activeVideoInputDeviceId()}
+ onSelect={(id) => callCtx.switchVideoInput(id)}
+ />
+ <MenuDivider />
+ <MenuLabel>Audio processing</MenuLabel>
+ <Dropdown.Item
closeOnSelect={false}
- onChange={() => void callCtx.toggleNoiseSuppression()}
+ onSelect={() => void callCtx.toggleNoiseSuppression()}
>
<span class="flex-1 truncate">Noise suppression</span>
<span class="text-xs text-ink-muted">
{noiseSuppressionModeLabel()}
</span>
- </Dropdown.CheckboxItem>
+ </Dropdown.Item>
+ <Show when={isBackgroundBlurSupported()}>
+ <MenuDivider />
+ <BackgroundEffectSelector />
+ </Show>
</Dropdown.Group>
- </>
- )}
- >
- <Show
- when={!callCtx.isAudioMuted()}
- fallback={<MicrophoneSlash class={iconClass()} />}
- >
- <Microphone class={iconClass()} />
- </Show>
- </CallControlButtonWithDropdown>
-
- <CallControlButtonWithDropdown
- size={size()}
- onClick={() => callCtx.toggleVideo()}
- active={!callCtx.isVideoMuted()}
- disabled={isConnecting()}
- dropdownContent={() => (
- <>
- <CallDeviceList
- label="Camera"
- devices={callCtx.videoInputDevices()}
- activeDeviceId={callCtx.activeVideoInputDeviceId()}
- onSelect={(id) => callCtx.switchVideoInput(id)}
- />
- <Show when={isBackgroundBlurSupported()}>
- <BackgroundEffectSelector />
- </Show>
- </>
- )}
- >
- <Show
- when={!callCtx.isVideoMuted()}
- fallback={<VideoCameraSlash class={iconClass()} />}
+ </Dropdown.Content>
+ </Dropdown>
+ </Cell>
+
+ <Cell>
+ <Button
+ size="icon-sm"
+ class="text-failure not-disabled:hover:text-failure not-disabled:hover:bg-failure/10"
+ onClick={() => void props.onLeave()}
+ disabled={isConnecting()}
+ aria-label="Leave call"
>
- <VideoCamera class={iconClass()} />
- </Show>
- </CallControlButtonWithDropdown>
-
- <CallControlButton
- class="border-0"
- size={size()}
- onClick={() => callCtx.toggleScreenShare()}
- active={callCtx.isScreenSharing()}
- disabled={isConnecting()}
- >
- <Screencast class={iconClass()} />
- </CallControlButton>
-
- <CallControlButton
- class="border-0"
- size={size()}
- onClick={props.onLeave}
- disabled={isConnecting()}
- danger
- >
- <PhoneDisconnect class={iconClass()} />
- </CallControlButton>
+ <PhoneDisconnect />
+ </Button>
+ </Cell>
</div>
);
}
diff --git a/js/app/packages/channel/Call/CallControls/CallControlsPanelSmallRow.tsx b/js/app/packages/channel/Call/CallControls/CallControlsPanelSmallRow.tsx
index 6cbc83474c..4206ec6af2 100644
--- a/js/app/packages/channel/Call/CallControls/CallControlsPanelSmallRow.tsx
+++ b/js/app/packages/channel/Call/CallControls/CallControlsPanelSmallRow.tsx
@@ -1,32 +1,24 @@
-import PhoneDisconnect from '@icon/wide-call-disconnect.svg';
-import CheckIcon from '@phosphor/check.svg';
-import Info from '@phosphor/info.svg';
+import { DropdownMenu } from '@kobalte/core/dropdown-menu';
+import Gear from '@phosphor/gear.svg';
import Microphone from '@phosphor/microphone.svg';
import MicrophoneSlash from '@phosphor/microphone-slash.svg';
import Screencast from '@phosphor/screencast.svg';
-import ShareNetwork from '@phosphor/share-network.svg';
import VideoCamera from '@phosphor/video-camera.svg';
import VideoCameraSlash from '@phosphor/video-camera-slash.svg';
-import VideoConference from '@phosphor/video-conference.svg';
-import { useToggleShareWithTeamMutation } from '@queries/call/call';
-import { cn, Dropdown, ToggleSwitch, Tooltip } from '@ui';
-import { For, Show } from 'solid-js';
+import { cn, Dropdown } from '@ui';
+import { Show } from 'solid-js';
import { match } from 'ts-pattern';
import { useCallContext } from '../CallContext';
+import { CallDeviceList } from '../CallDeviceList';
+import { useToggleShareWithTeam } from '../use-toggle-share-with-team';
+import { InlineCheckbox, MenuDivider, MenuLabel } from './CallMenuPrimitives';
-const panelSmallIconClass = 'w-4 h-4';
+const ITEM_ICON_CLASS = 'size-3.5 shrink-0 text-ink-muted';
-export type CallControlsPanelSmallRowProps = {
- class?: string;
- onLeave: () => void | Promise<void>;
-};
-
-export function CallControlsPanelSmallRow(
- props: CallControlsPanelSmallRowProps
-) {
+export function CallControlsPanelSmallRow() {
const callCtx = useCallContext();
const isConnecting = () => callCtx.isConnecting();
- const toggleShareWithTeam = useToggleShareWithTeamMutation();
+ const handleToggleShareWithTeam = useToggleShareWithTeam();
const noiseSuppressionModeLabel = () =>
match(callCtx.noiseSuppressionMode())
.with('krisp', () => 'Krisp')
@@ -34,44 +26,32 @@ export function CallControlsPanelSmallRow(
.with('off', () => 'Off')
.exhaustive();
- const handleToggleShareWithTeam = async () => {
- const callId = callCtx.activeCallId();
- if (!callId) return;
- const newValue = await toggleShareWithTeam.mutateAsync(callId);
- callCtx.setSharedWithTeam(newValue);
- };
+ const anyMediaActive = () =>
+ !callCtx.isAudioMuted() ||
+ !callCtx.isVideoMuted() ||
+ callCtx.isScreenSharing();
return (
<div
data-call-controls
data-call-controls-panel-small
- class={cn(
- 'flex flex-row flex-wrap items-center justify-center gap-0.5',
- props.class
- )}
+ class="flex flex-row flex-wrap items-center justify-center gap-0.5"
>
- <Dropdown placement="top-start">
- <Dropdown.Trigger
- as="button"
- type="button"
+ <Dropdown placement="top-start" gutter={6}>
+ <DropdownMenu.Trigger
disabled={isConnecting()}
+ aria-label="Call options"
class={cn(
- 'flex items-center justify-center size-4 shrink-0 rounded-md border-0 bg-transparent transition-colors',
+ 'flex items-center justify-center size-5 shrink-0 rounded-md transition-colors',
isConnecting() && 'opacity-50 pointer-events-none',
- !isConnecting() &&
- (!callCtx.isAudioMuted() ||
- !callCtx.isVideoMuted() ||
- callCtx.isScreenSharing())
- ? 'text-accent-2'
- : 'text-ink',
- !isConnecting() && 'hover:bg-ink/5'
+ !isConnecting() && anyMediaActive() ? 'text-ink' : 'text-ink-muted',
+ !isConnecting() && 'hover:text-ink hover:bg-ink-muted/[0.06]'
)}
- aria-label="Call options"
>
- <VideoConference class={panelSmallIconClass} />
- </Dropdown.Trigger>
+ <Gear class="size-4" />
+ </DropdownMenu.Trigger>
- <Dropdown.Content>
+ <Dropdown.Content class="min-w-56">
<Dropdown.Group>
<Dropdown.Item
closeOnSelect={false}
@@ -79,9 +59,9 @@ export function CallControlsPanelSmallRow(
>
<Show
when={!callCtx.isAudioMuted()}
- fallback={<MicrophoneSlash class="size-4 shrink-0" />}
+ fallback={<MicrophoneSlash class={ITEM_ICON_CLASS} />}
>
- <Microphone class="size-4 shrink-0" />
+ <Microphone class={ITEM_ICON_CLASS} />
</Show>
<span class="flex-1 truncate">
{callCtx.isAudioMuted()
@@ -89,169 +69,85 @@ export function CallControlsPanelSmallRow(
: 'Mute microphone'}
</span>
</Dropdown.Item>
- </Dropdown.Group>
- <Dropdown.Group>
- <Dropdown.GroupLabel>Microphone</Dropdown.GroupLabel>
- <For each={callCtx.audioInputDevices()}>
- {(device) => (
- <Dropdown.Item
- closeOnSelect={false}
- onSelect={() =>
- void callCtx.switchAudioInput(device.deviceId)
- }
- >
- <span class="flex-1 truncate">{device.label}</span>
- <span class="inline-flex w-3 shrink-0 justify-center">
- <Show
- when={
- callCtx.activeAudioInputDeviceId() === device.deviceId
- }
- >
- <CheckIcon class="size-3 text-accent" />
- </Show>
- </span>
- </Dropdown.Item>
- )}
- </For>
- </Dropdown.Group>
+ <MenuDivider />
- <Show when={callCtx.audioOutputDevices().length > 0}>
- <Dropdown.Group>
- <Dropdown.GroupLabel>Speaker</Dropdown.GroupLabel>
- <For each={callCtx.audioOutputDevices()}>
- {(device) => (
- <Dropdown.Item
- closeOnSelect={false}
- onSelect={() =>
- void callCtx.switchAudioOutput(device.deviceId)
- }
- >
- <span class="flex-1 truncate">{device.label}</span>
- <span class="inline-flex w-3 shrink-0 justify-center">
- <Show
- when={
- callCtx.activeAudioOutputDeviceId() ===
- device.deviceId
- }
- >
- <CheckIcon class="size-3 text-accent" />
- </Show>
- </span>
- </Dropdown.Item>
- )}
- </For>
- </Dropdown.Group>
- </Show>
+ <CallDeviceList
+ label="Microphone"
+ devices={callCtx.audioInputDevices()}
+ activeDeviceId={callCtx.activeAudioInputDeviceId()}
+ onSelect={(id) => callCtx.switchAudioInput(id)}
+ />
- <Dropdown.Group>
+ <Show when={callCtx.audioOutputDevices().length > 0}>
+ <MenuDivider />
+ <CallDeviceList
+ label="Speaker"
+ devices={callCtx.audioOutputDevices()}
+ activeDeviceId={callCtx.activeAudioOutputDeviceId()}
+ onSelect={(id) => callCtx.switchAudioOutput(id)}
+ />
+ </Show>
+
+ <MenuDivider />
+
+ <MenuLabel>Audio processing</MenuLabel>
<Dropdown.Item
closeOnSelect={false}
onSelect={() => void callCtx.toggleNoiseSuppression()}
>
- <Microphone class="size-4 shrink-0" />
<span class="flex-1 truncate">Noise suppression</span>
- <div class="ml-auto flex items-center gap-1.5 shrink-0">
- <span class="text-xs text-ink-muted">
- {noiseSuppressionModeLabel()}
- </span>
- <ToggleSwitch
- checked={callCtx.isNoiseSuppressed()}
- class="pointer-events-none"
- />
- </div>
+ <span class="text-xs text-ink-muted">
+ {noiseSuppressionModeLabel()}
+ </span>
</Dropdown.Item>
- </Dropdown.Group>
- <Dropdown.Group>
+ <MenuDivider />
+
<Dropdown.Item
closeOnSelect={false}
onSelect={() => void callCtx.toggleVideo()}
>
<Show
when={!callCtx.isVideoMuted()}
- fallback={<VideoCameraSlash class="size-4 shrink-0" />}
+ fallback={<VideoCameraSlash class={ITEM_ICON_CLASS} />}
>
- <VideoCamera class="size-4 shrink-0" />
+ <VideoCamera class={ITEM_ICON_CLASS} />
</Show>
<span class="flex-1 truncate">
{callCtx.isVideoMuted() ? 'Turn camera on' : 'Turn camera off'}
</span>
</Dropdown.Item>
- </Dropdown.Group>
- <Dropdown.Group>
- <Dropdown.GroupLabel>Camera</Dropdown.GroupLabel>
- <For each={callCtx.videoInputDevices()}>
- {(device) => (
- <Dropdown.Item
- closeOnSelect={false}
- onSelect={() =>
- void callCtx.switchVideoInput(device.deviceId)
- }
- >
- <span class="flex-1 truncate">{device.label}</span>
- <span class="inline-flex w-3 shrink-0 justify-center">
- <Show
- when={
- callCtx.activeVideoInputDeviceId() === device.deviceId
- }
- >
- <CheckIcon class="size-3 text-accent" />
- </Show>
- </span>
- </Dropdown.Item>
- )}
- </For>
- </Dropdown.Group>
+ <MenuDivider />
+
+ <CallDeviceList
+ label="Camera"
+ devices={callCtx.videoInputDevices()}
+ activeDeviceId={callCtx.activeVideoInputDeviceId()}
+ onSelect={(id) => callCtx.switchVideoInput(id)}
+ />
+
+ <MenuDivider />
- <Dropdown.Group>
<Dropdown.Item
closeOnSelect={false}
onSelect={() => void callCtx.toggleScreenShare()}
>
- <Screencast class="size-4 shrink-0" />
+ <Screencast class={ITEM_ICON_CLASS} />
<span class="flex-1 truncate">
{callCtx.isScreenSharing()
? 'Stop sharing screen'
: 'Share screen'}
</span>
</Dropdown.Item>
- </Dropdown.Group>
- <Dropdown.Group>
<Dropdown.Item
closeOnSelect={false}
onSelect={() => void handleToggleShareWithTeam()}
>
- <ShareNetwork class="size-4 shrink-0" />
- <span class="flex-1 truncate">
- {callCtx.isSharedWithTeam()
- ? 'Shared with team'
- : 'Share with team'}
- </span>
- <div class="ml-auto flex items-center gap-1.5 shrink-0">
- <ToggleSwitch
- checked={callCtx.isSharedWithTeam()}
- class="pointer-events-none"
- />
- <Tooltip
- placement="left"
- label="When on, all team members can view and search this call's transcript and AI summary."
- >
- <Info class="size-3 text-ink-subtle" />
- </Tooltip>
- </div>
- </Dropdown.Item>
- </Dropdown.Group>
-
- <Dropdown.Group>
- <Dropdown.Item
- class="text-failure hover:bg-failure/10"
- onSelect={() => void props.onLeave()}
- >
- <PhoneDisconnect class="size-4 shrink-0" />
- <span class="flex-1 truncate">Leave call</span>
+ <InlineCheckbox checked={callCtx.isSharedWithTeam()} />
+ <span class="flex-1 truncate">Share with team</span>
</Dropdown.Item>
</Dropdown.Group>
</Dropdown.Content>
diff --git a/js/app/packages/channel/Call/CallControls/CallMenuPrimitives.tsx b/js/app/packages/channel/Call/CallControls/CallMenuPrimitives.tsx
new file mode 100644
index 0000000000..31ca11dc36
--- /dev/null
+++ b/js/app/packages/channel/Call/CallControls/CallMenuPrimitives.tsx
@@ -0,0 +1,40 @@
+import Check from '@phosphor/check.svg';
+import { cn, Dropdown } from '@ui';
+import type { Component, JSX } from 'solid-js';
+
+/**
+ * Small section label rendered inside a `Dropdown.Group` (e.g. "Microphone",
+ * "Audio processing"). Matches the soup filter/sort dropdown header tone.
+ */
+export const MenuLabel: Component<{ children: JSX.Element }> = (props) => (
+ <div class="px-2 pt-0.5 pb-1 text-xs font-medium text-ink-muted">
+ {props.children}
+ </div>
+);
+
+/**
+ * Hairline divider between sections inside a `Dropdown.Group`. Negative
+ * horizontal margin lets the line bleed to the edges of the group surface.
+ */
+export const MenuDivider: Component = () => (
+ <Dropdown.Separator class="my-1 h-px border-0 bg-edge-muted -mx-1.5" />
+);
+
+/**
+ * Inline checkbox affordance — a small square that fills accent when checked
+ * and shows an outlined empty box when not. Matches the soup-menu checkbox
+ * pattern. Visual-only; pair with a clickable parent for the actual toggle.
+ */
+export const InlineCheckbox: Component<{ checked: boolean }> = (props) => (
+ <span
+ aria-hidden
+ class={cn(
+ 'inline-flex items-center justify-center size-3.5 shrink-0 rounded-sm',
+ props.checked
+ ? 'bg-accent text-surface'
+ : 'bg-transparent border border-edge-muted text-transparent'
+ )}
+ >
+ <Check class="size-2.5" />
+ </span>
+);
diff --git a/js/app/packages/channel/Call/CallDeviceList.tsx b/js/app/packages/channel/Call/CallDeviceList.tsx
index 4dc47e76ab..44c731a1fa 100644
--- a/js/app/packages/channel/Call/CallDeviceList.tsx
+++ b/js/app/packages/channel/Call/CallDeviceList.tsx
@@ -3,7 +3,10 @@ import { Dropdown } from '@ui';
import { For, Show } from 'solid-js';
import type { MediaDeviceInfo } from './CallContext';
-/** Device picker rows for use inside `Dropdown` + `Dropdown.Content` only. */
+/**
+ * Device picker rows for use inside a `Dropdown.Group`. Renders a small
+ * header label followed by radio rows for each device.
+ */
export function CallDeviceList(props: {
label: string;
devices: MediaDeviceInfo[];
@@ -11,8 +14,10 @@ export function CallDeviceList(props: {
onSelect: (deviceId: string) => void;
}) {
return (
- <Dropdown.Group>
- <Dropdown.GroupLabel>{props.label}</Dropdown.GroupLabel>
+ <>
+ <div class="px-2 pt-0.5 pb-1 text-xs font-medium text-ink-muted">
+ {props.label}
+ </div>
<Dropdown.RadioGroup
value={props.activeDeviceId ?? ''}
onChange={(value) => props.onSelect(value)}
@@ -20,8 +25,8 @@ export function CallDeviceList(props: {
<For each={props.devices}>
{(device) => (
<Dropdown.RadioItem value={device.deviceId}>
- <span class="flex-1 truncate">{device.label}</span>
- <span class="inline-flex w-3 shrink-0 justify-center">
+ <span class="min-w-0 flex-1 truncate">{device.label}</span>
+ <span class="size-3.5 flex items-center justify-center shrink-0">
<Show when={props.activeDeviceId === device.deviceId}>
<CheckIcon class="size-3 text-accent" />
</Show>
@@ -30,6 +35,6 @@ export function CallDeviceList(props: {
)}
</For>
</Dropdown.RadioGroup>
- </Dropdown.Group>
+ </>
);
}
diff --git a/js/app/packages/channel/Call/CallOverlay.tsx b/js/app/packages/channel/Call/CallOverlay.tsx
index 02e3329f0e..414c117392 100644
--- a/js/app/packages/channel/Call/CallOverlay.tsx
+++ b/js/app/packages/channel/Call/CallOverlay.tsx
@@ -2,18 +2,18 @@ import { useSplitPanel } from '@app/component/split-layout/layoutUtils';
import { UserIcon } from '@core/component/UserIcon';
import { useAuthor, useUserId } from '@core/context/user';
import { tryMacroId, useDisplayName } from '@core/user';
-import ShareNetwork from '@phosphor/share-network.svg';
-import { useToggleShareWithTeamMutation } from '@queries/call/call';
-import { cn, ToggleSwitch, Tooltip } from '@ui';
+import { cn, Tooltip } from '@ui';
import { type RemoteParticipant, Track } from 'livekit-client';
import { For, type JSXElement, Show } from 'solid-js';
import { useCallContext } from './CallContext';
import { CallControls } from './CallControls/CallControls';
+import { InlineCheckbox } from './CallControls/CallMenuPrimitives';
import {
CALL_PANEL_MEDIUM_NARROW_PX,
CALL_PANEL_VERY_NARROW_PX,
} from './call-panel-breakpoints';
import { TrackView } from './TrackView';
+import { useToggleShareWithTeam } from './use-toggle-share-with-team';
function VideoTag(props: {
children: JSXElement;
@@ -197,14 +197,7 @@ export function CallOverlay(props: { onLeave: () => void }) {
const currentUserId = useUserId();
const currentUserName = useAuthor();
const isConnecting = () => callCtx.isConnecting();
- const toggleShareWithTeam = useToggleShareWithTeamMutation();
-
- const handleToggleShareWithTeam = async () => {
- const callId = callCtx.activeCallId();
- if (!callId) return;
- const newValue = await toggleShareWithTeam.mutateAsync(callId);
- callCtx.setSharedWithTeam(newValue);
- };
+ const handleToggleShareWithTeam = useToggleShareWithTeam();
const splitPanel = useSplitPanel();
const panelWidth = () => splitPanel?.panelSize.width ?? Infinity;
@@ -281,7 +274,7 @@ export function CallOverlay(props: { onLeave: () => void }) {
{/* Participants area */}
<div
- class={`${hasAnyScreenShare() ? 'h-45 shrink-0' : 'flex-1 min-h-0'} relative py-2`}
+ class={`${hasAnyScreenShare() ? 'h-45 shrink-0' : 'flex-1 min-h-0'} relative pt-2`}
>
<Show
when={participants().length > 0}
@@ -322,54 +315,39 @@ export function CallOverlay(props: { onLeave: () => void }) {
</Show>
</div>
- {/* Controls bar */}
- <div
- class={cn(
- 'flex items-center p-3 pt-1 bg-surface-1',
- !isMediumNarrow() && 'relative justify-center',
- isMediumNarrow() && !isVeryNarrow() && 'justify-between',
- isVeryNarrow() && 'justify-center'
- )}
- >
+ {/* Controls bar — soup-notification vocabulary. Share toggle is an
+ icon button (with optional inline label), active state = subtle
+ accent tint. No chunky toggle switch. */}
+ <div class="flex items-center py-2 relative justify-center">
<Show when={!isVeryNarrow()}>
- <div
- class={cn(
- 'flex items-center gap-2',
- !isMediumNarrow() && 'absolute left-3'
- )}
+ <Tooltip
+ placement="top"
+ label={
+ callCtx.isSharedWithTeam()
+ ? 'Everyone can view the transcript and AI summary'
+ : 'Let everyone view the transcript and AI summary'
+ }
>
- <Show when={!isMediumNarrow()}>
- <span class="text-xs text-ink-muted whitespace-nowrap inline-grid">
- <span class="col-start-1 row-start-1 invisible" aria-hidden>
- Shared with team
- </span>
- <span class="col-start-1 row-start-1">
- {callCtx.isSharedWithTeam()
- ? 'Shared with team'
- : 'Share with team'}
- </span>
- </span>
- </Show>
- <Tooltip
- placement="top"
- label="When on, all team members can view and search this call's transcript and AI summary."
+ <button
+ type="button"
+ onClick={() => void handleToggleShareWithTeam()}
+ disabled={isConnecting()}
+ role="checkbox"
+ aria-checked={callCtx.isSharedWithTeam()}
+ class={cn(
+ 'absolute left-0 inline-flex items-center gap-2 rounded-md h-7 px-2.5 text-xs select-none',
+ 'border border-ink-muted/[0.08] bg-ink-muted/[0.025]',
+ 'text-ink-muted/70 hover:text-ink hover:bg-ink-muted/[0.06]',
+ callCtx.isSharedWithTeam() && 'text-ink',
+ isConnecting() && 'pointer-events-none opacity-50'
+ )}
>
- <div class="flex items-center gap-1">
- <ShareNetwork
- class={cn(
- 'size-3 shrink-0',
- callCtx.isSharedWithTeam() ? 'text-ink' : 'text-ink-muted'
- )}
- aria-hidden
- />
- <ToggleSwitch
- onChange={() => void handleToggleShareWithTeam()}
- checked={callCtx.isSharedWithTeam()}
- disabled={isConnecting()}
- />
- </div>
- </Tooltip>
- </div>
+ <InlineCheckbox checked={callCtx.isSharedWithTeam()} />
+ <Show when={!isMediumNarrow()}>
+ <span class="whitespace-nowrap">Share with team</span>
+ </Show>
+ </button>
+ </Tooltip>
</Show>
<CallControls onLeave={props.onLeave} />
</div>
diff --git a/js/app/packages/channel/Call/ChannelCallButton.tsx b/js/app/packages/channel/Call/ChannelCallButton.tsx
index f79d6951e5..1eaad00d49 100644
--- a/js/app/packages/channel/Call/ChannelCallButton.tsx
+++ b/js/app/packages/channel/Call/ChannelCallButton.tsx
@@ -1,12 +1,9 @@
-import { useSplitPanel } from '@app/component/split-layout/layoutUtils';
import { useChannelTab } from '@channel/Channel/ChannelTabContext';
import { DEFAULT_CHANNEL_TAB } from '@channel/Channel/channel-tabs';
import PhoneIcon from '@icon/wide-call.svg';
-import PhoneDisconnectIcon from '@icon/wide-call-disconnect.svg';
import { useActiveCallQuery } from '@queries/call/call';
import { Button, cn } from '@ui';
import { Show } from 'solid-js';
-import { CALL_PANEL_VERY_NARROW_PX } from './call-panel-breakpoints';
import { useCall } from './use-call';
export function ChannelCallButton(props: { channelId: string }) {
@@ -15,62 +12,39 @@ export function ChannelCallButton(props: { channelId: string }) {
onJoin: () => setActiveTab('call'),
onLeave: () => setActiveTab(DEFAULT_CHANNEL_TAB),
});
- const splitPanel = useSplitPanel();
- const isVeryNarrow = () =>
- (splitPanel?.panelSize.width ?? Infinity) < CALL_PANEL_VERY_NARROW_PX;
const activeCallQuery = useActiveCallQuery(() => props.channelId);
const isCallInProgress = () => !!activeCallQuery.data;
- const isHighlighted = () => call.isInThisChannel() || isCallInProgress();
- const isPending = () => call.isLeaving();
-
- const tooltip = () => {
- if (call.isInThisChannel()) return 'Leave Call';
- if (isCallInProgress()) return 'Join Call';
- return 'Start Call';
- };
-
- const label = () => {
- if (call.isInThisChannel()) return 'Leave';
- if (isCallInProgress()) return 'Join';
- return 'Call';
- };
+ const tooltip = () => (isCallInProgress() ? 'Join Call' : 'Start Call');
+ const label = () => (isCallInProgress() ? 'Join' : 'Call');
const handleClick = async () => {
- if (call.isJoining() || call.isLeaving()) return;
-
+ if (call.isJoining()) return;
try {
- if (call.isInThisChannel()) {
- await call.leaveCall();
- } else {
- await call.joinCall();
- }
+ await call.joinCall();
} catch (e) {
console.error('Call action failed', e);
}
};
return (
- <Button
- onClick={handleClick}
- disabled={isPending()}
- tooltip={tooltip()}
- variant="base"
- size="sm"
- depth={2}
- class={cn(
- 'bg-surface',
- isHighlighted() &&
- 'bg-accent/20 hover:bg-accent/30 text-accent border-accent/30'
- )}
- >
- <Show when={call.isInThisChannel()} fallback={<PhoneIcon />}>
- <PhoneDisconnectIcon />
- </Show>
- <Show when={!(isVeryNarrow() && call.isInThisChannel())}>
+ <Show when={!call.isInThisChannel()}>
+ <Button
+ onClick={handleClick}
+ tooltip={tooltip()}
+ variant="base"
+ size="sm"
+ depth={2}
+ class={cn(
+ 'bg-surface',
+ isCallInProgress() &&
+ 'bg-accent/20 hover:bg-accent/30 text-accent border-accent/30'
+ )}
+ >
+ <PhoneIcon />
<span>{label()}</span>
- </Show>
- </Button>
+ </Button>
+ </Show>
);
}
diff --git a/js/app/packages/channel/Call/InCallPanel/InCallPanelView.tsx b/js/app/packages/channel/Call/InCallPanel/InCallPanelView.tsx
index ca80e7ba28..f345f7e66e 100644
--- a/js/app/packages/channel/Call/InCallPanel/InCallPanelView.tsx
+++ b/js/app/packages/channel/Call/InCallPanel/InCallPanelView.tsx
@@ -1,10 +1,8 @@
import { StackedAvatarsRow } from '@core/component/StackedAvatarsRow';
+import PhoneDisconnect from '@icon/wide-call-disconnect.svg';
import ArrowsOut from '@phosphor/arrows-out.svg';
-import ShareNetwork from '@phosphor/share-network.svg';
-import { useToggleShareWithTeamMutation } from '@queries/call/call';
-import { cn, Surface, ToggleSwitch, Tooltip } from '@ui';
+import { cn, Surface } from '@ui';
import { type Component, createMemo, Show } from 'solid-js';
-import { useCallContext } from '../CallContext';
import type { CallControlsVariant } from '../CallControls/CallControls';
import { CallControls } from '../CallControls/CallControls';
import type { InCallPanelProps } from '../InCallPanel/types';
@@ -28,37 +26,22 @@ export const InCallPanel: Component<InCallPanelProps> = (props) => {
onLeaveCall: props.onLeaveCall,
onJoinCall: props.onJoinCall,
});
- const callCtx = useCallContext();
- const toggleShareWithTeam = useToggleShareWithTeamMutation();
-
- const handleToggleShareWithTeam = async () => {
- const callId = callCtx.activeCallId();
- if (!callId) return;
- const newValue = await toggleShareWithTeam.mutateAsync(callId);
- callCtx.setSharedWithTeam(newValue);
- };
-
- /** Memo so `props.isSlim` (boolean or accessor) always drives updates. */
- const isSlimLayout = createMemo((): boolean => {
+ const slim = createMemo((): boolean => {
const v = props.isSlim;
return typeof v === 'function' ? v() : v;
});
- const slim = () => isSlimLayout();
-
- const showCallLabel = createMemo(() => !isSlimLayout());
const onCallPage = createMemo(() => panel.callCtx.isCallPage());
- const showHeaderPulse = createMemo(
- () => !isSlimLayout() || (isSlimLayout() && onCallPage())
- );
+ // Hide the pulse in the slim sidebar unless we're on the active call page,
+ // so the icon-only strip doesn't read as a distracting live indicator.
+ const showHeaderPulse = () => !slim() || onCallPage();
const orderedMembers = createMemo(() => [
...panel.visibleMembers(),
...panel.overflowMembers(),
]);
- /** Full roster order for the in-call avatar strip. */
const stripStackEach = createMemo((): InCallStripImage[] => {
if (!panel.isActive()) return [];
const out: InCallStripImage[] = [];
@@ -94,70 +77,38 @@ export const InCallPanel: Component<InCallPanelProps> = (props) => {
const showExpandToFullCall = createMemo(() => !onCallPage());
- const headerRowClass = createMemo(() =>
- cn(
- 'py-1 px-2 border-b border-edge-muted bg-accent/5 rounded-t-lg flex items-center min-w-0 w-full',
- slim() ? 'justify-center' : 'justify-between'
- )
- );
-
return (
<Show when={() => panel.isActive()}>
<section
data-in-call-panel
aria-label="In call"
- class="relative isolate overflow-hidden rounded-lg border border-edge-muted"
+ class="relative isolate overflow-hidden rounded-lg border border-ink-muted/[0.08] bg-ink-muted/[0.025] divide-y divide-ink-muted/[0.08]"
>
- <div class={headerRowClass()}>
- <div
- class={cn(
- 'flex min-w-0 shrink-0 items-center gap-0.5',
- slim() && !showExpandToFullCall() && 'p-1'
- )}
- >
+ {/* Header — soup notification vocabulary: muted label, accent pulse,
+ share affordance is a single icon button (no chunky toggle switch).
+ Active = subtle accent-tinted bg. */}
+ <div
+ class={cn(
+ 'flex items-center min-w-0 w-full px-3 h-8',
+ slim() ? 'justify-center' : 'justify-between'
+ )}
+ >
+ <div class="flex min-w-0 shrink-0 items-center gap-2">
<Show when={showHeaderPulse()}>
- <span
- class={cn(
- 'size-1.5 shrink-0 rounded-full bg-accent animate-pulse',
- showCallLabel() && 'mr-1'
- )}
- />
+ <span class="size-1.5 shrink-0 rounded-full bg-accent animate-pulse" />
</Show>
-
- <Show when={showCallLabel()}>
- <span class="text-sm text-accent truncate">Call</span>
- </Show>
- </div>
-
- <div class="flex items-center gap-1 shrink-0">
<Show when={!slim()}>
- <Tooltip
- placement="top"
- label="When on, all team members can view and search this call's transcript and AI summary."
- >
- <div class="flex items-center gap-1 px-1">
- <ShareNetwork
- class={cn(
- 'size-3 shrink-0',
- callCtx.isSharedWithTeam() ? 'text-ink' : 'text-ink-muted'
- )}
- aria-hidden
- />
- <ToggleSwitch
- onChange={() => void handleToggleShareWithTeam()}
- checked={callCtx.isSharedWithTeam()}
- disabled={callCtx.isConnecting()}
- />
- </div>
- </Tooltip>
+ <span class="text-xs font-medium text-ink truncate">In call</span>
</Show>
+ </div>
+ <div class="flex items-center gap-0.5 shrink-0">
<Show when={showExpandToFullCall()}>
<button
type="button"
class={cn(
- 'shrink-0 transition-colors hover:bg-accent/30 outline-0 outline-accent/50 hover:outline-1 hover-transition-outline focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-edge-muted',
- slim() && 'animate-pulse hover:outline-0'
+ 'inline-flex items-center justify-center size-6 rounded transition-colors text-ink-muted/70 hover:text-ink hover:bg-ink-muted/[0.06]',
+ slim() && 'animate-pulse'
)}
title="Open full call view"
aria-label="Open full call view"
@@ -166,18 +117,17 @@ export const InCallPanel: Component<InCallPanelProps> = (props) => {
if (id) void openChannelCallTab(id);
}}
>
- <ArrowsOut
- class={cn('text-accent', slim() ? 'size-3.5' : 'size-4')}
- />
+ <ArrowsOut class="size-3.5" />
</button>
</Show>
</div>
</div>
+ {/* Avatars */}
<div
class={cn(
- 'px-2 py-3 bg-surface rounded-b-lg w-full',
- slim() && 'px-2 pt-2 pb-1 flex flex-col items-center gap-2'
+ 'px-3 py-2.5',
+ slim() && 'flex flex-col items-center gap-2 pt-2 pb-1'
)}
>
<div
@@ -187,7 +137,10 @@ export const InCallPanel: Component<InCallPanelProps> = (props) => {
)}
data-in-call-panel-avatars
>
- <Show when={!slim()}>
+ <Show
+ when={!slim()}
+ fallback={<InCallParticipantsListPopover panel={panel} />}
+ >
<StackedAvatarsRow<InCallStripImage>
class="w-full min-w-0"
distribute="fill"
@@ -195,7 +148,7 @@ export const InCallPanel: Component<InCallPanelProps> = (props) => {
max={6}
size={IN_CALL_STRIP_IMAGE_SIZE}
defaultEmptyUserPlaceholder
- overflowChipClass="bg-edge-muted"
+ overflowChipClass="bg-ink-muted/10"
overflowTooltipContent={(close) => (
<Surface depth={3} class="min-w-48 max-w-72">
<InCallRosterListSection
@@ -215,25 +168,30 @@ export const InCallPanel: Component<InCallPanelProps> = (props) => {
)}
</StackedAvatarsRow>
</Show>
-
- <Show when={slim()}>
- <InCallParticipantsListPopover panel={panel} />
- </Show>
</div>
</div>
- <div
- class={cn(
- !slim() && 'bg-surface border-t border-edge-muted',
- slim() && 'px-2 pt-1 pb-2'
- )}
- >
+ {/* Controls */}
+ <div class="flex justify-center px-1 py-1">
<CallControls
variant={controlsVariant()}
when={props.showCallControls}
onLeave={() => panel.controls.leaveCall()}
/>
</div>
+
+ <Show when={slim()}>
+ <div class="flex items-center justify-center px-1 py-1">
+ <button
+ class="flex items-center justify-center size-5 shrink-0 rounded-md transition-colors text-failure hover:bg-failure/10"
+ onClick={() => void panel.controls.leaveCall()}
+ aria-label="Leave call"
+ type="button"
+ >
+ <PhoneDisconnect class="size-4" />
+ </button>
+ </div>
+ </Show>
</section>
</Show>
);
diff --git a/js/app/packages/channel/Call/InCallPanel/InCallParticipantsListPopover.tsx b/js/app/packages/channel/Call/InCallPanel/InCallParticipantsListPopover.tsx
index 7a8ae70cd9..aaf19f4c7b 100644
--- a/js/app/packages/channel/Call/InCallPanel/InCallParticipantsListPopover.tsx
+++ b/js/app/packages/channel/Call/InCallPanel/InCallParticipantsListPopover.tsx
@@ -2,7 +2,7 @@ import { useSplitLayout } from '@app/component/split-layout/layout';
import { toast } from '@core/component/Toast/Toast';
import { tryMacroId, useDisplayName } from '@core/user';
import { Popover } from '@kobalte/core/popover';
-import UserCircle from '@phosphor/user-circle.svg';
+import UsersThree from '@phosphor/users-three.svg';
import { useGetOrCreateDirectMessageMutation } from '@queries/channel/get-or-create-dm';
import { cn, Surface } from '@ui';
import { createMemo, createSignal, For, Show } from 'solid-js';
@@ -143,14 +143,14 @@ export function InCallParticipantsListPopover(
as="button"
type="button"
class={cn(
- 'inline-flex items-center justify-center rounded-full bg-transparent p-0 transition-colors hover:bg-accent/15 text-accent',
+ 'inline-flex items-center justify-center rounded-md bg-transparent p-0.5 transition-colors text-ink-muted hover:text-ink hover:bg-ink-muted/[0.06]',
props.class
)}
aria-haspopup="dialog"
aria-expanded={open()}
aria-label="Everyone in call"
>
- <UserCircle class="block size-4" />
+ <UsersThree class="block size-4" />
</Popover.Trigger>
<Popover.Portal>
diff --git a/js/app/packages/channel/Call/index.ts b/js/app/packages/channel/Call/index.ts
index 465104ce48..f9361a26bd 100644
--- a/js/app/packages/channel/Call/index.ts
+++ b/js/app/packages/channel/Call/index.ts
@@ -5,10 +5,6 @@ export {
useCallContext,
useCallContextOptional,
} from './CallContext';
-export type {
- CallControlButtonSize,
- CallControlButtonVariant,
-} from './CallControls/CallControlButton';
export type {
CallControlsProps,
CallControlsVariant,
diff --git a/js/app/packages/channel/Call/use-toggle-share-with-team.ts b/js/app/packages/channel/Call/use-toggle-share-with-team.ts
new file mode 100644
index 0000000000..e1972852e7
--- /dev/null
+++ b/js/app/packages/channel/Call/use-toggle-share-with-team.ts
@@ -0,0 +1,18 @@
+import { useToggleShareWithTeamMutation } from '@queries/call/call';
+import { useCallContext } from './CallContext';
+
+/**
+ * Returns a handler that flips the active call's `shared_with_team` flag and
+ * mirrors the new value into the local call store. No-op when there's no
+ * active call.
+ */
+export function useToggleShareWithTeam() {
+ const callCtx = useCallContext();
+ const mutation = useToggleShareWithTeamMutation();
+ return async () => {
+ const callId = callCtx.activeCallId();
+ if (!callId) return;
+ const newValue = await mutation.mutateAsync(callId);
+ callCtx.setSharedWithTeam(newValue);
+ };
+}
diff --git a/js/app/packages/icon/wide-call-disconnect.svg b/js/app/packages/icon/wide-call-disconnect.svg
index eedf7adbb7..f1828baf6e 100644
--- a/js/app/packages/icon/wide-call-disconnect.svg
+++ b/js/app/packages/icon/wide-call-disconnect.svg
@@ -1,4 +1,4 @@
-<svg width="100%" height="100%" viewBox="0 -3 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg">
+<svg width="100%" height="100%" viewBox="-2 -6.5 22 22" fill="none" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg">
<path d="M15.48,11.72H2.52c-.41,0-.73-.33-.73-.73s.33-.73.73-.73h12.96c.41,0,.73.33.73.73s-.33.73-.73.73Z" fill="currentColor" stroke="none"/>
<path d="M2.26,7.3c-.17.07-.36.05-.49-.07-.32-.29-.58-.64-.77-1.03-.33-.68-.34-1.44-.01-2.13.63-1.33,2.21-2.17,3.55-2.63,2.09-.71,4.51-.85,6.68-.53.76.11,1.51.29,2.24.53,1.35.46,2.95,1.31,3.57,2.66.31.67.3,1.41-.02,2.07-.18.38-.42.7-.72,1-.14.14-.34.22-.53.13l-3.06-1.35c-.2-.09-.32-.33-.32-.54v-1.17c0-.14-.05-.28-.13-.39-.09-.14-.23-.21-.39-.25-1.88-.36-3.81-.36-5.69,0-.16.03-.29.08-.38.22s-.14.27-.14.43v1.17c0,.2-.12.44-.31.53l-3.06,1.35Z"/>
</svg>
diff --git a/js/bun.lock b/js/bun.lock
index ac5170a339..34867994c4 100644
--- a/js/bun.lock
+++ b/js/bun.lock
@@ -824,7 +824,7 @@
"@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw=="],
- "@inkibra/tauri-plugins": ["@inkibra/tauri-plugins@github:macro-inc/tauri-plugins#6152009", { "dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1" } }, "macro-inc-tauri-plugins-6152009"],
+ "@inkibra/tauri-plugins": ["@inkibra/tauri-plugins@github:macro-inc/tauri-plugins#6152009", { "dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1" } }, "macro-inc-tauri-plugins-6152009", "sha512-XLN+niDA9BkzrxiZqBjYf+DL4TLoMIcI80ypCowacVfrfAjWt0qLwLkzWVUXjD7k3v0DB/G+BP4OLJNkGygHIw=="],
"@inquirer/external-editor": ["@inquirer/[email protected]", "", { "dependencies": { "chardet": "^2.1.1", "iconv-lite": "^0.7.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA=="],
@@ -2544,7 +2544,7 @@
"pathval": ["[email protected]", "", {}, "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ=="],
- "pdfjs-dist": ["pdfjs-dist@github:macro-inc/pdf.js#f9b2ce6", { "dependencies": { "dommatrix": "^1.0.3", "web-streams-polyfill": "^3.2.1" }, "peerDependencies": { "worker-loader": "^3.0.8" }, "optionalPeers": ["worker-loader"] }, "macro-inc-pdf.js-f9b2ce6"],
+ "pdfjs-dist": ["pdfjs-dist@github:macro-inc/pdf.js#f9b2ce6", { "dependencies": { "dommatrix": "^1.0.3", "web-streams-polyfill": "^3.2.1" }, "peerDependencies": { "worker-loader": "^3.0.8" }, "optionalPeers": ["worker-loader"] }, "macro-inc-pdf.js-f9b2ce6", "sha512-HDFaPbCxLG2GHpf1smUG97nku5aPGBGaCcIbK05dGdp07TBLUlDcXsM4WcE82mO5W4RBPIBVYobX5N/6M6NFrA=="],
"performance-now": ["[email protected]", "", {}, "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="],