From 5f6c74adfa743650bcb05fb67ca56d75b696e2be Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Mon, 20 Apr 2026 10:23:42 +1000 Subject: [PATCH] fix: resolve `` `fmt` issue (#24515) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Noticed in #24514, this was throwing an error in CI. ``` $ biome lint --error-on-warnings . src/pages/AgentsPage/components/ChatTopBar.tsx:194:9 lint/complexity/noUselessFragments FIXABLE ━━━━━━━━━━ ℹ This fragment is unnecessary. 192 │ > 193 │ {!isArchived && ( > 194 │ <> │ ^^ > 195 │ {onRegenerateTitle && ( ... > 206 │ )} > 207 │ │ ^^^ 208 │ )} 209 │ {isArchived ? ( ℹ A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment. ℹ Unsafe fix: Remove the Fragment 192 192 │ > 193 193 │ {!isArchived && ( 194 │ - → → → → → → → → <> 195 │ - → → → → → → → → → {onRegenerateTitle·&&·( 194 │ + → → → → → → → → onRegenerateTitle·&&·( 196 195 │ <> 197 196 │ 205 204 │ 206 │ - → → → → → → → → → )} 207 │ - → → → → → → → → 205 │ + → → → → → → → → → ) 208 206 │ )} 209 207 │ {isArchived ? ( ``` --- .../AgentsPage/components/ChatTopBar.tsx | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/site/src/pages/AgentsPage/components/ChatTopBar.tsx b/site/src/pages/AgentsPage/components/ChatTopBar.tsx index 35eee3d5b5..59892188cf 100644 --- a/site/src/pages/AgentsPage/components/ChatTopBar.tsx +++ b/site/src/pages/AgentsPage/components/ChatTopBar.tsx @@ -190,20 +190,16 @@ export const ChatTopBar: FC = ({ align="end" className="[&_[role=menuitem]]:text-[13px]" > - {!isArchived && ( + {!isArchived && onRegenerateTitle && ( <> - {onRegenerateTitle && ( - <> - - - Generate new title - - - - )} + + + Generate new title + + )} {isArchived ? (