From fbf6fa1d25e88da67af5cc95a215bade1b8d726c Mon Sep 17 00:00:00 2001 From: Danielle Maywood Date: Fri, 22 May 2026 13:07:14 +0100 Subject: [PATCH] chore(site/src/pages/AgentsPage): use Tailwind size shorthand (#25611) Replace redundant matching Tailwind width and height utilities in AgentsPage with the `size-*` shorthand. This addresses the AgentsPage `react-doctor/design-no-redundant-size-axes` findings without changing rendered dimensions. --- .../AgentsPage/AgentAnalyticsPageView.tsx | 2 +- .../pages/AgentsPage/AgentChatPageView.tsx | 4 +-- .../AgentsPage/components/AdvisorSettings.tsx | 2 +- .../AgentsPage/components/AgentChatInput.tsx | 6 ++-- .../AgentsPage/components/AgentPageHeader.tsx | 8 ++--- .../components/AgentSetupNotice.tsx | 2 +- .../AgentsPage/components/AgentsSkeletons.tsx | 18 +++++----- .../components/AttachmentPreview.tsx | 19 +++++----- .../AgentsPage/components/BackButton.tsx | 2 +- .../ChatConversation/AttachmentBlocks.tsx | 12 +++---- .../components/ChatCostSummaryView.tsx | 4 +-- .../ChatElements/tools/AdvisorTool.tsx | 10 +++--- .../tools/AskUserQuestionTool.tsx | 14 ++++---- .../ChatElements/tools/ChatSummarizedTool.tsx | 4 +-- .../ChatElements/tools/ComputerTool.tsx | 4 +-- .../tools/CreateWorkspaceTool.tsx | 8 ++--- .../ChatElements/tools/EditFilesTool.tsx | 4 +-- .../ChatElements/tools/ExecuteTool.tsx | 25 ++++++------- .../tools/InlineDesktopPreview.tsx | 2 +- .../ChatElements/tools/ListTemplatesTool.tsx | 6 ++-- .../ChatElements/tools/ProcessOutputTool.tsx | 4 +-- .../ChatElements/tools/ProposePlanTool.tsx | 8 ++--- .../ChatElements/tools/ReadFileTool.tsx | 4 +-- .../ChatElements/tools/ReadSkillTool.tsx | 6 ++-- .../ChatElements/tools/ReadTemplateTool.tsx | 4 +-- .../ChatElements/tools/RecordingPreview.tsx | 12 +++---- .../ChatElements/tools/StartWorkspaceTool.tsx | 6 ++-- .../ChatElements/tools/SubagentTool.tsx | 14 ++++---- .../components/ChatElements/tools/Tool.tsx | 4 +-- .../ChatElements/tools/ToolCollapsible.tsx | 2 +- .../ChatElements/tools/ToolIcon.tsx | 6 ++-- .../ChatElements/tools/WebSearchSources.tsx | 4 +-- .../tools/WorkspaceBuildLogSection.tsx | 8 ++--- .../ChatElements/tools/WriteFileTool.tsx | 4 +-- .../ChatModelAdminPanel/ModelConfigFields.tsx | 2 +- .../ChatModelAdminPanel/ModelForm.tsx | 22 ++++++------ .../ModelIdentifierField.tsx | 2 +- .../ChatModelAdminPanel/ModelsSection.tsx | 10 +++--- .../ChatModelAdminPanel/ProviderForm.tsx | 4 +-- .../ChatModelAdminPanel/ProviderIcon.tsx | 4 +-- .../ChatModelAdminPanel/ProvidersSection.tsx | 12 +++---- .../AgentsPage/components/ChatTopBar.tsx | 28 +++++++-------- .../components/ChatsSidebar/ChatsSidebar.tsx | 2 +- .../ChatsSidebar/chats/ChatSectionHeader.tsx | 2 +- .../ChatsSidebar/chats/ChatsPanel.tsx | 8 ++--- .../ChatsSidebar/dialogs/ChatSearchInput.tsx | 2 +- .../dialogs/ChatSearchResults.tsx | 8 ++--- .../ChatsSidebar/dialogs/RenameChatDialog.tsx | 2 +- .../ChatsSidebar/filters/FilterDropdown.tsx | 6 ++-- .../ChatsSidebar/settings/SettingsNavItem.tsx | 6 ++-- .../ChatsSidebar/settings/SettingsPanel.tsx | 4 +-- .../ChatsSidebar/tabs/SidebarTabView.tsx | 10 +++--- .../ChatsSidebar/tree/ChatTreeNode.tsx | 24 ++++++------- .../AgentsPage/components/ChimeButton.tsx | 2 +- .../components/GitPanel/GitPanel.tsx | 2 +- .../LimitsTab/DefaultLimitSection.tsx | 4 +-- .../components/MCPServerAdminPanel.tsx | 36 +++++++++---------- .../AgentsPage/components/MCPServerPicker.tsx | 14 ++++---- .../components/QueuedMessagesList.tsx | 10 +++--- .../RightPanel/DebugPanel/DebugPanel.tsx | 2 +- .../components/RightPanel/DesktopPanel.tsx | 8 ++--- .../UserCompactionThresholdSettings.tsx | 2 +- .../components/VirtualDesktopSettings.tsx | 2 +- .../AgentsPage/components/WebPushButton.tsx | 2 +- 64 files changed, 238 insertions(+), 246 deletions(-) diff --git a/site/src/pages/AgentsPage/AgentAnalyticsPageView.tsx b/site/src/pages/AgentsPage/AgentAnalyticsPageView.tsx index f6aef93e41..e7e7d5c36a 100644 --- a/site/src/pages/AgentsPage/AgentAnalyticsPageView.tsx +++ b/site/src/pages/AgentsPage/AgentAnalyticsPageView.tsx @@ -27,7 +27,7 @@ export const AgentAnalyticsPageView: FC = ({ description="Review your personal Coder Agents usage and cost breakdowns." action={
- + {rangeLabel}
} diff --git a/site/src/pages/AgentsPage/AgentChatPageView.tsx b/site/src/pages/AgentsPage/AgentChatPageView.tsx index 9226ed560e..a99e3ece9e 100644 --- a/site/src/pages/AgentsPage/AgentChatPageView.tsx +++ b/site/src/pages/AgentsPage/AgentChatPageView.tsx @@ -500,13 +500,13 @@ export const AgentChatPageView: FC = ({ aria-live="polite" className="flex shrink-0 items-center gap-2 border-b border-border-warning bg-surface-orange px-4 py-2 text-xs text-content-primary" > - + {chatOwnerWarning} )} {isArchived && (
- + This agent has been archived and is read-only.
)} diff --git a/site/src/pages/AgentsPage/components/AdvisorSettings.tsx b/site/src/pages/AgentsPage/components/AdvisorSettings.tsx index 5ce39d5628..6e3659f27c 100644 --- a/site/src/pages/AgentsPage/components/AdvisorSettings.tsx +++ b/site/src/pages/AgentsPage/components/AdvisorSettings.tsx @@ -255,7 +255,7 @@ export const AdvisorSettings: FC = ({ Advisor - + Experimental feature diff --git a/site/src/pages/AgentsPage/components/AgentChatInput.tsx b/site/src/pages/AgentsPage/components/AgentChatInput.tsx index d48010a45e..cd272ba232 100644 --- a/site/src/pages/AgentsPage/components/AgentChatInput.tsx +++ b/site/src/pages/AgentsPage/components/AgentChatInput.tsx @@ -925,7 +925,7 @@ export const AgentChatInput: FC = ({ {isEditingHistoryMessage && editingQueuedMessageID === null && (
- + Editing will delete all subsequent messages and restart the conversation here. @@ -938,7 +938,7 @@ export const AgentChatInput: FC = ({ disabled={isLoading} className="size-6 rounded text-content-warning hover:text-content-primary" > - +
)} @@ -1178,7 +1178,7 @@ export const AgentChatInput: FC = ({ } > {isConnecting ? ( - + ) : null} Auth diff --git a/site/src/pages/AgentsPage/components/AgentPageHeader.tsx b/site/src/pages/AgentsPage/components/AgentPageHeader.tsx index c87517e490..7ce5ba02ca 100644 --- a/site/src/pages/AgentsPage/components/AgentPageHeader.tsx +++ b/site/src/pages/AgentsPage/components/AgentPageHeader.tsx @@ -122,7 +122,7 @@ export const AgentPageHeader: FC = ({ variant="subtle" size="icon" aria-label={mobileBack.label} - className="h-7 w-7 shrink-0 sm:hidden" + className="size-7 shrink-0 sm:hidden" > @@ -142,7 +142,7 @@ export const AgentPageHeader: FC = ({ size="icon" onClick={onExpandSidebar} aria-label="Expand sidebar" - className="hidden h-7 w-7 min-w-0 shrink-0 sm:inline-flex" + className="hidden size-7 min-w-0 shrink-0 sm:inline-flex" > @@ -159,7 +159,7 @@ export const AgentPageHeader: FC = ({ variant="subtle" size="icon" aria-label="More options" - className="h-7 w-7 text-content-secondary hover:text-content-primary sm:hidden" + className="size-7 text-content-secondary hover:text-content-primary sm:hidden" > @@ -207,7 +207,7 @@ export const AgentPageHeader: FC = ({ disabled={webPush.loading} > {webPush.loading ? ( - + ) : webPush.subscribed ? ( ) : ( diff --git a/site/src/pages/AgentsPage/components/AgentSetupNotice.tsx b/site/src/pages/AgentsPage/components/AgentSetupNotice.tsx index 7cd2357643..5e3abe7b5c 100644 --- a/site/src/pages/AgentsPage/components/AgentSetupNotice.tsx +++ b/site/src/pages/AgentsPage/components/AgentSetupNotice.tsx @@ -85,7 +85,7 @@ const AgentSetupStep: FC = ({ {isComplete ? ( ) : ( `${stepNumber}.` diff --git a/site/src/pages/AgentsPage/components/AgentsSkeletons.tsx b/site/src/pages/AgentsPage/components/AgentsSkeletons.tsx index 0c40e3fb5b..b1932de2ea 100644 --- a/site/src/pages/AgentsPage/components/AgentsSkeletons.tsx +++ b/site/src/pages/AgentsPage/components/AgentsSkeletons.tsx @@ -42,15 +42,15 @@ export const AgentsPageSkeleton: FC = () => { } className="order-2 sm:order-none flex-1 min-h-0 border-t border-border-default sm:flex-none sm:border-t-0 sm:h-full sm:w-[var(--agents-left-sidebar-width)] sm:min-w-[240px] sm:max-w-[min(520px,50vw)] sm:min-h-0 sm:border-b-0" > -
+
- +
- - - + + +
@@ -63,7 +63,7 @@ export const AgentsPageSkeleton: FC = () => { key={i} className="flex items-start gap-2 rounded-md px-2 py-1" > - +
{ >
- +
- - + +
diff --git a/site/src/pages/AgentsPage/components/AttachmentPreview.tsx b/site/src/pages/AgentsPage/components/AttachmentPreview.tsx index aacf5cb6c9..44285ddda8 100644 --- a/site/src/pages/AgentsPage/components/AttachmentPreview.tsx +++ b/site/src/pages/AgentsPage/components/AttachmentPreview.tsx @@ -42,7 +42,7 @@ export const ImageThumbnail: FC<{ src={previewUrl} alt={name} className={cn( - "h-16 w-16 rounded-md border border-border-default object-cover", + "size-16 rounded-md border border-border-default object-cover", className, )} onError={onError} @@ -175,7 +175,7 @@ export const AttachmentPreview: FC<{ ) : ( -
+
{file.name.split(".").pop()?.toUpperCase() || "FILE"}
)} @@ -189,13 +189,10 @@ export const AttachmentPreview: FC<{ ); onInlineText?.(file, nextContent); }} - className="absolute -bottom-2 -right-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-surface-primary text-content-secondary shadow-sm opacity-0 transition-opacity hover:bg-surface-secondary hover:text-content-primary group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100" + className="absolute -bottom-2 -right-2 flex size-6 cursor-pointer items-center justify-center rounded-full border-0 bg-surface-primary text-content-secondary shadow-sm opacity-0 transition-opacity hover:bg-surface-secondary hover:text-content-primary group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100" aria-label="Paste inline" > -
@@ -226,10 +223,10 @@ export const AttachmentPreview: FC<{
); @@ -239,7 +236,7 @@ export const AttachmentPreview: FC<{
{draftWarnings.map((warning) => (
- + {warning}
))} diff --git a/site/src/pages/AgentsPage/components/BackButton.tsx b/site/src/pages/AgentsPage/components/BackButton.tsx index dce4b56b0d..8ae54e4772 100644 --- a/site/src/pages/AgentsPage/components/BackButton.tsx +++ b/site/src/pages/AgentsPage/components/BackButton.tsx @@ -11,7 +11,7 @@ export const BackButton: FC = ({ onClick }) => ( onClick={onClick} className="mb-4 inline-flex cursor-pointer items-center gap-0.5 border-0 bg-transparent p-0 text-sm text-content-secondary transition-colors hover:text-content-primary" > - + Back ); diff --git a/site/src/pages/AgentsPage/components/ChatConversation/AttachmentBlocks.tsx b/site/src/pages/AgentsPage/components/ChatConversation/AttachmentBlocks.tsx index ce8c3e22d9..0ffc8b10a9 100644 --- a/site/src/pages/AgentsPage/components/ChatConversation/AttachmentBlocks.tsx +++ b/site/src/pages/AgentsPage/components/ChatConversation/AttachmentBlocks.tsx @@ -147,9 +147,9 @@ const DownloadOverlay: FC<{ download={downloadName} onClick={(event) => event.stopPropagation()} aria-label={`Download ${displayName}`} - className="invisible absolute right-1 top-1 flex h-6 w-6 items-center justify-center rounded bg-surface-primary/80 text-content-secondary opacity-0 shadow-sm backdrop-blur-sm transition-opacity hover:text-content-primary group-hover/attachment:visible group-hover/attachment:opacity-100 group-focus-within/attachment:visible group-focus-within/attachment:opacity-100 [@media(hover:none)]:visible [@media(hover:none)]:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-content-link" + className="invisible absolute right-1 top-1 flex size-6 items-center justify-center rounded bg-surface-primary/80 text-content-secondary opacity-0 shadow-sm backdrop-blur-sm transition-opacity hover:text-content-primary group-hover/attachment:visible group-hover/attachment:opacity-100 group-focus-within/attachment:visible group-focus-within/attachment:opacity-100 [@media(hover:none)]:visible [@media(hover:none)]:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-content-link" > -