From 327992a98d67f56f4606103b21dfe6307ef2d58e Mon Sep 17 00:00:00 2001 From: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Date: Tue, 22 Sep 2026 20:27:11 -0700 Subject: [PATCH] refactor(web): Button consumers outside the composer stop restyling it Clears the 149 shadcn/no-restyle findings on Button outside the chat composer. No new variant, size, or prop. Two existing Button styles change. Changes to components/ui/button.tsx: - glass is now a pill (rounded-full). All three Button consumers (Scroll to end, Cite selection, PR review trigger) forced rounded-full, so the variant owns it. - The base now styles aria-disabled like disabled (opacity-64, not-allowed cursor). This is a generic state for a disabled control that still hosts an explanation popover, and it replaces the hand-rolled copy on the git quick action. Drift, moved onto existing variants and sizes (the visible change is accepted): - Text-colour tweaks (text-muted-foreground, hover:text-foreground, the sidebar muted tokens, text-muted-foreground/60, font-normal) become ghost-muted: server update icon and batch action, Add environment, message copy (ghost), Show full message, PR sort toggles, settings and thread search clear, accent-colour Clear, PR edit pencil. - Toggle-state tints become variant switches, secondary when pressed: device-toolbar aspect lock, markdown table expand and code wrap. This deletes the chat-markdown-chrome-action CSS. - Setup Required chips become warning-outline + micro. - Padding and size tweaks drop to the size's own padding: ps-[8.5px], ps/pe/gap on the palette submit, px-1, and px-0/px overrides on the header script actions. Multiline dialog and onboarding rows use sm-multiline. - Hover and background tweaks are deleted: diff collapse, reset zoom, PR code collapse, context meter, script icon picker, media navigation bg-white/10 and rounded-full. White-on-image snapshot buttons use the existing overlay variant. - Diff-type colour moves from the Button to its chevron icon. Restructured: - Reveal on row hover (opacity-0 group-hover:opacity-100) is the row's behaviour, so it moves to a plain wrapper span: diff comment delete, project actions edit, script menu edit, PullRequestEditButton. - The sticky device-toolbar close backing, the colour-picker footer divider, and the monospace on the when-clause label move to plain elements. - The provider update pill dismiss was not a Button (it inherits the pill's tone colour and has no surface of its own), so it is now a plain button. Co-Authored-By: Claude Opus 5.5 (1M context) --- apps/web/src/browser/BrowserDeviceToolbar.tsx | 41 ++++++++---------- apps/web/src/components/ChatMarkdown.tsx | 12 ++---- apps/web/src/components/ChatView.tsx | 2 +- apps/web/src/components/CommandPalette.tsx | 12 ++---- .../web/src/components/CustomSnoozeDialog.tsx | 2 +- apps/web/src/components/DiffPanel.tsx | 13 +++--- apps/web/src/components/GitActionsControl.tsx | 23 ++++------ .../src/components/ProjectScriptsControl.tsx | 42 ++++++++++--------- .../web/src/components/ServerUpdateAction.tsx | 4 +- apps/web/src/components/Sidebar.tsx | 2 +- .../chat/AssistantSelectionToolbar.tsx | 2 +- .../components/chat/ContextWindowMeter.tsx | 2 +- .../components/chat/ExpandedImageDialog.tsx | 13 ++---- .../src/components/chat/MessageCopyButton.tsx | 5 +-- .../src/components/chat/MessagesTimeline.tsx | 4 +- apps/web/src/components/chat/OpenInPicker.tsx | 1 - .../chat/SnapShotAttachmentDetails.tsx | 7 +--- .../diffs/DiffCommentAnnotation.tsx | 19 +++++---- .../components/onboarding/WelcomeWizard.tsx | 12 +++--- .../components/preview/PreviewMoreMenu.tsx | 1 - .../src/components/projectScriptEditor.tsx | 2 +- .../pullRequest/PullRequestCodeTab.tsx | 2 +- .../pullRequest/PullRequestComposer.tsx | 8 +--- .../pullRequest/PullRequestDetailPanel.tsx | 3 +- .../pullRequest/PullRequestEditButton.tsx | 13 +++--- .../PullRequestReviewAnnotation.tsx | 8 +--- .../pullRequest/PullRequestSummaryTab.tsx | 4 +- .../settings/ConnectionsSettings.tsx | 13 +----- .../settings/KeybindingsSettings.tsx | 4 +- .../settings/ProjectActionsList.tsx | 21 +++++----- .../settings/ProviderAccentColorPicker.tsx | 32 +++++++------- .../settings/SettingsSidebarNav.tsx | 4 +- .../sidebar/SidebarProviderUpdatePill.tsx | 10 ++--- .../sidebar/SidebarThreadHeader.tsx | 4 +- apps/web/src/components/ui/button.tsx | 4 +- apps/web/src/components/ui/input.tsx | 3 ++ apps/web/src/index.css | 20 +-------- scripts/lint-restyle-ceiling.ts | 2 +- 38 files changed, 156 insertions(+), 220 deletions(-) diff --git a/apps/web/src/browser/BrowserDeviceToolbar.tsx b/apps/web/src/browser/BrowserDeviceToolbar.tsx index f84e18d84669..a8c9027f8a16 100644 --- a/apps/web/src/browser/BrowserDeviceToolbar.tsx +++ b/apps/web/src/browser/BrowserDeviceToolbar.tsx @@ -242,10 +242,7 @@ export function BrowserDeviceToolbar({ onChange={(event) => updateCustomDimension("width", event.target.value)} aria-label="Viewport width" aria-invalid={!customValid} - className={cn( - "text-center [&_[data-slot=input]::-webkit-inner-spin-button]:appearance-none [&_[data-slot=input]]:[appearance:textfield]", - width >= 360 ? "w-14" : "w-13", - )} + className={width >= 360 ? "w-14" : "w-13"} /> × updateCustomDimension("height", event.target.value)} aria-label="Viewport height" aria-invalid={!customValid} - className={cn( - "text-center [&_[data-slot=input]::-webkit-inner-spin-button]:appearance-none [&_[data-slot=input]]:[appearance:textfield]", - width >= 360 ? "w-14" : "w-13", - )} + className={width >= 360 ? "w-14" : "w-13"} /> @@ -281,14 +275,13 @@ export function BrowserDeviceToolbar({ event.preventDefault()} onClick={toggleAspectRatio} @@ -315,19 +308,21 @@ export function BrowserDeviceToolbar({ > - + {/* Sticky backing so scrolled controls do not show through the close action. */} + + + ); } diff --git a/apps/web/src/components/ChatMarkdown.tsx b/apps/web/src/components/ChatMarkdown.tsx index ef833e0e6794..f48c573aa8bc 100644 --- a/apps/web/src/components/ChatMarkdown.tsx +++ b/apps/web/src/components/ChatMarkdown.tsx @@ -784,9 +784,8 @@ function MarkdownTable({ children, ...props }: React.ComponentProps<"table">) { render={ + + ); @@ -269,7 +273,7 @@ export default function ProjectScriptsControl({ diff --git a/apps/web/src/components/chat/OpenInPicker.tsx b/apps/web/src/components/chat/OpenInPicker.tsx index 35a75a20a36e..3c0b2cd118ed 100644 --- a/apps/web/src/components/chat/OpenInPicker.tsx +++ b/apps/web/src/components/chat/OpenInPicker.tsx @@ -353,7 +353,6 @@ export const OpenInPicker = memo(function OpenInPicker({ + + + ) : null} ); diff --git a/apps/web/src/components/onboarding/WelcomeWizard.tsx b/apps/web/src/components/onboarding/WelcomeWizard.tsx index 100869f25369..26ba0cea419d 100644 --- a/apps/web/src/components/onboarding/WelcomeWizard.tsx +++ b/apps/web/src/components/onboarding/WelcomeWizard.tsx @@ -357,12 +357,13 @@ function ConnectionStep({ render={ + + ); } diff --git a/apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx b/apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx index 54f4860b9533..11acd48a4c10 100644 --- a/apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx +++ b/apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx @@ -312,7 +312,6 @@ export function ReviewThreadCard({ ) diff --git a/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx b/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx index c4f310201182..33b9a42c6ce0 100644 --- a/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx +++ b/apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx @@ -922,8 +922,8 @@ export function PullRequestSummaryTab({ actions={ diff --git a/apps/web/src/components/settings/KeybindingsSettings.tsx b/apps/web/src/components/settings/KeybindingsSettings.tsx index bc8e4e9df31c..3512a6a25a6c 100644 --- a/apps/web/src/components/settings/KeybindingsSettings.tsx +++ b/apps/web/src/components/settings/KeybindingsSettings.tsx @@ -891,12 +891,12 @@ function WhenClauseControl({ + + + } /> diff --git a/apps/web/src/components/settings/ProviderAccentColorPicker.tsx b/apps/web/src/components/settings/ProviderAccentColorPicker.tsx index 22e91a24553d..76f6b7bae52c 100644 --- a/apps/web/src/components/settings/ProviderAccentColorPicker.tsx +++ b/apps/web/src/components/settings/ProviderAccentColorPicker.tsx @@ -92,21 +92,23 @@ function ProviderCustomColorPicker(props: { /> - - - Clear color - - } - /> +
+ + + Clear color + + } + /> +
); diff --git a/apps/web/src/components/settings/SettingsSidebarNav.tsx b/apps/web/src/components/settings/SettingsSidebarNav.tsx index 5f4d29b00bc4..ec46ab1f13a3 100644 --- a/apps/web/src/components/settings/SettingsSidebarNav.tsx +++ b/apps/web/src/components/settings/SettingsSidebarNav.tsx @@ -265,8 +265,8 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) { + } /> Dismiss until provider status changes diff --git a/apps/web/src/components/sidebar/SidebarThreadHeader.tsx b/apps/web/src/components/sidebar/SidebarThreadHeader.tsx index 07c1c8e86535..839c2ba37f01 100644 --- a/apps/web/src/components/sidebar/SidebarThreadHeader.tsx +++ b/apps/web/src/components/sidebar/SidebarThreadHeader.tsx @@ -108,8 +108,8 @@ export function SidebarThreadHeader({