Skip to content

Commit 3f406c7

Browse files
authored
fix: improve sidebar chat loading UX in tasks (#18254)
Addresses coder/internal#668
1 parent 2f8b056 commit 3f406c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

site/src/pages/TaskPage/TaskSidebar.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
4040
.flatMap((r) => r.agents)
4141
.flatMap((a) => a?.apps)
4242
.find((a) => a?.slug === AI_APP_CHAT_SLUG);
43+
const showChatApp =
44+
chatApp && (chatApp.health === "disabled" || chatApp.health === "healthy");
4345

4446
return (
4547
<aside
@@ -49,7 +51,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
4951
"border-0 border-r border-solid border-border",
5052
],
5153
// We want to make the sidebar wider for chat apps
52-
chatApp ? "w-[520px]" : "w-[320px]",
54+
showChatApp ? "w-[520px]" : "w-[320px]",
5355
])}
5456
>
5557
<header className="border-0 border-b border-solid border-border p-4 pt-0">
@@ -104,7 +106,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
104106
)}
105107
</header>
106108

107-
{chatApp ? (
109+
{showChatApp ? (
108110
<TaskAppIFrame
109111
active
110112
key={chatApp.id}

0 commit comments

Comments
 (0)