From 0e512db34d787b21b827f07c6a62fba7fb00369e Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 22 Sep 2026 21:33:03 -0700 Subject: [PATCH] refactor(web): composer controls own their look instead of restyling ui components (#13209) Co-authored-by: Claude Opus 5.5 (1M context) --- apps/web/src/components/chat/ChatComposer.tsx | 53 ++++++------- .../chat/CompactComposerControlsMenu.tsx | 3 +- .../src/components/chat/ComposerControl.tsx | 78 ++++++++++--------- .../chat/ComposerPrimaryActions.tsx | 44 +++++------ apps/web/src/components/chat/ModelListRow.tsx | 12 +-- .../components/chat/ModelPickerContent.tsx | 18 ++--- .../components/chat/ProviderModelPicker.tsx | 3 - apps/web/src/components/chat/TraitsPicker.tsx | 4 - .../components/chat/composerProviderState.tsx | 4 - .../settings/ProjectDefaultsSettings.tsx | 2 - .../components/settings/SettingsPanels.tsx | 2 - .../settings/SourceControlWritingSettings.tsx | 1 - .../components/settings/settingsLayout.tsx | 9 +-- apps/web/src/components/ui/combobox.tsx | 2 +- scripts/lint-restyle-ceiling.ts | 2 +- 15 files changed, 100 insertions(+), 137 deletions(-) diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index 7955e1e02b254eba3badb80a6500ef8d03e39dc4..b377439882d534eb9ed06ff705234ca0c0bebd8c 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -1100,14 +1100,8 @@ const ComposerFooterModeControls = memo(function ComposerFooterModeControls(prop render={ } @@ -4994,10 +4987,8 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) .slice(restingBlockDefs.length - restingHiddenBlockCount) .map((def) => def.id); const composerControls = showProviderUnavailable ? ( - + ) : ( <> {composerControlsInStrip && restingControlsHaveLeadingContext ? ( @@ -6590,9 +6581,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) retryAttachmentUpload({ environmentId, @@ -6609,19 +6600,23 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) {upload.reason} )} - + + ); }) @@ -6685,9 +6680,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) retryAttachmentUpload({ environmentId, @@ -6705,9 +6700,9 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) )} ); } @@ -161,39 +160,36 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ if (showPlanFollowUpPrompt) { if (promptHasText) { return ( - + ); } return (
- +
@@ -103,11 +102,8 @@ export const ModelListRow = memo(function ModelListRow(props: { render={ +
))}
) : ( - - No models found - + No models found )} diff --git a/apps/web/src/components/chat/ProviderModelPicker.tsx b/apps/web/src/components/chat/ProviderModelPicker.tsx index 21c90b02131c100b018299b7325a94047a4e8ef1..4211f994b1975459f16236d1fd22605b4bd8d8ef 100644 --- a/apps/web/src/components/chat/ProviderModelPicker.tsx +++ b/apps/web/src/components/chat/ProviderModelPicker.tsx @@ -6,7 +6,6 @@ import { } from "@t3tools/contracts"; import { memo, useEffect, useMemo, useState } from "react"; import { Badge } from "../ui/badge"; -import type { ButtonVariant } from "../ui/button"; import { Popover, PopoverPopup, PopoverTrigger } from "../ui/popover"; import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; import { cn } from "~/lib/utils"; @@ -48,7 +47,6 @@ export const ProviderModelPicker = memo(function ProviderModelPicker(props: { disabled?: boolean; terminalOpen?: boolean; open?: boolean; - triggerVariant?: ButtonVariant; triggerClassName?: string; /** Aggregate settings can show a neutral value without claiming one provider is selected. */ triggerLabel?: string; @@ -206,7 +204,6 @@ export const ProviderModelPicker = memo(function ProviderModelPicker(props: { render={