🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
refactor(web): Clean up `Accordion` (#16943)
Ben Bachem79eab0857a96
diff --git a/web/.storybook/main.ts b/web/.storybook/main.tsindex 0d2e88a99b..1c627b2618 100644--- a/web/.storybook/main.ts+++ b/web/.storybook/main.ts@@ -11,6 +11,7 @@ import {const STORY_EXTENSIONS = "@(js|jsx|mjs|ts|tsx)";const DESIGN_COMPONENT_STORIES = [+ "Accordion/Accordion","Alert/Alert","Avatar/Avatar","Badge/Badge",diff --git a/web/src/components/design-system/Accordion/Accordion.stories.tsx b/web/src/components/design-system/Accordion/Accordion.stories.tsxnew file mode 100644index 0000000000..fb05ca86ca--- /dev/null+++ b/web/src/components/design-system/Accordion/Accordion.stories.tsx@@ -0,0 +1,67 @@+import { expect, userEvent, waitFor, within } from "storybook/test";++import preview from "../../../../.storybook/preview";+import { Accordion } from "./Accordion";++const meta = preview.meta({+ component: Accordion,+});++const defaultChildren = (+ <>+ <Accordion.Item value="item-1">+ <Accordion.Trigger>Item one</Accordion.Trigger>+ <Accordion.Content>+ <div className="pb-4">Content for item one.</div>+ </Accordion.Content>+ </Accordion.Item>+ <Accordion.Item value="item-2">+ <Accordion.Trigger>Item two</Accordion.Trigger>+ <Accordion.Content>+ <div className="pb-4">Content for item two.</div>+ </Accordion.Content>+ </Accordion.Item>+ </>+);++export const Default = meta.story({+ args: {+ type: "single",+ collapsible: true,+ defaultValue: "item-1",+ children: defaultChildren,+ },+});++export const ToggleItem = meta.story({+ name: "(Test) Toggle Item",+ args: {+ type: "single",+ collapsible: true,+ children: (+ <Accordion.Item value="item-1">+ <Accordion.Trigger>Details</Accordion.Trigger>+ <Accordion.Content>+ <div className="pb-4">Hidden details</div>+ </Accordion.Content>+ </Accordion.Item>+ ),+ },+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ const trigger = canvas.getByRole("button", { name: "Details" });++ await expect(trigger).toHaveAttribute("aria-expanded", "false");+ await expect(canvas.queryByText("Hidden details")).not.toBeInTheDocument();++ await userEvent.click(trigger);+ await expect(trigger).toHaveAttribute("aria-expanded", "true");+ await expect(canvas.getByText("Hidden details")).toBeVisible();++ await userEvent.click(trigger);+ await expect(trigger).toHaveAttribute("aria-expanded", "false");+ await waitFor(() => {+ expect(canvas.queryByText("Hidden details")).not.toBeInTheDocument();+ });+ },+});diff --git a/web/src/components/design-system/Accordion/Accordion.tsx b/web/src/components/design-system/Accordion/Accordion.tsxnew file mode 100644index 0000000000..a3ad7702ef--- /dev/null+++ b/web/src/components/design-system/Accordion/Accordion.tsx@@ -0,0 +1,115 @@+"use client";++import * as React from "react";+import * as AccordionPrimitive from "@radix-ui/react-accordion";+import { cva, type VariantProps } from "class-variance-authority";+import { ChevronDown } from "lucide-react";++const accordionVariants = cva("", {+ variants: {+ gap: {+ none: "",+ sm: "space-y-2",+ },+ },+ defaultVariants: {+ gap: "none",+ },+});++const accordionTriggerVariants = cva(+ "flex flex-1 items-center justify-between pt-2 pb-1 font-bold transition-all hover:no-underline [&[data-state=open]>svg]:rotate-180",+ {+ variants: {+ size: {+ default: "",+ sm: "text-sm",+ },+ },+ defaultVariants: {+ size: "default",+ },+ },+);++type AccordionItemProps = Pick<+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>,+ "value"+> & {+ children: React.ReactNode;+};++type AccordionRootProps = React.ComponentPropsWithoutRef<+ typeof AccordionPrimitive.Root+>;++type AccordionSingleProps = Pick<+ Extract<AccordionRootProps, { type: "single" }>,+ "collapsible" | "defaultValue" | "onValueChange" | "type" | "value"+>;++type AccordionMultipleProps = Pick<+ Extract<AccordionRootProps, { type: "multiple" }>,+ "defaultValue" | "onValueChange" | "type" | "value"+>;++type AccordionProps = (AccordionSingleProps | AccordionMultipleProps) &+ Pick<VariantProps<typeof accordionVariants>, "gap"> & {+ children: React.ReactNode;+ };++function AccordionRoot({ children, gap, ...props }: AccordionProps) {+ return (+ <AccordionPrimitive.Root className={accordionVariants({ gap })} {...props}>+ {children}+ </AccordionPrimitive.Root>+ );+}++function AccordionItem({ children, value }: AccordionItemProps) {+ return (+ <AccordionPrimitive.Item className="border-b" value={value}>+ {children}+ </AccordionPrimitive.Item>+ );+}++type AccordionTriggerProps = Pick<+ VariantProps<typeof accordionTriggerVariants>,+ "size"+> & {+ children: React.ReactNode;+};++function AccordionTrigger({ children, size }: AccordionTriggerProps) {+ return (+ <AccordionPrimitive.Header className="flex">+ <AccordionPrimitive.Trigger+ className={accordionTriggerVariants({ size })}+ >+ {children}+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />+ </AccordionPrimitive.Trigger>+ </AccordionPrimitive.Header>+ );+}++type AccordionContentProps = {+ children: React.ReactNode;+};++function AccordionContent({ children }: AccordionContentProps) {+ return (+ <AccordionPrimitive.Content className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all">+ {children}+ </AccordionPrimitive.Content>+ );+}++const Accordion = Object.assign(AccordionRoot, {+ Item: AccordionItem,+ Trigger: AccordionTrigger,+ Content: AccordionContent,+});++export { Accordion };diff --git a/web/src/components/table/data-table-controls.clienttest.tsx b/web/src/components/table/data-table-controls.clienttest.tsxindex 48fad3598b..ed4c94b878 100644--- a/web/src/components/table/data-table-controls.clienttest.tsx+++ b/web/src/components/table/data-table-controls.clienttest.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from "@testing-library/react";-import { Accordion } from "@/src/components/ui/accordion";+import * as AccordionPrimitive from "@radix-ui/react-accordion";import { TooltipProvider } from "@/src/components/ui/tooltip";import {CategoricalFacet,@@ -36,7 +36,7 @@ beforeAll(() => {describe("CategoricalFacet", () => {it("uses a custom option hover title", () => {render(- <Accordion type="multiple" value={["evaluatorId"]}>+ <AccordionPrimitive.Root type="multiple" value={["evaluatorId"]}><CategoricalFacetlabel="Evaluator"filterKey="evaluatorId"@@ -52,7 +52,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,{ wrapper: TooltipProvider },);@@ -64,7 +64,7 @@ describe("CategoricalFacet", () => {it("renders an option suffix after its label", () => {render(- <Accordion type="multiple" value={["model"]}>+ <AccordionPrimitive.Root type="multiple" value={["model"]}><CategoricalFacetlabel="Model"filterKey="model"@@ -81,7 +81,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,{ wrapper: TooltipProvider },);@@ -96,7 +96,7 @@ describe("CategoricalFacet", () => {it("shows selected values even when the backend returns no options", () => {render(- <Accordion type="multiple" value={["type"]}>+ <AccordionPrimitive.Root type="multiple" value={["type"]}><CategoricalFacetlabel="Type"filterKey="type"@@ -110,7 +110,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,// The active-facet clear affordance renders a Tooltip, which needs the// provider the app supplies globally.{ wrapper: TooltipProvider },@@ -122,7 +122,7 @@ describe("CategoricalFacet", () => {it("shows Clear for active selected values even when the backend returns no options", () => {render(- <Accordion type="multiple" value={["type"]}>+ <AccordionPrimitive.Root type="multiple" value={["type"]}><CategoricalFacetlabel="Type"filterKey="type"@@ -136,7 +136,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,// The active-facet clear affordance renders a Tooltip, which needs the// provider the app supplies globally.{ wrapper: TooltipProvider },@@ -150,7 +150,7 @@ describe("CategoricalFacet", () => {// value sits below the 12-item cap and is hidden behind "Show more".const options = Array.from({ length: 20 }, (_, i) => `opt-${i}`);render(- <Accordion type="multiple" value={["c"]}>+ <AccordionPrimitive.Root type="multiple" value={["c"]}><CategoricalFacetlabel="C"filterKey="c"@@ -164,7 +164,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,// The active-facet clear affordance renders a Tooltip, which needs the// provider the app supplies globally.{ wrapper: TooltipProvider },@@ -191,7 +191,7 @@ describe("CategoricalFacet", () => {// not the entire list.const options = Array.from({ length: 80 }, (_, i) => `opt-${i}`);render(- <Accordion type="multiple" value={["c"]}>+ <AccordionPrimitive.Root type="multiple" value={["c"]}><CategoricalFacetlabel="C"filterKey="c"@@ -205,7 +205,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,{ wrapper: TooltipProvider },);@@ -236,7 +236,7 @@ describe("CategoricalFacet", () => {// a pinned selection — doing so would render the entire list with no cap.const options = Array.from({ length: 20 }, (_, i) => `opt-${i}`);render(- <Accordion type="multiple" value={["c"]}>+ <AccordionPrimitive.Root type="multiple" value={["c"]}><CategoricalFacetlabel="C"filterKey="c"@@ -250,7 +250,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,// The active-facet clear affordance renders a Tooltip, which needs the// provider the app supplies globally.{ wrapper: TooltipProvider },@@ -269,7 +269,7 @@ describe("CategoricalFacet", () => {const options = Array.from({ length: 20 }, (_, i) => `opt-${i}`);const selected = options.slice(0, 18); // 18 of 20 selectedrender(- <Accordion type="multiple" value={["c"]}>+ <AccordionPrimitive.Root type="multiple" value={["c"]}><CategoricalFacetlabel="C"filterKey="c"@@ -283,7 +283,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,// The active-facet clear affordance renders a Tooltip, which needs the// provider the app supplies globally.{ wrapper: TooltipProvider },@@ -304,7 +304,7 @@ describe("CategoricalFacet", () => {const options = Array.from({ length: 20 }, (_, i) => `opt-${i}`);const value = options.filter((option) => option !== "opt-18");render(- <Accordion type="multiple" value={["c"]}>+ <AccordionPrimitive.Root type="multiple" value={["c"]}><CategoricalFacetlabel="C"filterKey="c"@@ -320,7 +320,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,// The active-facet clear affordance renders a Tooltip, which needs the// provider the app supplies globally.{ wrapper: TooltipProvider },@@ -347,7 +347,7 @@ describe("CategoricalFacet", () => {// deliberate no-op in the state model, so the tab must read disabled// instead of silently doing nothing.render(- <Accordion type="multiple" value={["tags"]}>+ <AccordionPrimitive.Root type="multiple" value={["tags"]}><CategoricalFacetlabel="Tags"filterKey="tags"@@ -363,14 +363,14 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,{ wrapper: TooltipProvider },);expect(screen.getByRole("tab", { name: "None of" })).toBeDisabled();// With a persisted selection the operator conversion is meaningful.render(- <Accordion type="multiple" value={["tags2"]}>+ <AccordionPrimitive.Root type="multiple" value={["tags2"]}><CategoricalFacetlabel="Tags2"filterKey="tags2"@@ -386,7 +386,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,{ wrapper: TooltipProvider },);const tabs = screen.getAllByRole("tab", { name: "None of" });@@ -395,7 +395,7 @@ describe("CategoricalFacet", () => {it("does not reorder short, fully-visible lists", () => {render(- <Accordion type="multiple" value={["c"]}>+ <AccordionPrimitive.Root type="multiple" value={["c"]}><CategoricalFacetlabel="C"filterKey="c"@@ -409,7 +409,7 @@ describe("CategoricalFacet", () => {isDisabled={false}onReset={() => {}}/>- </Accordion>,+ </AccordionPrimitive.Root>,// The active-facet clear affordance renders a Tooltip, which needs the// provider the app supplies globally.{ wrapper: TooltipProvider },diff --git a/web/src/components/table/data-table-controls.tsx b/web/src/components/table/data-table-controls.tsxindex 3b361e8829..6d25fd0cb3 100644--- a/web/src/components/table/data-table-controls.tsx+++ b/web/src/components/table/data-table-controls.tsx@@ -35,7 +35,6 @@ import { useMediaQuery } from "react-responsive";import useLocalStorage from "@/src/components/useLocalStorage";import { cn } from "@/src/utils/tailwind";import { compactNumberFormatter } from "@/src/utils/numbers";-import { Accordion } from "@/src/components/ui/accordion";import * as AccordionPrimitive from "@radix-ui/react-accordion";import {Check,@@ -725,61 +724,62 @@ export function DataTableControls({onPointerDownCapture={noteFacetInteraction}onKeyDownCapture={noteFacetInteraction}>- <Accordion- type="multiple"- className="w-full"- value={queryFilter.expanded}- onValueChange={(next) => {- const prev = queryFilter.expanded;- queryFilter.onExpandedChange(next);- // One header click changes exactly one column. Expand-all, add- // filter, and AI apply call onExpandedChange directly and skip- // this handler, so they do not double-count as facet toggles.- const added = next.filter((column) => !prev.includes(column));- const removed = prev.filter((column) => !next.includes(column));- if (added.length + removed.length !== 1) return;- capture("filters:facet_toggled", {- tableName,- column: added[0] ?? removed[0],- expanded: added.length === 1,- layout,- isV4: queryFilter.isV4 ?? false,- });- }}- >- {/* ONE keyed child array — not two .map() slices: React can- only match keys within the same array, so a facet crossing- the promoted/rest boundary would REMOUNT (wiping input- focus and draft state) instead of moving.-- Every facet renders; a search only sets `hidden`- on the rows it excludes. The wrapper is always present for- the same reason the array is single: swapping the element- around a facet would remount it and lose its draft state. */}- {displayedFilters.flatMap((filter) => {- const nodes = [];- if (showPromotedSeparator && filter.column === firstCatalogColumn) {+ <div className="w-full">+ <AccordionPrimitive.Root+ type="multiple"+ value={queryFilter.expanded}+ onValueChange={(next) => {+ const prev = queryFilter.expanded;+ queryFilter.onExpandedChange(next);+ // One header click changes exactly one column. Expand-all, add+ // filter, and AI apply call onExpandedChange directly and skip+ // this handler, so they do not double-count as facet toggles.+ const added = next.filter((column) => !prev.includes(column));+ const removed = prev.filter((column) => !next.includes(column));+ if (added.length + removed.length !== 1) return;+ capture("filters:facet_toggled", {+ tableName,+ column: added[0] ?? removed[0],+ expanded: added.length === 1,+ layout,+ isV4: queryFilter.isV4 ?? false,+ });+ }}+ >+ {/* ONE keyed child array — not two .map() slices: React can+ only match keys within the same array, so a facet crossing+ the promoted/rest boundary would REMOUNT (wiping input+ focus and draft state) instead of moving.++ Every facet renders; a search only sets `hidden`+ on the rows it excludes. The wrapper is always present for+ the same reason the array is single: swapping the element+ around a facet would remount it and lose its draft state. */}+ {displayedFilters.flatMap((filter) => {+ const nodes = [];+ if (showPromotedSeparator && filter.column === firstCatalogColumn) {+ nodes.push(+ // The one line that means something: the boundary+ // between the active/added block and the catalog.+ <div+ key="promoted-separator"+ className="border-border mx-2 my-2 border-t"+ aria-hidden+ />,+ );+ }nodes.push(- // The one line that means something: the boundary- // between the active/added block and the catalog.<div- key="promoted-separator"- className="border-border mx-2 my-2 border-t"- aria-hidden- />,+ key={filter.column}+ hidden={!visibleColumns.has(filter.column)}+ >+ {renderFacet(filter)}+ </div>,);- }- nodes.push(- <div- key={filter.column}- hidden={!visibleColumns.has(filter.column)}- >- {renderFacet(filter)}- </div>,- );- return nodes;- })}- </Accordion>+ return nodes;+ })}+ </AccordionPrimitive.Root>+ </div>{/* Nothing matched — including any facet currently filtering, which thequery hides like the rest. */}diff --git a/web/src/components/ui/accordion.tsx b/web/src/components/ui/accordion.tsxdeleted file mode 100644index 7f07ff2638..0000000000--- a/web/src/components/ui/accordion.tsx+++ /dev/null@@ -1,59 +0,0 @@-/* eslint-disable @repo/no-style-props */-"use client";--import * as React from "react";-import * as AccordionPrimitive from "@radix-ui/react-accordion";-import { ChevronDown } from "lucide-react";--import { cn } from "@/src/utils/tailwind";--const Accordion = AccordionPrimitive.Root;--const AccordionItem = React.forwardRef<- React.ComponentRef<typeof AccordionPrimitive.Item>,- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>->(({ className, ...props }, ref) => (- <AccordionPrimitive.Item- ref={ref}- className={cn("border-b", className)}- {...props}- />-));-AccordionItem.displayName = "AccordionItem";--const AccordionTrigger = React.forwardRef<- React.ComponentRef<typeof AccordionPrimitive.Trigger>,- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>->(({ className, children, ...props }, ref) => (- <AccordionPrimitive.Header className="flex">- <AccordionPrimitive.Trigger- ref={ref}- className={cn(- "flex flex-1 items-center justify-between py-4 font-bold transition-all hover:underline [&[data-state=open]>svg]:rotate-180",- className,- )}- {...props}- >- {children}- <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />- </AccordionPrimitive.Trigger>- </AccordionPrimitive.Header>-));-AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;--const AccordionContent = React.forwardRef<- React.ComponentRef<typeof AccordionPrimitive.Content>,- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>->(({ className, children, ...props }, ref) => (- <AccordionPrimitive.Content- ref={ref}- className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all"- {...props}- >- <div className={cn("pt-0 pb-4", className)}>{children}</div>- </AccordionPrimitive.Content>-));--AccordionContent.displayName = AccordionPrimitive.Content.displayName;--export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };diff --git a/web/src/features/datasets/components/DatasetItemDiffView.tsx b/web/src/features/datasets/components/DatasetItemDiffView.tsxindex ac98b21710..d04a9b07a7 100644--- a/web/src/features/datasets/components/DatasetItemDiffView.tsx+++ b/web/src/features/datasets/components/DatasetItemDiffView.tsx@@ -1,11 +1,6 @@import type { DatasetItemDomain } from "@langfuse/shared";import DiffViewer from "@/src/components/DiffViewer";-import {- Accordion,- AccordionContent,- AccordionItem,- AccordionTrigger,-} from "@/src/components/ui/accordion";+import { Accordion } from "@/src/components/design-system/Accordion/Accordion";import { stringifyDatasetItemData } from "../utils/datasetItemUtils";type DatasetItemDiffViewProps = {@@ -19,49 +14,55 @@ export const DatasetItemDiffView = ({}: DatasetItemDiffViewProps) => {return (<div className="space-y-4">- <Accordion- type="multiple"- defaultValue={["input", "output"]}- className="w-full"- >- <AccordionItem value="input">- <AccordionTrigger>Input</AccordionTrigger>- <AccordionContent>- <DiffViewer- oldString={stringifyDatasetItemData(selectedVersion.input)}- newString={stringifyDatasetItemData(latestVersion.input)}- oldLabel="Selected Version"- newLabel="Latest Version"- />- </AccordionContent>- </AccordionItem>+ <div className="w-full">+ <Accordion type="multiple" defaultValue={["input", "output"]}>+ <Accordion.Item value="input">+ <Accordion.Trigger>Input</Accordion.Trigger>+ <Accordion.Content>+ <div className="pb-4">+ <DiffViewer+ oldString={stringifyDatasetItemData(selectedVersion.input)}+ newString={stringifyDatasetItemData(latestVersion.input)}+ oldLabel="Selected Version"+ newLabel="Latest Version"+ />+ </div>+ </Accordion.Content>+ </Accordion.Item>- <AccordionItem value="output">- <AccordionTrigger>Expected Output</AccordionTrigger>- <AccordionContent>- <DiffViewer- oldString={stringifyDatasetItemData(- selectedVersion.expectedOutput,- )}- newString={stringifyDatasetItemData(latestVersion.expectedOutput)}- oldLabel="Selected Version"- newLabel="Latest Version"- />- </AccordionContent>- </AccordionItem>+ <Accordion.Item value="output">+ <Accordion.Trigger>Expected Output</Accordion.Trigger>+ <Accordion.Content>+ <div className="pb-4">+ <DiffViewer+ oldString={stringifyDatasetItemData(+ selectedVersion.expectedOutput,+ )}+ newString={stringifyDatasetItemData(+ latestVersion.expectedOutput,+ )}+ oldLabel="Selected Version"+ newLabel="Latest Version"+ />+ </div>+ </Accordion.Content>+ </Accordion.Item>- <AccordionItem value="metadata">- <AccordionTrigger>Metadata</AccordionTrigger>- <AccordionContent>- <DiffViewer- oldString={stringifyDatasetItemData(selectedVersion.metadata)}- newString={stringifyDatasetItemData(latestVersion.metadata)}- oldLabel="Selected Version"- newLabel="Latest Version"- />- </AccordionContent>- </AccordionItem>- </Accordion>+ <Accordion.Item value="metadata">+ <Accordion.Trigger>Metadata</Accordion.Trigger>+ <Accordion.Content>+ <div className="pb-4">+ <DiffViewer+ oldString={stringifyDatasetItemData(selectedVersion.metadata)}+ newString={stringifyDatasetItemData(latestVersion.metadata)}+ oldLabel="Selected Version"+ newLabel="Latest Version"+ />+ </div>+ </Accordion.Content>+ </Accordion.Item>+ </Accordion>+ </div></div>);};diff --git a/web/src/features/datasets/components/DatasetVersionHistoryPanel.tsx b/web/src/features/datasets/components/DatasetVersionHistoryPanel.tsxindex 11c8cc7ee1..1cd710a003 100644--- a/web/src/features/datasets/components/DatasetVersionHistoryPanel.tsx+++ b/web/src/features/datasets/components/DatasetVersionHistoryPanel.tsx@@ -1,9 +1,4 @@-import {- Accordion,- AccordionContent,- AccordionItem,- AccordionTrigger,-} from "@/src/components/ui/accordion";+import { Accordion } from "@/src/components/design-system/Accordion/Accordion";import { Skeleton } from "@/src/components/ui/skeleton";import { Button } from "@/src/components/ui/button";import {@@ -233,80 +228,92 @@ export function DatasetVersionHistoryPanel({<Accordion type="multiple" defaultValue={["today"]}>{/* Today */}{groupedVersions.today.length > 0 && (- <AccordionItem value="today" className="px-2">- <AccordionTrigger className="text-sm font-bold">- Today ({groupedVersions.today.length})- </AccordionTrigger>- <AccordionContent>- <div className="flex flex-col gap-1">- {groupedVersions.today.map((v, i) => renderVersionItem(v, i))}- </div>- </AccordionContent>- </AccordionItem>+ <Accordion.Item value="today">+ <div className="px-2">+ <Accordion.Trigger size="sm">+ Today ({groupedVersions.today.length})+ </Accordion.Trigger>+ <Accordion.Content>+ <div className="flex flex-col gap-1 pb-4">+ {groupedVersions.today.map((v, i) =>+ renderVersionItem(v, i),+ )}+ </div>+ </Accordion.Content>+ </div>+ </Accordion.Item>)}{/* Yesterday */}{groupedVersions.yesterday.length > 0 && (- <AccordionItem value="yesterday" className="px-2">- <AccordionTrigger className="text-sm font-bold">- Yesterday ({groupedVersions.yesterday.length})- </AccordionTrigger>- <AccordionContent>- <div className="flex flex-col gap-1">- {groupedVersions.yesterday.map((v) =>- renderVersionItem(v, versions.indexOf(v)),- )}- </div>- </AccordionContent>- </AccordionItem>+ <Accordion.Item value="yesterday">+ <div className="px-2">+ <Accordion.Trigger size="sm">+ Yesterday ({groupedVersions.yesterday.length})+ </Accordion.Trigger>+ <Accordion.Content>+ <div className="flex flex-col gap-1 pb-4">+ {groupedVersions.yesterday.map((v) =>+ renderVersionItem(v, versions.indexOf(v)),+ )}+ </div>+ </Accordion.Content>+ </div>+ </Accordion.Item>)}{/* Last 7 Days */}{groupedVersions.last7Days.length > 0 && (- <AccordionItem value="last7days" className="px-2">- <AccordionTrigger className="text-sm font-bold">- Last 7 Days ({groupedVersions.last7Days.length})- </AccordionTrigger>- <AccordionContent>- <div className="flex flex-col gap-1">- {groupedVersions.last7Days.map((v) =>- renderVersionItem(v, versions.indexOf(v)),- )}- </div>- </AccordionContent>- </AccordionItem>+ <Accordion.Item value="last7days">+ <div className="px-2">+ <Accordion.Trigger size="sm">+ Last 7 Days ({groupedVersions.last7Days.length})+ </Accordion.Trigger>+ <Accordion.Content>+ <div className="flex flex-col gap-1 pb-4">+ {groupedVersions.last7Days.map((v) =>+ renderVersionItem(v, versions.indexOf(v)),+ )}+ </div>+ </Accordion.Content>+ </div>+ </Accordion.Item>)}{/* Last 30 Days */}{groupedVersions.last30Days.length > 0 && (- <AccordionItem value="last30days" className="px-2">- <AccordionTrigger className="text-sm font-bold">- Last 30 Days ({groupedVersions.last30Days.length})- </AccordionTrigger>- <AccordionContent>- <div className="flex flex-col gap-1">- {groupedVersions.last30Days.map((v) =>- renderVersionItem(v, versions.indexOf(v)),- )}- </div>- </AccordionContent>- </AccordionItem>+ <Accordion.Item value="last30days">+ <div className="px-2">+ <Accordion.Trigger size="sm">+ Last 30 Days ({groupedVersions.last30Days.length})+ </Accordion.Trigger>+ <Accordion.Content>+ <div className="flex flex-col gap-1 pb-4">+ {groupedVersions.last30Days.map((v) =>+ renderVersionItem(v, versions.indexOf(v)),+ )}+ </div>+ </Accordion.Content>+ </div>+ </Accordion.Item>)}{/* Older */}{groupedVersions.older.length > 0 && (- <AccordionItem value="older" className="px-2">- <AccordionTrigger className="text-sm font-bold">- Older ({groupedVersions.older.length})- </AccordionTrigger>- <AccordionContent>- <div className="flex flex-col gap-1">- {groupedVersions.older.map((v) =>- renderVersionItem(v, versions.indexOf(v)),- )}- </div>- </AccordionContent>- </AccordionItem>+ <Accordion.Item value="older">+ <div className="px-2">+ <Accordion.Trigger size="sm">+ Older ({groupedVersions.older.length})+ </Accordion.Trigger>+ <Accordion.Content>+ <div className="flex flex-col gap-1 pb-4">+ {groupedVersions.older.map((v) =>+ renderVersionItem(v, versions.indexOf(v)),+ )}+ </div>+ </Accordion.Content>+ </div>+ </Accordion.Item>)}</Accordion></div>diff --git a/web/src/features/experiments/components/RemoteExperimentUpsertForm.tsx b/web/src/features/experiments/components/RemoteExperimentUpsertForm.tsxindex d2df232ceb..ccb3dba4ba 100644--- a/web/src/features/experiments/components/RemoteExperimentUpsertForm.tsx+++ b/web/src/features/experiments/components/RemoteExperimentUpsertForm.tsx@@ -1,15 +1,10 @@/* eslint-disable @repo/no-null-render */import React, { useState } from "react";+import * as AccordionPrimitive from "@radix-ui/react-accordion";import { useForm, useFieldArray } from "react-hook-form";import { zodResolver } from "@hookform/resolvers/zod";import { z } from "zod";-import { Lock, LockOpen, Plus, X } from "lucide-react";-import {- Accordion,- AccordionContent,- AccordionItem,- AccordionTrigger,-} from "@/src/components/ui/accordion";+import { ChevronDown, Lock, LockOpen, Plus, X } from "lucide-react";import { Button } from "@/src/components/ui/button";import {DialogBody,@@ -382,136 +377,146 @@ export const RemoteExperimentUpsertForm = ({)}/>- <Accordion type="single" collapsible>- <AccordionItem value="advanced" className="border-b-0">- <AccordionTrigger className="justify-start gap-2 py-2 text-sm font-bold [&>svg]:order-first [&>svg]:-rotate-90 [&[data-state=open]>svg]:rotate-0">- Advanced Options- </AccordionTrigger>- <AccordionContent className="space-y-6 px-1 pt-2">- <div>- <FormLabel>Custom headers</FormLabel>- <FormDescription className="mb-2">- Optional headers to include in the request, e.g. for- authenticating with your service. Secret header values are- stored encrypted and shown masked.- </FormDescription>+ <AccordionPrimitive.Root type="single" collapsible>+ <AccordionPrimitive.Item value="advanced">+ <AccordionPrimitive.Header className="flex">+ <AccordionPrimitive.Trigger className="flex flex-1 items-center justify-start gap-2 py-2 text-sm font-bold transition-all hover:underline [&>svg]:order-first [&>svg]:-rotate-90 [&[data-state=open]>svg]:rotate-0">+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />+ Advanced Options+ </AccordionPrimitive.Trigger>+ </AccordionPrimitive.Header>+ <AccordionPrimitive.Content className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all">+ <div className="space-y-6 px-1 pt-2 pb-4">+ <div>+ <FormLabel>Custom headers</FormLabel>+ <FormDescription className="mb-2">+ Optional headers to include in the request, e.g. for+ authenticating with your service. Secret header values+ are stored encrypted and shown masked.+ </FormDescription>- {headerFields.map((field, index) => {- const isSecret = form.watch(`headers.${index}.isSecret`);- const displayValue = form.watch(- `headers.${index}.displayValue`,- );+ {headerFields.map((field, index) => {+ const isSecret = form.watch(+ `headers.${index}.isSecret`,+ );+ const displayValue = form.watch(+ `headers.${index}.displayValue`,+ );- return (- <div- key={field.id}- className="mb-2 grid grid-cols-[1fr_1fr_auto_auto] gap-2"- >- <FormField- control={form.control}- name={`headers.${index}.name`}- render={({ field }) => (- <FormItem>- <FormControl>- <Input placeholder="Header Name" {...field} />- </FormControl>- <FormMessage />- </FormItem>- )}- />- <FormField- control={form.control}- name={`headers.${index}.value`}- render={({ field }) => (- <FormItem>- <FormControl>- <Input- placeholder={displayValue || "Value"}- {...field}- type={isSecret ? "password" : "text"}- />- </FormControl>- <FormMessage />- </FormItem>- )}- />- <Button- type="button"- variant="ghost"- size="icon"- onClick={() =>- form.setValue(- `headers.${index}.isSecret`,- !isSecret,- )- }- title={- isSecret- ? "Make header public"- : "Make header secret"- }+ return (+ <div+ key={field.id}+ className="mb-2 grid grid-cols-[1fr_1fr_auto_auto] gap-2">- {isSecret ? (- <Lock className="h-4 w-4 text-orange-500" />- ) : (- <LockOpen className="text-muted-foreground h-4 w-4" />- )}- </Button>- <Button- type="button"- variant="ghost"- size="icon"- onClick={() => removeHeader(index)}- >- <X className="h-4 w-4" />- </Button>- </div>- );- })}+ <FormField+ control={form.control}+ name={`headers.${index}.name`}+ render={({ field }) => (+ <FormItem>+ <FormControl>+ <Input+ placeholder="Header Name"+ {...field}+ />+ </FormControl>+ <FormMessage />+ </FormItem>+ )}+ />+ <FormField+ control={form.control}+ name={`headers.${index}.value`}+ render={({ field }) => (+ <FormItem>+ <FormControl>+ <Input+ placeholder={displayValue || "Value"}+ {...field}+ type={isSecret ? "password" : "text"}+ />+ </FormControl>+ <FormMessage />+ </FormItem>+ )}+ />+ <Button+ type="button"+ variant="ghost"+ size="icon"+ onClick={() =>+ form.setValue(+ `headers.${index}.isSecret`,+ !isSecret,+ )+ }+ title={+ isSecret+ ? "Make header public"+ : "Make header secret"+ }+ >+ {isSecret ? (+ <Lock className="h-4 w-4 text-orange-500" />+ ) : (+ <LockOpen className="text-muted-foreground h-4 w-4" />+ )}+ </Button>+ <Button+ type="button"+ variant="ghost"+ size="icon"+ onClick={() => removeHeader(index)}+ >+ <X className="h-4 w-4" />+ </Button>+ </div>+ );+ })}- <Button- type="button"- variant="outline"- onClick={() =>- appendHeader({- name: "",- value: "",- isSecret: false,- displayValue: "",- })- }- className="mt-2"- >- <Plus className="mr-1 h-4 w-4" />- Add Custom Header- </Button>- </div>+ <Button+ type="button"+ variant="outline"+ onClick={() =>+ appendHeader({+ name: "",+ value: "",+ isSecret: false,+ displayValue: "",+ })+ }+ className="mt-2"+ >+ <Plus className="mr-1 h-4 w-4" />+ Add Custom Header+ </Button>+ </div>- <FormField- control={form.control}- name="enabled"- render={({ field }) => (- <FormItem className="flex flex-row items-center justify-between rounded-lg border p-3">- <div className="space-y-0.5">- <FormLabel>Enabled</FormLabel>- <FormDescription>- {field.value- ? "Trigger is active. You can disable anytime to pause without losing your configuration."- : "Trigger is paused. Enable to allow running remote experiments."}- </FormDescription>- </div>- <FormControl>- <Switch- checked={field.value}- onCheckedChange={field.onChange}- />- </FormControl>- </FormItem>- )}- />- </AccordionContent>- </AccordionItem>- </Accordion>+ <FormField+ control={form.control}+ name="enabled"+ render={({ field }) => (+ <FormItem className="flex flex-row items-center justify-between rounded-lg border p-3">+ <div className="space-y-0.5">+ <FormLabel>Enabled</FormLabel>+ <FormDescription>+ {field.value+ ? "Trigger is active. You can disable anytime to pause without losing your configuration."+ : "Trigger is paused. Enable to allow running remote experiments."}+ </FormDescription>+ </div>+ <FormControl>+ <Switch+ checked={field.value}+ onCheckedChange={field.onChange}+ />+ </FormControl>+ </FormItem>+ )}+ />+ </div>+ </AccordionPrimitive.Content>+ </AccordionPrimitive.Item>+ </AccordionPrimitive.Root></DialogBody><DialogFooter>diff --git a/web/src/features/experiments/components/table/ExperimentsTable.tsx b/web/src/features/experiments/components/table/ExperimentsTable.tsxindex 608aa9a107..439509822c 100644--- a/web/src/features/experiments/components/table/ExperimentsTable.tsx+++ b/web/src/features/experiments/components/table/ExperimentsTable.tsx@@ -37,7 +37,7 @@ import { useTableDateRange } from "@/src/hooks/useTableDateRange";import { toAbsoluteTimeRange } from "@/src/utils/date-range-utils";import { TableHeaderControls } from "@/src/components/table/table-header-controls";import useColumnOrder from "@/src/features/column-visibility/hooks/useColumnOrder";-import { GitCompareArrows, LightbulbIcon } from "lucide-react";+import { ChevronDown, GitCompareArrows, LightbulbIcon } from "lucide-react";import { createDateTableColumn } from "@/src/components/design-system/table/columns/createDateTableColumn";import { createNumberTableColumn } from "@/src/components/design-system/table/columns/createNumberTableColumn";import { createIOTableColumn } from "@/src/components/design-system/table/columns/createIOTableColumn";@@ -59,13 +59,8 @@ import { useExperimentsTableData } from "../../hooks/useExperimentsTableData";import { type ExperimentsTableRow, type ExperimentsTableProps } from "./types";import { useExperimentFilterOptions } from "../../hooks/useExperimentFilterOptions";import { RunEvaluationDialog } from "@/src/features/batch-actions/components/RunEvaluationDialog";+import * as AccordionPrimitive from "@radix-ui/react-accordion";import { useHasProjectAccess } from "@/src/features/rbac";-import {- Accordion,- AccordionContent,- AccordionItem,- AccordionTrigger,-} from "@/src/components/ui/accordion";import { ExperimentChartsGrid } from "../ExperimentChartsGrid";import { useExperimentChartsAccordion } from "../../hooks/useExperimentChartsAccordion";import {@@ -875,29 +870,36 @@ export default function ExperimentsTable({{/* Charts section - Collapsible Accordion */}{tableDateRange && (- <Accordion+ <AccordionPrimitive.Roottype="single"collapsiblevalue={accordionValue}onValueChange={handleChartsAccordionChange}>- <AccordionItem value="charts" className="border-t">- <AccordionTrigger className="px-3 pt-2 pb-1 hover:no-underline">- <div className="flex items-center gap-2">- <span className="text-sm font-bold">Charts</span>+ <AccordionPrimitive.Item className="border-t" value="charts">+ <AccordionPrimitive.Header className="flex">+ <AccordionPrimitive.Trigger className="flex flex-1 items-center justify-between px-3 pt-2 pb-1 font-bold transition-all hover:no-underline [&[data-state=open]>svg]:rotate-180">+ <div className="flex items-center gap-2">+ <span className="text-sm font-bold">Charts</span>+ </div>+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />+ </AccordionPrimitive.Trigger>+ </AccordionPrimitive.Header>+ <AccordionPrimitive.Content className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all">+ <div className="px-3 pt-1 pb-1">+ <div className="max-h-[40dvh] overflow-x-auto">+ <ExperimentChartsGrid+ projectId={projectId}+ experiments={chartExperiments}+ fromTimestamp={tableDateRange.from}+ toTimestamp={tableDateRange.to}+ isExternalLoading={experiments.status === "loading"}+ />+ </div></div>- </AccordionTrigger>- <AccordionContent className="max-h-[40dvh] overflow-x-auto px-3 pt-1 pb-1">- <ExperimentChartsGrid- projectId={projectId}- experiments={chartExperiments}- fromTimestamp={tableDateRange.from}- toTimestamp={tableDateRange.to}- isExternalLoading={experiments.status === "loading"}- />- </AccordionContent>- </AccordionItem>- </Accordion>+ </AccordionPrimitive.Content>+ </AccordionPrimitive.Item>+ </AccordionPrimitive.Root>)}{/* Content area with sidebar and table */}diff --git a/web/src/features/models/components/PricingSection/PricingSection.tsx b/web/src/features/models/components/PricingSection/PricingSection.tsxindex a6447292c1..03b29c2fcc 100644--- a/web/src/features/models/components/PricingSection/PricingSection.tsx+++ b/web/src/features/models/components/PricingSection/PricingSection.tsx@@ -1,9 +1,9 @@import { PlusCircle } from "lucide-react";+import * as AccordionPrimitive from "@radix-ui/react-accordion";import { useState } from "react";import { useFieldArray, type UseFormReturn } from "react-hook-form";import { Button } from "@/src/components/ui/button";import { FormDescription, FormLabel } from "@/src/components/ui/form";-import { Accordion } from "@/src/components/ui/accordion";import { derivePriorities } from "@/src/features/models/fns/derivePriorities";import { makeUsageTypeKeys } from "@/src/features/models/fns/makeUsageTypeKeys";import { TierAccordionItem } from "./components/TierAccordionItem";@@ -137,13 +137,13 @@ export function PricingSection({ form }: PricingSectionProps) {</FormDescription></div>- <Accordion+ <AccordionPrimitive.Root+ className="space-y-2"type="multiple"value={tierIds.filter((id) => !collapsedTiers.includes(id))}onValueChange={(open) =>setCollapsedTiers(tierIds.filter((id) => !open.includes(id)))}- className="space-y-2">{tiers.fields.map((field, index) => (<TierAccordionItem@@ -165,7 +165,7 @@ export function PricingSection({ form }: PricingSectionProps) {/></TierAccordionItem>))}- </Accordion>+ </AccordionPrimitive.Root><Button type="button" variant="outline" onClick={addTier}><PlusCircle className="mr-2 h-4 w-4" />diff --git a/web/src/features/models/components/PricingSection/components/TierAccordionItem.tsx b/web/src/features/models/components/PricingSection/components/TierAccordionItem.tsxindex 20cb62fb14..19f10a5cb0 100644--- a/web/src/features/models/components/PricingSection/components/TierAccordionItem.tsx+++ b/web/src/features/models/components/PricingSection/components/TierAccordionItem.tsx@@ -1,12 +1,8 @@-import { Trash2 } from "lucide-react";+import * as AccordionPrimitive from "@radix-ui/react-accordion";+import { ChevronDown, Trash2 } from "lucide-react";import { Button } from "@/src/components/ui/button";import { Input } from "@/src/components/ui/input";import { Badge } from "@/src/components/ui/badge";-import {- AccordionContent,- AccordionItem,- AccordionTrigger,-} from "@/src/components/ui/accordion";import {FormControl,FormField,@@ -49,53 +45,61 @@ export function TierAccordionItem({});return (- <AccordionItem value={tier.id} className="bg-muted/30 rounded-lg border">- <AccordionTrigger className="px-4 hover:no-underline">- <div className="flex w-full items-center justify-between">- <div className="flex items-center gap-2">- <span className="font-bold">{name ?? tier.name}</span>- {isDefault && <Badge variant="secondary">Default</Badge>}- <span className="text-muted-foreground text-xs">- Priority: {priority}- </span>+ <AccordionPrimitive.Item+ className="bg-muted/30 rounded-lg border"+ value={tier.id}+ >+ <AccordionPrimitive.Header className="flex">+ <AccordionPrimitive.Trigger className="flex flex-1 items-center justify-between px-4 py-4 font-bold transition-all hover:no-underline [&[data-state=open]>svg]:rotate-180">+ <div className="flex w-full items-center justify-between">+ <div className="flex items-center gap-2">+ <span className="font-bold">{name ?? tier.name}</span>+ {isDefault && <Badge variant="secondary">Default</Badge>}+ <span className="text-muted-foreground text-xs">+ Priority: {priority}+ </span>+ </div>+ {!isDefault && (+ <Button+ type="button"+ variant="ghost"+ size="sm"+ onClick={(e) => {+ e.stopPropagation();+ remove(index);+ }}+ >+ <Trash2 className="h-4 w-4" />+ </Button>+ )}</div>- {!isDefault && (- <Button- type="button"- variant="ghost"- size="sm"- onClick={(e) => {- e.stopPropagation();- remove(index);- }}- >- <Trash2 className="h-4 w-4" />- </Button>- )}- </div>- </AccordionTrigger>+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />+ </AccordionPrimitive.Trigger>+ </AccordionPrimitive.Header>- <AccordionContent className="space-y-4 px-4 pb-4">- {/* Tier Name */}- <FormField- control={form.control}- name={`pricingTiers.${index}.name`}- render={({ field }) => (- <FormItem>- <FormLabel>Tier Name</FormLabel>- <FormControl>- <Input {...field} disabled={isDefault} />- </FormControl>- <FormMessage />- </FormItem>- )}- />+ <AccordionPrimitive.Content className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all">+ <div className="space-y-4 px-4 pt-0 pb-4">+ {/* Tier Name */}+ <FormField+ control={form.control}+ name={`pricingTiers.${index}.name`}+ render={({ field }) => (+ <FormItem>+ <FormLabel>Tier Name</FormLabel>+ <FormControl>+ <Input {...field} disabled={isDefault} />+ </FormControl>+ <FormMessage />+ </FormItem>+ )}+ />- {/* Conditions (only for non-default) */}- {!isDefault && <TierConditionsEditor tierIndex={index} form={form} />}+ {/* Conditions (only for non-default) */}+ {!isDefault && <TierConditionsEditor tierIndex={index} form={form} />}- {children}- </AccordionContent>- </AccordionItem>+ {children}+ </div>+ </AccordionPrimitive.Content>+ </AccordionPrimitive.Item>);}diff --git a/web/src/features/monitors/components/MonitorForm.tsx b/web/src/features/monitors/components/MonitorForm.tsxindex 794e4ffe8c..30222ee749 100644--- a/web/src/features/monitors/components/MonitorForm.tsx+++ b/web/src/features/monitors/components/MonitorForm.tsx@@ -1,7 +1,8 @@/* eslint-disable @repo/no-style-props */import React, { useMemo, useRef } from "react";+import * as AccordionPrimitive from "@radix-ui/react-accordion";import { useRouter } from "next/router";-import { type LucideIcon, Plus } from "lucide-react";+import { ChevronDown, type LucideIcon, Plus } from "lucide-react";import { useForm, useWatch } from "react-hook-form";import { zodResolver } from "@hookform/resolvers/zod";import { startCase } from "lodash";@@ -9,12 +10,6 @@ import { startCase } from "lodash";import { api } from "@/src/utils/api";import { AIAssistedInput } from "@/src/components/ui/ai-assisted-input";import { Button } from "@/src/components/ui/button";-import {- Accordion,- AccordionContent,- AccordionItem,- AccordionTrigger,-} from "@/src/components/ui/accordion";import {Card,CardContent,@@ -753,43 +748,48 @@ export const MonitorForm = ({</FormItem>)}/>- <Accordion type="single" collapsible>- <AccordionItem value="advanced" className="border-b-0">- <AccordionTrigger className="justify-start gap-2 py-2 text-sm font-bold [&>svg]:order-first [&>svg]:-rotate-90 [&[data-state=open]>svg]:rotate-0">- Advanced Options- </AccordionTrigger>- <AccordionContent className="space-y-6 px-1 pt-2">- <FormField- control={form.control}- name="noData"- render={({ field }) => (- <FormItem>- <NoDataField- value={field.value as MonitorNoData}- onChange={field.onChange}- disabled={!hasAccess}- />- <FormMessage />- </FormItem>- )}- />- <FormField- control={form.control}- name="renotify"- render={({ field }) => (- <FormItem>- <RenotifyField- value={field.value as MonitorRenotify}- onChange={field.onChange}- disabled={!hasAccess}- />- <FormMessage />- </FormItem>- )}- />- </AccordionContent>- </AccordionItem>- </Accordion>+ <AccordionPrimitive.Root type="single" collapsible>+ <AccordionPrimitive.Item value="advanced">+ <AccordionPrimitive.Header className="flex">+ <AccordionPrimitive.Trigger className="flex flex-1 items-center justify-start gap-2 py-2 text-sm font-bold transition-all hover:underline [&>svg]:order-first [&>svg]:-rotate-90 [&[data-state=open]>svg]:rotate-0">+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />+ Advanced Options+ </AccordionPrimitive.Trigger>+ </AccordionPrimitive.Header>+ <AccordionPrimitive.Content className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all">+ <div className="space-y-6 px-1 pt-2 pb-4">+ <FormField+ control={form.control}+ name="noData"+ render={({ field }) => (+ <FormItem>+ <NoDataField+ value={field.value as MonitorNoData}+ onChange={field.onChange}+ disabled={!hasAccess}+ />+ <FormMessage />+ </FormItem>+ )}+ />+ <FormField+ control={form.control}+ name="renotify"+ render={({ field }) => (+ <FormItem>+ <RenotifyField+ value={field.value as MonitorRenotify}+ onChange={field.onChange}+ disabled={!hasAccess}+ />+ <FormMessage />+ </FormItem>+ )}+ />+ </div>+ </AccordionPrimitive.Content>+ </AccordionPrimitive.Item>+ </AccordionPrimitive.Root></Section><Section title="Notifications" step={3} className="pb-2">