From f4a41e84b43d58a90cbf4c4aef92170c0ae06238 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Tue, 14 Jul 2026 12:43:38 +1000 Subject: [PATCH 1/2] fix(desktop): navigate to channel from inbox thread header Clicking the #channelname header above an Inbox thread opened the channel management panel (a side effect of #1066 funneling the name click and the manage affordance through one onOpenChannel prop). Every other channel-name click in the app navigates, so restore the pre-#1066 behavior: the name click now navigates to the channel with the source message anchored (scrolled to and highlighted). - Split InboxDetailPane's onOpenChannel prop into onOpenContext (channelId, messageId, threadRootId) for the name click and onManageChannel(channelId) for the members-bar manage affordance. - Wire onOpenContext in HomeView to the existing goChannel-backed prop; onManageChannel keeps docking the ChannelManagementSheet, so #1066's inspect-without-leaving-Home flow stays reachable. - Replace the e2e test pinning the old name-click behavior with two: one asserting the name click navigates to /channels/?messageId=, one asserting the manage affordance still opens the panel in place. Co-Authored-By: Claude Fable 5 Signed-off-by: Matt Toohey --- desktop/src/features/home/ui/HomeView.tsx | 3 +- .../src/features/home/ui/InboxDetailPane.tsx | 21 ++++++++-- desktop/tests/e2e/channels.spec.ts | 39 +++++++++++++++---- 3 files changed, 51 insertions(+), 12 deletions(-) diff --git a/desktop/src/features/home/ui/HomeView.tsx b/desktop/src/features/home/ui/HomeView.tsx index eca9f932c..397c4984d 100644 --- a/desktop/src/features/home/ui/HomeView.tsx +++ b/desktop/src/features/home/ui/HomeView.tsx @@ -788,10 +788,11 @@ export function HomeView({ setIsDeletingMessage(false); }); }} - onOpenChannel={(channelId) => { + onManageChannel={(channelId) => { handleCloseProfilePanel(); setManagedChannelId(channelId); }} + onOpenContext={onOpenContext} onSendReply={async ({ content, mediaTags, diff --git a/desktop/src/features/home/ui/InboxDetailPane.tsx b/desktop/src/features/home/ui/InboxDetailPane.tsx index 78ce1de57..3b5cc11b9 100644 --- a/desktop/src/features/home/ui/InboxDetailPane.tsx +++ b/desktop/src/features/home/ui/InboxDetailPane.tsx @@ -77,7 +77,12 @@ type InboxDetailPaneProps = { latchedDefaultParentId?: string | null; onBack?: () => void; onDelete: () => void; - onOpenChannel: (channelId: string) => void; + onManageChannel: (channelId: string) => void; + onOpenContext: ( + channelId: string, + messageId: string, + threadRootId?: string | null, + ) => void; onSendReply: (input: { content: string; mediaTags?: string[][]; @@ -111,7 +116,8 @@ export function InboxDetailPane({ latchedDefaultParentId = null, onBack, onDelete, - onOpenChannel, + onManageChannel, + onOpenContext, onSendReply, onToggleReaction, }: InboxDetailPaneProps) { @@ -318,6 +324,7 @@ export function InboxDetailPane({ const contextLabel = channelContextName ?? formatInboxTypeLabel(item); const hasChannelContext = Boolean(channelContextName); const contextChannelId = item.item.channelId; + const contextThreadRootId = getThreadReference(item.item.tags).rootId; const handleSelectReplyTarget = (message: InboxDisplayMessage) => { setReplyTargetId((currentReplyTargetId) => @@ -358,7 +365,13 @@ export function InboxDetailPane({ {canOpenChannel && contextChannelId ? (