fix(desktop): align channel actions with header

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Thomas Petersen
2026-06-03 21:58:10 -04:00
co-authored by Cursor
parent 0c225f4d7d
commit 1bf851dbe0
4 changed files with 26 additions and 13 deletions
@@ -87,7 +87,7 @@ export function ChannelMembersBar({
<div className="flex items-center gap-1">
<Button
aria-label="Add agent"
className="h-7 w-7 rounded-full"
className="h-6 w-6 rounded-full"
data-testid="channel-add-bot-trigger"
disabled={!canAddAgents}
onClick={() => {
@@ -97,25 +97,25 @@ export function ChannelMembersBar({
type="button"
variant="outline"
>
<Plus className="h-3 w-3" />
<Plus className="h-2.5 w-2.5" />
</Button>
<Button
aria-label={`View channel members (${memberCount})`}
className="h-7 gap-1 rounded-full px-2"
className="h-6 gap-1 rounded-full px-1.5"
data-testid="channel-members-trigger"
onClick={onToggleMembers}
type="button"
variant="outline"
>
<Users className="h-3 w-3" />
<span className="min-w-[1ch] text-[11px] font-medium tabular-nums">
<Users className="h-2 w-2" />
<span className="min-w-[1ch] text-[10px] font-medium tabular-nums">
{memberCount}
</span>
</Button>
<HuddleIndicator
className="h-7 w-7"
className="h-6 w-6 [&_svg]:h-3 [&_svg]:w-3"
channelId={channel.id}
onStart={async () => {
try {
@@ -132,14 +132,14 @@ export function ChannelMembersBar({
<Button
aria-label="Manage channel"
className="h-7 w-7 rounded-full"
className="h-6 w-6 rounded-full"
data-testid="channel-management-trigger"
onClick={onManageChannel}
size="icon"
type="button"
variant="outline"
>
<Settings2 className="h-3 w-3" />
<Settings2 className="h-2 w-2" />
</Button>
</div>
@@ -79,7 +79,6 @@ export function ChannelScreenHeader({
return (
<ChatHeader
actionsPlacement="top-right"
belowSystemChrome
density="compact"
actions={actions}
+8 -1
View File
@@ -91,6 +91,13 @@ export function ChatHeader({
statusBadge,
}: ChatHeaderProps) {
const trimmedDescription = description?.trim() ?? "";
const compactUpdateIndicatorProps =
density === "compact"
? {
className: "h-6 w-6",
iconClassName: "h-3 w-3",
}
: {};
const topRightActions = (
<div className="fixed right-3 top-[9px] z-[45] flex shrink-0 items-center gap-1">
<UpdateIndicator />
@@ -138,7 +145,7 @@ export function ChatHeader({
)
) : (
<div className="flex shrink-0 items-center gap-1">
<UpdateIndicator />
<UpdateIndicator {...compactUpdateIndicatorProps} />
{actions ? <div className="shrink-0">{actions}</div> : null}
</div>
)}
@@ -1,6 +1,7 @@
import { Loader2, RefreshCcw, RotateCw } from "lucide-react";
import { Button } from "@/shared/ui/button";
import { cn } from "@/shared/lib/cn";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/shared/ui/tooltip";
import { useUpdaterContext } from "./hooks/UpdaterProvider";
@@ -58,7 +59,13 @@ function getVariant(state: UpdateStatus["state"]) {
return null;
}
export function UpdateIndicator({ className }: { className?: string }) {
export function UpdateIndicator({
className,
iconClassName,
}: {
className?: string;
iconClassName?: string;
}) {
const { status, downloadAndInstall, relaunch } = useUpdaterContext();
const variant = getVariant(status.state);
@@ -80,7 +87,7 @@ export function UpdateIndicator({ className }: { className?: string }) {
<TooltipTrigger asChild>
<Button
aria-label={label}
className={`${indicatorButtonClass} ${className ?? ""}`}
className={cn(indicatorButtonClass, className)}
disabled={!isActionable}
onClick={() => {
if (handleClick) {
@@ -91,7 +98,7 @@ export function UpdateIndicator({ className }: { className?: string }) {
type="button"
variant="ghost"
>
<Icon className={variantIconClass} />
<Icon className={cn(variantIconClass, iconClassName)} />
<span
className={`absolute right-1 top-1 h-1.5 w-1.5 rounded-full ${badgeColor} animate-pulse`}
/>