fix: improve sidebar chat loading UX in tasks (#18254)

Addresses https://github.com/coder/internal/issues/668
This commit is contained in:
Hugo Dutka
2025-06-05 18:58:54 +02:00
committed by GitHub
parent 2f8b056e27
commit 3f406c7c50
+4 -2
View File
@@ -40,6 +40,8 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
.flatMap((r) => r.agents)
.flatMap((a) => a?.apps)
.find((a) => a?.slug === AI_APP_CHAT_SLUG);
const showChatApp =
chatApp && (chatApp.health === "disabled" || chatApp.health === "healthy");
return (
<aside
@@ -49,7 +51,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
"border-0 border-r border-solid border-border",
],
// We want to make the sidebar wider for chat apps
chatApp ? "w-[520px]" : "w-[320px]",
showChatApp ? "w-[520px]" : "w-[320px]",
])}
>
<header className="border-0 border-b border-solid border-border p-4 pt-0">
@@ -104,7 +106,7 @@ export const TaskSidebar: FC<TaskSidebarProps> = ({ task }) => {
)}
</header>
{chatApp ? (
{showChatApp ? (
<TaskAppIFrame
active
key={chatApp.id}