mirror of
https://github.com/block/buzz.git
synced 2026-12-01 13:42:45 +00:00
fix(desktop): isolate main timeline stacking context from focus drawer (#6398)
The "Jump to latest" pill (`z-50`) in the main timeline renders on top of the focus thread drawer (`z-41`) because both share the same stacking context. This wraps the timeline contents in an `isolate` div so the pill's z-index can't escape above the drawer. The diff is large but the actual change is two lines — one wrapper `<div>`. The rest is biome re-indenting the children. The `DropZoneOverlay` also moves inside the wrapper, so its top edge no longer extends behind the header during drag-over. ### Repro 1. Open a channel with enough history to scroll up past the bottom 2. Scroll up so the "Jump to latest" pill appears 3. Open a thread in focus mode — the pill renders on top of the drawer ### Related issue None found. Before: <img width="824" height="730" alt="Before" src="https://github.com/user-attachments/assets/eae0eb88-bcef-4c2a-bb05-08d0af6f7f38" /> After: <img width="1280" height="720" alt="after-drawer-hides-pill" src="https://github.com/user-attachments/assets/0370ba71-efc5-478a-a8e0-aac902a66082" /> Signed-off-by: Matt Krueger <krueger.matt@ymail.com> Co-authored-by: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -567,192 +567,194 @@ export const ChannelPane = React.memo(function ChannelPane({
|
||||
}
|
||||
>
|
||||
{isHuddleTranscript ? null : header}
|
||||
<MessageTimeline
|
||||
ref={messageTimelineRef}
|
||||
channelId={activeChannel?.id}
|
||||
channelIntro={channelIntro}
|
||||
directMessageIntro={directMessageIntro}
|
||||
scrollContainerRef={timelineScrollRef}
|
||||
currentPubkey={currentPubkey}
|
||||
fetchOlder={fetchOlder}
|
||||
followThreadById={followThreadById}
|
||||
hasComposerOverlay={hasMainComposerOverlay}
|
||||
hasOlderMessages={hasOlderMessages}
|
||||
historyExhausted={historyExhausted}
|
||||
hideDayDividers={isHuddleTranscript}
|
||||
alwaysShowMessageIdentity={isHuddleTranscript}
|
||||
hideAgentAccessBadges={isHuddleTranscript}
|
||||
pinnedIntro={
|
||||
isHuddleTranscript ? <HuddleTranscriptIntro /> : undefined
|
||||
}
|
||||
huddleMemberPubkeys={huddleMemberPubkeys}
|
||||
huddleMemberPubkeysPending={huddleMemberPubkeysPending}
|
||||
isFetchingOlder={isFetchingOlder}
|
||||
isFollowingThreadById={isFollowingThreadById}
|
||||
isMessageUnreadById={isMessageUnreadById}
|
||||
personaLookup={personaLookup}
|
||||
profiles={profiles}
|
||||
ownerProfiles={ownerProfiles}
|
||||
unfollowThreadById={unfollowThreadById}
|
||||
emptyDescription={
|
||||
activeChannel?.channelType === "forum"
|
||||
? "Select a stream or DM to load real message history in this first integration pass."
|
||||
: "Messages and sub-replies will appear here once the relay has history for this channel."
|
||||
}
|
||||
emptyTitle={
|
||||
activeChannel
|
||||
? activeChannel.channelType === "forum"
|
||||
? "Forum channels are next"
|
||||
: "No messages yet"
|
||||
: "No channel selected"
|
||||
}
|
||||
isLoading={isHuddleTranscript ? false : isTimelineLoading}
|
||||
entranceMessageId={entranceMessageId}
|
||||
onEntranceMessageComplete={onEntranceMessageComplete}
|
||||
mainEntries={mainTimelineEntries}
|
||||
threadSummaries={threadSummaries}
|
||||
messages={visibleMessages}
|
||||
firstUnreadMessageId={firstUnreadMessageId}
|
||||
unreadCount={unreadCount}
|
||||
onDelete={onDelete}
|
||||
onEdit={onEdit}
|
||||
onMarkUnread={onMarkUnread}
|
||||
onMarkRead={onMarkRead}
|
||||
onReply={timelineReplyHandler}
|
||||
onOpenThread={isHuddleTranscript ? undefined : onOpenThread}
|
||||
channelName={activeChannel?.name}
|
||||
channelType={activeChannel?.channelType ?? null}
|
||||
isSendingVideoReviewComment={isSending}
|
||||
onSendVideoReviewComment={
|
||||
activeChannel?.archivedAt ? undefined : onSendVideoReviewComment
|
||||
}
|
||||
onTargetReached={onTargetReached}
|
||||
onToggleReaction={onToggleReaction}
|
||||
targetMessageId={targetMessageId}
|
||||
splitThreadPanelOpen={
|
||||
useSplitAuxiliaryPane &&
|
||||
!useFocusThreadDrawer &&
|
||||
Boolean(openThreadHeadId)
|
||||
}
|
||||
threadUnreadCounts={threadUnreadCounts}
|
||||
/>
|
||||
{isNonMemberView ? (
|
||||
<div
|
||||
data-testid="join-banner"
|
||||
className="flex items-center gap-3 border-t border-border/80 bg-card/50 px-5 py-3"
|
||||
>
|
||||
<div className="flex min-w-0 flex-1 items-center gap-2 text-sm text-muted-foreground">
|
||||
<Hash className="h-4 w-4 shrink-0" />
|
||||
<span className="truncate">
|
||||
Viewing{" "}
|
||||
<span className="font-medium text-foreground">
|
||||
#{activeChannel?.name}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<Button
|
||||
disabled={isJoining}
|
||||
onClick={() => {
|
||||
void onJoinChannel?.();
|
||||
}}
|
||||
size="sm"
|
||||
variant="default"
|
||||
>
|
||||
<LogIn className="mr-1.5 h-4 w-4" />
|
||||
{isJoining ? "Joining..." : "Join to participate"}
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
className="pointer-events-none absolute inset-x-0 bottom-0 z-40 isolate before:absolute before:inset-x-0 before:bottom-0 before:-z-10 before:h-24 before:bg-gradient-to-b before:from-transparent before:to-background before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:-z-10 after:h-12 after:bg-background after:content-['']"
|
||||
data-testid="channel-composer-overlay"
|
||||
ref={composerWrapperRef}
|
||||
>
|
||||
<ComposerUploadProgressOverlay />
|
||||
<div className="relative isolate flex min-h-0 min-w-0 flex-1 flex-col">
|
||||
<MessageTimeline
|
||||
ref={messageTimelineRef}
|
||||
channelId={activeChannel?.id}
|
||||
channelIntro={channelIntro}
|
||||
directMessageIntro={directMessageIntro}
|
||||
scrollContainerRef={timelineScrollRef}
|
||||
currentPubkey={currentPubkey}
|
||||
fetchOlder={fetchOlder}
|
||||
followThreadById={followThreadById}
|
||||
hasComposerOverlay={hasMainComposerOverlay}
|
||||
hasOlderMessages={hasOlderMessages}
|
||||
historyExhausted={historyExhausted}
|
||||
hideDayDividers={isHuddleTranscript}
|
||||
alwaysShowMessageIdentity={isHuddleTranscript}
|
||||
hideAgentAccessBadges={isHuddleTranscript}
|
||||
pinnedIntro={
|
||||
isHuddleTranscript ? <HuddleTranscriptIntro /> : undefined
|
||||
}
|
||||
huddleMemberPubkeys={huddleMemberPubkeys}
|
||||
huddleMemberPubkeysPending={huddleMemberPubkeysPending}
|
||||
isFetchingOlder={isFetchingOlder}
|
||||
isFollowingThreadById={isFollowingThreadById}
|
||||
isMessageUnreadById={isMessageUnreadById}
|
||||
personaLookup={personaLookup}
|
||||
profiles={profiles}
|
||||
ownerProfiles={ownerProfiles}
|
||||
unfollowThreadById={unfollowThreadById}
|
||||
emptyDescription={
|
||||
activeChannel?.channelType === "forum"
|
||||
? "Select a stream or DM to load real message history in this first integration pass."
|
||||
: "Messages and sub-replies will appear here once the relay has history for this channel."
|
||||
}
|
||||
emptyTitle={
|
||||
activeChannel
|
||||
? activeChannel.channelType === "forum"
|
||||
? "Forum channels are next"
|
||||
: "No messages yet"
|
||||
: "No channel selected"
|
||||
}
|
||||
isLoading={isHuddleTranscript ? false : isTimelineLoading}
|
||||
entranceMessageId={entranceMessageId}
|
||||
onEntranceMessageComplete={onEntranceMessageComplete}
|
||||
mainEntries={mainTimelineEntries}
|
||||
threadSummaries={threadSummaries}
|
||||
messages={visibleMessages}
|
||||
firstUnreadMessageId={firstUnreadMessageId}
|
||||
unreadCount={unreadCount}
|
||||
onDelete={onDelete}
|
||||
onEdit={onEdit}
|
||||
onMarkUnread={onMarkUnread}
|
||||
onMarkRead={onMarkRead}
|
||||
onReply={timelineReplyHandler}
|
||||
onOpenThread={isHuddleTranscript ? undefined : onOpenThread}
|
||||
channelName={activeChannel?.name}
|
||||
channelType={activeChannel?.channelType ?? null}
|
||||
isSendingVideoReviewComment={isSending}
|
||||
onSendVideoReviewComment={
|
||||
activeChannel?.archivedAt ? undefined : onSendVideoReviewComment
|
||||
}
|
||||
onTargetReached={onTargetReached}
|
||||
onToggleReaction={onToggleReaction}
|
||||
targetMessageId={targetMessageId}
|
||||
splitThreadPanelOpen={
|
||||
useSplitAuxiliaryPane &&
|
||||
!useFocusThreadDrawer &&
|
||||
Boolean(openThreadHeadId)
|
||||
}
|
||||
threadUnreadCounts={threadUnreadCounts}
|
||||
/>
|
||||
{isNonMemberView ? (
|
||||
<div
|
||||
className={cn(
|
||||
"composer-dock composer-overlay-corner-masks relative pointer-events-auto",
|
||||
hasComposerBottomActivity && "composer-dock--with-activity",
|
||||
)}
|
||||
data-testid="join-banner"
|
||||
className="flex items-center gap-3 border-t border-border/80 bg-card/50 px-5 py-3"
|
||||
>
|
||||
{isActiveWelcomeChannel && !timeoutState.active ? (
|
||||
<WelcomeComposerGuidanceLayer
|
||||
onDismiss={handleDismissWelcomeBanner}
|
||||
settingUp={welcomeKickoffSettingUp}
|
||||
state={welcomeComposerBannerState}
|
||||
>
|
||||
{welcomeKickoffStage}
|
||||
</WelcomeComposerGuidanceLayer>
|
||||
) : null}
|
||||
{timeoutState.active ? (
|
||||
<ComposerTimeoutBanner
|
||||
expiresAtMs={timeoutState.expiresAtMs}
|
||||
<div className="flex min-w-0 flex-1 items-center gap-2 text-sm text-muted-foreground">
|
||||
<Hash className="h-4 w-4 shrink-0" />
|
||||
<span className="truncate">
|
||||
Viewing{" "}
|
||||
<span className="font-medium text-foreground">
|
||||
#{activeChannel?.name}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<Button
|
||||
disabled={isJoining}
|
||||
onClick={() => {
|
||||
void onJoinChannel?.();
|
||||
}}
|
||||
size="sm"
|
||||
variant="default"
|
||||
>
|
||||
<LogIn className="mr-1.5 h-4 w-4" />
|
||||
{isJoining ? "Joining..." : "Join to participate"}
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
className="pointer-events-none absolute inset-x-0 bottom-0 z-40 isolate before:absolute before:inset-x-0 before:bottom-0 before:-z-10 before:h-24 before:bg-gradient-to-b before:from-transparent before:to-background before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:-z-10 after:h-12 after:bg-background after:content-['']"
|
||||
data-testid="channel-composer-overlay"
|
||||
ref={composerWrapperRef}
|
||||
>
|
||||
<ComposerUploadProgressOverlay />
|
||||
<div
|
||||
className={cn(
|
||||
"composer-dock composer-overlay-corner-masks relative pointer-events-auto",
|
||||
hasComposerBottomActivity && "composer-dock--with-activity",
|
||||
)}
|
||||
>
|
||||
{isActiveWelcomeChannel && !timeoutState.active ? (
|
||||
<WelcomeComposerGuidanceLayer
|
||||
onDismiss={handleDismissWelcomeBanner}
|
||||
settingUp={welcomeKickoffSettingUp}
|
||||
state={welcomeComposerBannerState}
|
||||
>
|
||||
{welcomeKickoffStage}
|
||||
</WelcomeComposerGuidanceLayer>
|
||||
) : null}
|
||||
{timeoutState.active ? (
|
||||
<ComposerTimeoutBanner
|
||||
expiresAtMs={timeoutState.expiresAtMs}
|
||||
/>
|
||||
) : null}
|
||||
<ComposerDockBackdrop gutterClassName="inset-x-5" />
|
||||
<MessageComposer
|
||||
channelId={activeChannel?.id ?? null}
|
||||
channelName={activeChannel?.name ?? "channel"}
|
||||
channelType={activeChannel?.channelType ?? null}
|
||||
containerClassName="px-5 pb-0"
|
||||
layoutMode="dock"
|
||||
disabled={isComposerDisabled}
|
||||
editTarget={mainEditTarget}
|
||||
autoSubmitDraftKey={autoSendDraftKey}
|
||||
onAutoSubmitComplete={handleAutoSubmitComplete}
|
||||
isSending={isSending}
|
||||
mediaController={mainComposerMedia}
|
||||
onDeferredEditPendingChange={setMainDeferredEditPending}
|
||||
onCancelEdit={onCancelEdit}
|
||||
onEditLastOwnMessage={handleEditLastOwnMainMessage}
|
||||
onEditSave={onEditSave}
|
||||
onPrepareSendChannel={
|
||||
activeChannel?.channelType === "dm"
|
||||
? prepareDmSendChannel
|
||||
: undefined
|
||||
}
|
||||
onSend={handleSendMessage}
|
||||
profiles={profiles}
|
||||
showBackgroundUploadProgress={false}
|
||||
placeholder={
|
||||
timeoutState.active
|
||||
? "You're timed out by community moderators."
|
||||
: isModerationDmChannel
|
||||
? "This channel is read-only."
|
||||
: activeChannel?.archivedAt
|
||||
? "Archived channels are read-only."
|
||||
: activeChannel?.channelType === "forum"
|
||||
? "Forum posting is not wired in this pass."
|
||||
: activeChannel
|
||||
? activeChannel.channelType === "dm" &&
|
||||
directMessageIntro
|
||||
? `Message ${directMessageIntro.displayName}`
|
||||
: `Message #${activeChannel.name}`
|
||||
: "Select a channel"
|
||||
}
|
||||
showTopBorder={false}
|
||||
/>
|
||||
) : null}
|
||||
<ComposerDockBackdrop gutterClassName="inset-x-5" />
|
||||
<MessageComposer
|
||||
channelId={activeChannel?.id ?? null}
|
||||
channelName={activeChannel?.name ?? "channel"}
|
||||
channelType={activeChannel?.channelType ?? null}
|
||||
containerClassName="px-5 pb-0"
|
||||
layoutMode="dock"
|
||||
disabled={isComposerDisabled}
|
||||
editTarget={mainEditTarget}
|
||||
autoSubmitDraftKey={autoSendDraftKey}
|
||||
onAutoSubmitComplete={handleAutoSubmitComplete}
|
||||
isSending={isSending}
|
||||
mediaController={mainComposerMedia}
|
||||
onDeferredEditPendingChange={setMainDeferredEditPending}
|
||||
onCancelEdit={onCancelEdit}
|
||||
onEditLastOwnMessage={handleEditLastOwnMainMessage}
|
||||
onEditSave={onEditSave}
|
||||
onPrepareSendChannel={
|
||||
activeChannel?.channelType === "dm"
|
||||
? prepareDmSendChannel
|
||||
: undefined
|
||||
}
|
||||
onSend={handleSendMessage}
|
||||
profiles={profiles}
|
||||
showBackgroundUploadProgress={false}
|
||||
placeholder={
|
||||
timeoutState.active
|
||||
? "You're timed out by community moderators."
|
||||
: isModerationDmChannel
|
||||
? "This channel is read-only."
|
||||
: activeChannel?.archivedAt
|
||||
? "Archived channels are read-only."
|
||||
: activeChannel?.channelType === "forum"
|
||||
? "Forum posting is not wired in this pass."
|
||||
: activeChannel
|
||||
? activeChannel.channelType === "dm" &&
|
||||
directMessageIntro
|
||||
? `Message ${directMessageIntro.displayName}`
|
||||
: `Message #${activeChannel.name}`
|
||||
: "Select a channel"
|
||||
}
|
||||
showTopBorder={false}
|
||||
/>
|
||||
{/* The activity accessory is anchored in the dock's reserved
|
||||
{/* The activity accessory is anchored in the dock's reserved
|
||||
bottom rail, so fading it cannot change the observed
|
||||
overlay height or move the conversation. Its natural
|
||||
content height remains responsive. */}
|
||||
<ChannelComposerActivityAccessory
|
||||
agents={activityAgents}
|
||||
channel={activeChannel}
|
||||
currentPubkey={currentPubkey}
|
||||
onOpenAgentSession={onOpenAgentSession}
|
||||
openAgentSessionPubkey={openAgentSessionPubkey}
|
||||
profiles={profiles}
|
||||
typingPubkeys={typingPubkeys}
|
||||
visible={hasComposerBottomActivity}
|
||||
workingBotPubkeys={composerWorkingBotPubkeys}
|
||||
/>
|
||||
<ChannelComposerActivityAccessory
|
||||
agents={activityAgents}
|
||||
channel={activeChannel}
|
||||
currentPubkey={currentPubkey}
|
||||
onOpenAgentSession={onOpenAgentSession}
|
||||
openAgentSessionPubkey={openAgentSessionPubkey}
|
||||
profiles={profiles}
|
||||
typingPubkeys={typingPubkeys}
|
||||
visible={hasComposerBottomActivity}
|
||||
workingBotPubkeys={composerWorkingBotPubkeys}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{canDropInMainColumn && mainComposerMedia.isDragOver ? (
|
||||
<DropZoneOverlay className="z-50 rounded-2xl bg-primary/20 backdrop-blur-sm" />
|
||||
) : null}
|
||||
)}
|
||||
{canDropInMainColumn && mainComposerMedia.isDragOver ? (
|
||||
<DropZoneOverlay className="z-50 rounded-2xl bg-primary/20 backdrop-blur-sm" />
|
||||
) : null}
|
||||
</div>
|
||||
</section>
|
||||
) : null}
|
||||
|
||||
|
||||
@@ -129,10 +129,12 @@ const REDUCED_MOTION_TRANSITION = { duration: 0.12, ease: "linear" } as const;
|
||||
* header's breadcrumb, where the eye already is — the sliver carries no label of
|
||||
* its own.
|
||||
*
|
||||
* `z-41` puts the overlay above the channel timeline, its `z-40` composer
|
||||
* overlay and the `z-30` shared header backdrop, while staying below the global
|
||||
* `z-45` top chrome. Setting z-index on the positioned container also gives the
|
||||
* drawer its own stacking context, so the panel chrome inside it is isolated.
|
||||
* `z-41` places the drawer above the channel section (whose inner `isolate`
|
||||
* wrapper traps the timeline's z-50 pill, z-40 composer overlay, and z-50 drop
|
||||
* overlay) and the `z-30` shared header backdrop, while staying below the
|
||||
* global `z-45` top chrome. Setting z-index on the positioned container also
|
||||
* gives the drawer its own stacking context, so the panel chrome inside is
|
||||
* isolated.
|
||||
*/
|
||||
export function FocusThreadDrawer({
|
||||
channelName,
|
||||
|
||||
Reference in New Issue
Block a user