Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/ui/src/features/canvas/components/ThreadPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,19 @@ export function ThreadPanel({
onClose,
collapsed,
onToggleCollapsed,
showTaskTitle = true,
}: {
taskId: string;
/** The thread's task when the caller already has it; fetched otherwise. */
task?: Task;
onClose?: () => void;
collapsed?: boolean;
onToggleCollapsed?: () => void;
/**
* Show the task title under the "Thread" heading. Hidden in the task detail
* view, where the TaskDetail header already names the task.
*/
showTaskTitle?: boolean;
}) {
const client = useOptionalAuthenticatedClient();
const { data: currentUser } = useCurrentUser({ client });
Expand Down Expand Up @@ -240,7 +246,7 @@ export function ThreadPanel({
<Text size="2" weight="medium" className="block">
Thread
</Text>
{task && (
{showTaskTitle && task && (
<Text size="1" className="block truncate text-muted-foreground">
{task.title || "Untitled task"}
</Text>
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/src/features/canvas/components/ThreadSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ export function ThreadSidebar({
taskId,
task,
onClose,
showTaskTitle,
}: {
taskId: string;
/** The thread's task when the caller already has it; fetched otherwise. */
task?: Task;
onClose?: () => void;
/** Forwarded to ThreadPanel; hidden in the task detail view. */
showTaskTitle?: boolean;
}) {
const collapsed = useThreadPanelStore((s) => s.collapsed);
const width = useThreadPanelStore((s) => s.width);
Expand Down Expand Up @@ -60,6 +63,7 @@ export function ThreadSidebar({
task={task}
onClose={onClose}
onToggleCollapsed={() => toggleCollapsed(true)}
showTaskTitle={showTaskTitle}
/>
</ResizableSidebar>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function ChannelTaskDetailRoute() {
channelId={channelId}
/>
</div>
<ThreadSidebar taskId={taskId} task={task} />
<ThreadSidebar taskId={taskId} task={task} showTaskTitle={false} />
</div>
);
}
Loading