From 64af736c6efd080eacbee386850fc99334f09712 Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Thu, 24 Sep 2026 21:53:13 -0400 Subject: [PATCH] feat(threads): thread panel header says who started it and when (#165) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The subtitle was only the room name. It now reads e.g. "Thread Lab · started by alice, Fri 09:18 PM" (the user's clock/date preferences via the #139 formatter), which is what you want to know when arriving from the Threads list. Verified in the 360 px desktop panel: fits without clipping. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA --- src/app/features/room/thread/ThreadPanel.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/features/room/thread/ThreadPanel.tsx b/src/app/features/room/thread/ThreadPanel.tsx index 5ca39c4c8..d1d8cc2d2 100644 --- a/src/app/features/room/thread/ThreadPanel.tsx +++ b/src/app/features/room/thread/ThreadPanel.tsx @@ -28,6 +28,8 @@ import { ThreadNotificationModeSwitcher, } from '../../../components/ThreadNotificationModeSwitcher'; import { useThreadNotificationMode } from '../../../hooks/useThreadNotifications'; +import { useTimestampFormatter } from '../../../hooks/useTimestampFormatter'; +import { getMemberName } from '../../../utils/room'; import { ThreadNotificationMode } from '../../../utils/threadNotifications'; type ThreadPanelHeaderProps = { @@ -37,6 +39,12 @@ type ThreadPanelHeaderProps = { }; function ThreadPanelHeader({ room, threadId, requestClose }: ThreadPanelHeaderProps) { const mode = useThreadNotificationMode(room.roomId, threadId); + const { format } = useTimestampFormatter(); + // [Gitea #165] Who started the thread and when — the first thing you want + // when arriving from the Threads list. + const root = room.findEventById(threadId) ?? room.getThread(threadId)?.rootEvent; + const rootSender = root?.getSender(); + const startedBy = rootSender ? getMemberName(room, rootSender) : undefined; return (
@@ -47,6 +55,7 @@ function ThreadPanelHeader({ room, threadId, requestClose }: ThreadPanelHeaderPr {room.name} + {startedBy && root && ` · started by ${startedBy}, ${format(root.getTs())}`}