fix(channels): satisfy pane size ratchet

Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
Wrench
2026-08-23 23:50:21 -04:00
parent c9e8056f3f
commit 19fe55e2d7

View File

@@ -265,7 +265,6 @@ export const ChannelPane = React.memo(function ChannelPane({
onEdit(target);
return true;
}, [findLastOwnEditable, messages, onEdit]);
const handleEditLastOwnThreadMessage = React.useCallback((): boolean => {
if (!onEdit) return false;
const scope: TimelineMessage[] = [];
@@ -286,7 +285,6 @@ export const ChannelPane = React.memo(function ChannelPane({
currentPubkey,
relaySelfQuery.data,
);
const isComposerDisabled =
!activeChannel?.isMember ||
activeChannel.archivedAt !== null ||
@@ -296,7 +294,6 @@ export const ChannelPane = React.memo(function ChannelPane({
isSending;
const knownAgentPubkeys = React.useMemo(() => {
const pubkeys = new Set<string>();
for (const pubkey of agentPubkeys ?? []) {
pubkeys.add(pubkey.toLowerCase());
}
@@ -306,7 +303,6 @@ export const ChannelPane = React.memo(function ChannelPane({
for (const agent of activityAgents) {
pubkeys.add(agent.pubkey.toLowerCase());
}
return pubkeys;
}, [activityAgents, agentPubkeys, agentSessionAgents]);
const handleSendMessage = React.useCallback(
@@ -325,7 +321,6 @@ export const ChannelPane = React.memo(function ChannelPane({
isActiveWelcomeChannel &&
(containsWelcomePersonaMention(content) ||
mentionsKnownAgent(mentionPubkeys, knownAgentPubkeys));
messageTimelineRef.current?.scrollToBottomOnNextUpdate();
await onSendMessage(
content,
@@ -335,7 +330,6 @@ export const ChannelPane = React.memo(function ChannelPane({
threadContext,
forceRest,
);
if (
channelId &&
channelId !== activeChannelId &&
@@ -344,7 +338,6 @@ export const ChannelPane = React.memo(function ChannelPane({
) {
await goChannel(channelId, { replace: true });
}
if (shouldCompleteWelcomeBanner) {
completeWelcomeComposerBanner();
}
@@ -398,7 +391,6 @@ export const ChannelPane = React.memo(function ChannelPane({
}),
[activeChannel, currentPubkey, profiles],
);
const handleWelcomeAddAgent = React.useCallback(() => {
onAddAgent?.({
beforeSend: () =>
@@ -441,7 +433,6 @@ export const ChannelPane = React.memo(function ChannelPane({
for (const message of threadAllMessages) {
messagesById.set(message.id, message);
}
return buildVideoReviewPresentationByMessageId({
channelId: activeChannel?.id ?? null,
channelName: activeChannel?.name,
@@ -462,7 +453,6 @@ export const ChannelPane = React.memo(function ChannelPane({
threadAllMessages,
threadHeadMessage,
]);
const isOverlay = useIsThreadPanelOverlay();
const useSplitAuxiliaryPane = !isSinglePanelView && !isOverlay;
const threadViewMode = useThreadViewMode();
@@ -606,7 +596,6 @@ export const ChannelPane = React.memo(function ChannelPane({
data-testid="channel-shared-header-backdrop"
/>
) : null}
{!isSinglePanelView ? (
<section
aria-label="Channel messages and composer"
@@ -827,7 +816,6 @@ export const ChannelPane = React.memo(function ChannelPane({
</div>
</section>
) : null}
{/* Serialize replacements so focus drawers keep one travel direction. */}
<AnimatePresence mode="wait" onExitComplete={markExitComplete}>
{channelManagementOpen && activeChannel ? (