refactor(web): add radius="none" to ScrollArea (#13026)

Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
Julius MarmingeandClaude Fable 5 authored and GitHub committed 2026-09-22 12:22:12 -07:00
1 parent 9515016166
commit b4f1f18b73
9 files changed
+25 -18

No files matched your search

+1 -1
View File
@@ -772,7 +772,7 @@ function MarkdownTable({ children, ...props }: React.ComponentProps<"table">) {
className="chat-markdown-table-container"
data-expanded={expanded ? "true" : "false"}
>
<ScrollArea chainVerticalScroll scrollFade className="w-full max-w-full rounded-none">
<ScrollArea radius="none" chainVerticalScroll scrollFade className="w-full max-w-full">
<table ref={tableRef} {...props}>
{children}
</table>
+2 -1
View File
@@ -1127,10 +1127,11 @@ export function RightPanelTabs(props: RightPanelTabsProps) {
data-right-panel-tabbar
>
<ScrollArea
radius="none"
ref={tabListRef}
hideScrollbars
scrollFade
className="min-w-0 flex-1 rounded-none"
className="min-w-0 flex-1"
data-right-panel-tab-list
>
<div className="flex h-full w-max min-w-full items-center gap-1">
@@ -282,9 +282,10 @@ function Children({ className, render, ...props }: useRender.ComponentProps<"div
function Scroll({ className, ...props }: ComponentProps<typeof ScrollArea>) {
return (
<ScrollArea
radius="none"
scrollFade
className={cn(
"h-auto max-h-[min(24rem,40dvh)] rounded-none [&>[data-slot=scroll-area-viewport][data-has-overflow-y]]:pe-2",
"h-auto max-h-[min(24rem,40dvh)] [&>[data-slot=scroll-area-viewport][data-has-overflow-y]]:pe-2",
className,
)}
{...props}
@@ -1090,10 +1090,11 @@ export default function FilePreviewPanel({
{relativePath && attachment === undefined ? (
<div className={FILE_SURFACE_SUBHEADER_CLASS} data-surface-subheader>
<ScrollArea
radius="none"
ref={breadcrumbRef}
hideScrollbars
scrollFade
className="min-w-0 flex-1 rounded-none"
className="min-w-0 flex-1"
data-file-breadcrumbs
>
<div className="flex h-full w-max min-w-full items-center text-xs">
@@ -636,10 +636,7 @@ function AgentsStep({
const { environments } = useEnvironments();
return (
<StepShell title="Your agents" description="Agents available on your selected computers.">
<ScrollArea
scrollFade
className="mt-5 h-auto max-h-96 [&_[data-slot=scroll-area-scrollbar]]:opacity-100"
>
<ScrollArea scrollFade className="mt-5 h-auto max-h-96">
<div className="space-y-5 pr-3">
{environmentIds.map((environmentId) => (
<ConnectedAgentsStep
@@ -1206,10 +1203,7 @@ function ImportStep({
</div>
</div>
) : null}
<ScrollArea
scrollFade
className="mt-2 h-auto max-h-80 [&_[data-slot=scroll-area-scrollbar]]:opacity-100"
>
<ScrollArea scrollFade className="mt-2 h-auto max-h-80">
<div className="space-y-5 pr-3">
{scans.map((scan) => {
const scanCandidates = candidates.filter(
@@ -172,10 +172,11 @@ function DiagnosticsTable({
}) {
return (
<ScrollArea
radius="none"
chainVerticalScroll
scrollFade
hideScrollbars
className="w-full max-w-full rounded-none"
className="w-full max-w-full"
>
<table
className={cn("w-full text-left text-xs", minTableWidth, columnWidths && "table-fixed")}
@@ -355,10 +356,11 @@ function ProcessDiagnosticsTable({
return (
<ScrollArea
radius="none"
chainVerticalScroll
scrollFade
hideScrollbars
className="max-h-[min(64vh,44rem)] w-full max-w-full rounded-none border-t border-border/60"
className="max-h-[min(64vh,44rem)] w-full max-w-full border-t border-border/60"
>
<table className="w-full min-w-[1040px] table-fixed text-left text-xs">
<colgroup>
@@ -1224,10 +1226,11 @@ export function DiagnosticsSettingsPanel() {
<SettingsSection title="Span Logs">
{data && data.latestWarningAndErrorLogs.length > 0 ? (
<ScrollArea
radius="none"
chainVerticalScroll
scrollFade
hideScrollbars
className="w-full max-w-full rounded-none"
className="w-full max-w-full"
>
<table className="w-full min-w-[920px] table-fixed text-left text-xs">
<colgroup>
@@ -334,7 +334,7 @@ function ProviderSettingsPanelContent(target: ProviderSettingsTarget) {
options.length === 1 && options[0]?.entry.target._tag === "PrimaryConnectionTarget";
const deviceTabs =
!target.scoped && !onlyPrimaryDevice && options.length > 0 ? (
<ScrollArea hideScrollbars scrollFade className="h-11 min-w-0 flex-1 rounded-none">
<ScrollArea radius="none" hideScrollbars scrollFade className="h-11 min-w-0 flex-1">
<ToggleGroup
aria-label="Devices"
variant="segmented"
+8 -1
View File
@@ -29,6 +29,7 @@ function ScrollArea({
scrollbarGutter = false,
hideScrollbars = false,
chainVerticalScroll = false,
radius = "inherit",
...props
}: ScrollAreaPrimitive.Root.Props & {
scrollFade?: boolean;
@@ -38,10 +39,16 @@ function ScrollArea({
scrollbarGutter?: boolean;
hideScrollbars?: boolean;
chainVerticalScroll?: boolean;
/** The viewport clips to the parent's radius; "none" for a region flush to an edge. */
radius?: "inherit" | "none";
}) {
return (
<ScrollAreaPrimitive.Root
className={cn("relative size-full min-h-0 overflow-hidden rounded-[inherit]", className)}
className={cn(
"relative size-full min-h-0 overflow-hidden",
radius === "none" ? "rounded-none" : "rounded-[inherit]",
className,
)}
{...props}
>
<ScrollAreaPrimitive.Viewport
+1 -1
View File
@@ -8,7 +8,7 @@ import * as NodeURL from "node:url";
// components/ui exports are migrated to variants (see vite.config.ts). This gate keeps the
// count from growing: CI fails when findings exceed the ceiling. Lower the ceiling when you
// migrate a file, and delete this script when the rule becomes an error.
export const RESTYLE_CEILING = 1070;
export const RESTYLE_CEILING = 1060;
const RULE = "shadcn(no-restyle)";