mirror of
https://github.com/block/buzz.git
synced 2026-10-30 22:11:36 +00:00
fix(composer): reconcile live-activity strip with the dock geometry from #3151
Post-rebase integration fixes after rebasing onto main, which landed the composer dock geometry contract (PR #3151) in the same region this branch reworks. The rebase kept main's dock architecture (reserved bottom rail + ComposerActivityAccessory fade) with the branch's pill strip rendered inside it; this commit cleans up the fallout: - ChannelPane.tsx: re-add the useChannelWorkingAgentPubkeys import — the dock's reserved-rail toggle (composer-dock--with-activity) still needs the channel-level working-set check even though ChannelComposerActivityRow computes its own copy — and consolidate the gating into a single hasComposerBottomActivity expression - ChannelComposerActivityAccessory.tsx: delete — main's channel-level wrapper from #3151 is fully superseded by ChannelComposerActivityRow rendered inside ComposerActivityAccessory - AppShell.tsx / routes/root.tsx: move the temporary DebugHarnessMount from AppShell (999/1000 lines on main, so the mount no longer fits the file-size ratchet) to the root route via a RootComponent wrapper - agents/debug/README.md + DebugHarnessMount.tsx: update the removal instructions and header comment for the new mount location Validated with just desktop-check, 3,817 desktop unit tests, and the channels / composer-overflow / threadpane-ultrawide e2e specs (88 passing). Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
This commit is contained in:
@@ -1,69 +1,52 @@
|
||||
import type { ComponentProps } from "react";
|
||||
|
||||
import { CardMintComposerChip } from "@/features/agents/ui/CardMintComposerChip";
|
||||
import { useCardMintJobs } from "@/features/agents/cardMintStore";
|
||||
import { BotActivityComposerAction } from "@/features/channels/ui/BotActivityBar";
|
||||
import { CardMintComposerChip } from "@/features/agents/ui/CardMintComposerChip";
|
||||
import { ChannelComposerActivityRow } from "@/features/channels/ui/ChannelComposerActivityRow";
|
||||
import { ComposerActivityAccessory } from "@/features/messages/ui/ComposerActivityAccessory";
|
||||
import { TypingIndicatorRow } from "@/features/messages/ui/TypingIndicatorRow";
|
||||
|
||||
type ChannelComposerActivityAccessoryProps = {
|
||||
agents: ComponentProps<typeof BotActivityComposerAction>["agents"];
|
||||
channel: ComponentProps<typeof TypingIndicatorRow>["channel"];
|
||||
currentPubkey: ComponentProps<typeof TypingIndicatorRow>["currentPubkey"];
|
||||
agents: ComponentProps<typeof ChannelComposerActivityRow>["agents"];
|
||||
channel: ComponentProps<typeof ChannelComposerActivityRow>["channel"];
|
||||
currentPubkey: ComponentProps<
|
||||
typeof ChannelComposerActivityRow
|
||||
>["currentPubkey"];
|
||||
onOpenAgentSession: ComponentProps<
|
||||
typeof BotActivityComposerAction
|
||||
typeof ChannelComposerActivityRow
|
||||
>["onOpenAgentSession"];
|
||||
openAgentSessionPubkey: ComponentProps<
|
||||
typeof BotActivityComposerAction
|
||||
>["openAgentSessionPubkey"];
|
||||
profiles: ComponentProps<typeof BotActivityComposerAction>["profiles"];
|
||||
profiles: ComponentProps<typeof ChannelComposerActivityRow>["profiles"];
|
||||
typingPubkeys: string[];
|
||||
visible: boolean;
|
||||
workingBotPubkeys: string[];
|
||||
};
|
||||
|
||||
/** Main's shared channel activity host with the unified live-activity strip. */
|
||||
export function ChannelComposerActivityAccessory({
|
||||
agents,
|
||||
channel,
|
||||
currentPubkey,
|
||||
onOpenAgentSession,
|
||||
openAgentSessionPubkey,
|
||||
profiles,
|
||||
typingPubkeys,
|
||||
visible,
|
||||
workingBotPubkeys,
|
||||
}: ChannelComposerActivityAccessoryProps) {
|
||||
const cardMintJobs = useCardMintJobs();
|
||||
|
||||
return (
|
||||
<ComposerActivityAccessory
|
||||
className="px-5"
|
||||
testId="channel-composer-activity-row"
|
||||
visible={visible}
|
||||
>
|
||||
<div className="flex w-full items-center gap-2 overflow-visible pl-2">
|
||||
<div className="flex h-8.5 w-full items-center gap-2 overflow-visible pb-1.5 pl-2">
|
||||
{cardMintJobs.length > 0 ? <CardMintComposerChip /> : null}
|
||||
{workingBotPubkeys.length > 0 ? (
|
||||
<div className="flex min-w-0 flex-1 overflow-visible">
|
||||
<BotActivityComposerAction
|
||||
agents={agents}
|
||||
channelId={channel?.id ?? null}
|
||||
onOpenAgentSession={onOpenAgentSession}
|
||||
openAgentSessionPubkey={openAgentSessionPubkey}
|
||||
profiles={profiles}
|
||||
workingBotPubkeys={workingBotPubkeys}
|
||||
variant="inline"
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
{typingPubkeys.length > 0 ? (
|
||||
<TypingIndicatorRow
|
||||
channel={channel}
|
||||
className="min-w-0 flex-1 py-0 pl-[calc(0.75rem+1px)] pr-0 sm:pl-[calc(1rem+1px)]"
|
||||
currentPubkey={currentPubkey}
|
||||
profiles={profiles}
|
||||
typingPubkeys={typingPubkeys}
|
||||
/>
|
||||
) : null}
|
||||
<ChannelComposerActivityRow
|
||||
agents={agents}
|
||||
channel={channel}
|
||||
currentPubkey={currentPubkey}
|
||||
onOpenAgentSession={onOpenAgentSession}
|
||||
profiles={profiles}
|
||||
typingPubkeys={typingPubkeys}
|
||||
/>
|
||||
</div>
|
||||
</ComposerActivityAccessory>
|
||||
);
|
||||
|
||||
@@ -132,11 +132,7 @@ export function ChannelComposerActivityRow({
|
||||
}, [agentTypingPubkeys.length, agents, profiles]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className="h-8.5 overflow-visible bg-background px-5 pb-1.5 pt-0"
|
||||
data-testid="channel-composer-activity-row"
|
||||
>
|
||||
<div className="flex h-full w-full items-center overflow-visible">
|
||||
<div className="flex min-w-0 flex-1 items-center overflow-visible">
|
||||
{/* One strip hosts both groups: working pills plus the typing group
|
||||
as the strip's trailing slot sibling, so they share the scroller,
|
||||
edge fades, and layout/enter/exit animations. When the row gets
|
||||
@@ -165,7 +161,6 @@ export function ChannelComposerActivityRow({
|
||||
workingBotPubkeys={pillBotPubkeys}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -38,8 +38,7 @@ import { useFocusDrawerPresence } from "@/features/channels/ui/useFocusDrawerPre
|
||||
import { useChannelWorkingAgentPubkeys } from "@/features/agents/agentWorkingSignal";
|
||||
import { useCardMintJobs } from "@/features/agents/cardMintStore";
|
||||
import { BotActivityComposerAction } from "@/features/channels/ui/BotActivityBar";
|
||||
import { ChannelComposerActivityRow } from "@/features/channels/ui/ChannelComposerActivityRow";
|
||||
import { ComposerActivityAccessory } from "@/features/messages/ui/ComposerActivityAccessory";
|
||||
import { ChannelComposerActivityAccessory } from "@/features/channels/ui/ChannelComposerActivityAccessory";
|
||||
import { TypingIndicatorRow } from "@/features/messages/ui/TypingIndicatorRow";
|
||||
import {
|
||||
containsWelcomePersonaMention,
|
||||
@@ -740,16 +739,15 @@ export const ChannelPane = React.memo(function ChannelPane({
|
||||
bottom rail, so fading it cannot change the observed
|
||||
overlay height or move the conversation. Its natural
|
||||
content height remains responsive. */}
|
||||
<ComposerActivityAccessory visible={hasComposerBottomActivity}>
|
||||
<ChannelComposerActivityRow
|
||||
agents={activityAgents}
|
||||
channel={activeChannel}
|
||||
currentPubkey={currentPubkey}
|
||||
onOpenAgentSession={onOpenAgentSession}
|
||||
profiles={profiles}
|
||||
typingPubkeys={typingPubkeys}
|
||||
/>
|
||||
</ComposerActivityAccessory>
|
||||
<ChannelComposerActivityAccessory
|
||||
agents={activityAgents}
|
||||
channel={activeChannel}
|
||||
currentPubkey={currentPubkey}
|
||||
onOpenAgentSession={onOpenAgentSession}
|
||||
profiles={profiles}
|
||||
typingPubkeys={typingPubkeys}
|
||||
visible={hasComposerBottomActivity}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user