🪢 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): Enable `react/no-unused-prop-types` eslint rule (#13209)
Ben Bachem00784f72c5e4
diff --git a/packages/config-eslint/next.js b/packages/config-eslint/next.jsindex 3ffed9b58f..06e563f358 100644--- a/packages/config-eslint/next.js+++ b/packages/config-eslint/next.js@@ -95,6 +95,7 @@ export default [},],"react/jsx-key": ["error", { warnOnDuplicates: true }],+ "react/no-unused-prop-types": "warn",},},];diff --git a/web/src/__tests__/pivot-table.clienttest.tsx b/web/src/__tests__/pivot-table.clienttest.tsxindex fb73ae52c4..e6ddcf6b4f 100644--- a/web/src/__tests__/pivot-table.clienttest.tsx+++ b/web/src/__tests__/pivot-table.clienttest.tsx@@ -307,24 +307,6 @@ describe("PivotTable Component", () => {// Should still render a tableexpect(screen.getByRole("table")).toBeInTheDocument();});-- test("passes accessibilityLayer prop correctly", () => {- const data: DataPoint[] = [- {- time_dimension: "2024-01-01",- dimension: "test",- metric: 100,- },- ];-- const props: PivotTableProps = {- data,- accessibilityLayer: true,- };-- // Should render without error- expect(() => render(<PivotTable {...props} />)).not.toThrow();- });});describe("Data Processing Integration", () => {diff --git a/web/src/components/publish-object-switch.tsx b/web/src/components/publish-object-switch.tsxindex b998938940..55c24e12de 100644--- a/web/src/components/publish-object-switch.tsx+++ b/web/src/components/publish-object-switch.tsx@@ -100,7 +100,6 @@ export const PublishTraceSwitch = (props: {return (<Base- id={props.traceId}itemName="trace"isPublic={props.isPublic}size={props.size}@@ -141,7 +140,6 @@ export const PublishSessionSwitch = (props: {return (<Base- id={props.sessionId}itemName="session"isPublic={props.isPublic}size={props.size}@@ -160,7 +158,6 @@ export const PublishSessionSwitch = (props: {};const Base = (props: {- id: string;itemName: string;onChange: (value: boolean) => Promise<unknown>;isLoading: boolean;diff --git a/web/src/components/table/data-table-controls.tsx b/web/src/components/table/data-table-controls.tsxindex c78bb97549..3001d2de8e 100644--- a/web/src/components/table/data-table-controls.tsx+++ b/web/src/components/table/data-table-controls.tsx@@ -331,7 +331,6 @@ export function DataTableControls({interface BaseFacetProps {label: string;tooltip?: string;- children?: React.ReactNode;filterKey: string;filterKeyShort?: string | null;expanded?: boolean;diff --git a/web/src/components/table/data-table.tsx b/web/src/components/table/data-table.tsxindex 063f724171..20c644ded6 100644--- a/web/src/components/table/data-table.tsx+++ b/web/src/components/table/data-table.tsx@@ -486,6 +486,7 @@ interface TableBodyComponentProps<TData> {getRowClassName?: (row: TData) => string;topAlignCells?: boolean;cellPadding?: "compact" | "comfortable";+ // eslint-disable-next-line react/no-unused-prop-typestableSnapshot?: {columnVisibility?: VisibilityState;columnOrder?: ColumnOrderState;diff --git a/web/src/components/table/peek/peek-observation-detail.tsx b/web/src/components/table/peek/peek-observation-detail.tsxindex 38dd3614d0..20926a88cf 100644--- a/web/src/components/table/peek/peek-observation-detail.tsx+++ b/web/src/components/table/peek/peek-observation-detail.tsx@@ -2,7 +2,6 @@ import { useRouter } from "next/router";import { usePeekData } from "@/src/components/table/peek/hooks/usePeekData";import { Trace } from "@/src/components/trace2/Trace";import { Skeleton } from "@/src/components/ui/skeleton";-import { StringParam, useQueryParam, withDefault } from "use-query-params";export const PeekViewObservationDetail = ({projectId,@@ -27,11 +26,6 @@ export const PeekViewObservationDetail = ({timestamp,});- const [selectedTab, setSelectedTab] = useQueryParam(- "display",- withDefault(StringParam, "details"),- );-if (!peekId || !trace.data) {return <Skeleton className="h-full w-full rounded-none" />;}@@ -44,8 +38,6 @@ export const PeekViewObservationDetail = ({corrections={trace.data.corrections}projectId={trace.data.projectId}observations={trace.data.observations}- selectedTab={selectedTab}- setSelectedTab={setSelectedTab}context="peek"/>);diff --git a/web/src/components/table/peek/peek-trace-detail.tsx b/web/src/components/table/peek/peek-trace-detail.tsxindex b5e3c481ca..82887ecbf2 100644--- a/web/src/components/table/peek/peek-trace-detail.tsx+++ b/web/src/components/table/peek/peek-trace-detail.tsx@@ -2,7 +2,6 @@ import { usePeekData } from "@/src/components/table/peek/hooks/usePeekData";import { useRouter } from "next/router";import { Trace } from "@/src/components/trace2/Trace";import { Skeleton } from "@/src/components/ui/skeleton";-import { StringParam, useQueryParam, withDefault } from "use-query-params";export const PeekViewTraceDetail = ({ projectId }: { projectId: string }) => {const router = useRouter();@@ -16,11 +15,6 @@ export const PeekViewTraceDetail = ({ projectId }: { projectId: string }) => {timestamp,});- const [selectedTab, setSelectedTab] = useQueryParam(- "display",- withDefault(StringParam, "details"),- );-return !peekId || !trace.data ? (<Skeleton className="h-full w-full rounded-none" />) : (@@ -31,8 +25,6 @@ export const PeekViewTraceDetail = ({ projectId }: { projectId: string }) => {corrections={trace.data.corrections}projectId={trace.data.projectId}observations={trace.data.observations}- selectedTab={selectedTab}- setSelectedTab={setSelectedTab}context="peek"/>);diff --git a/web/src/components/table/use-cases/observations.tsx b/web/src/components/table/use-cases/observations.tsxindex e02bcff494..0fd95e6cc1 100644--- a/web/src/components/table/use-cases/observations.tsx+++ b/web/src/components/table/use-cases/observations.tsx@@ -64,7 +64,7 @@ import { InfoIcon, PlusCircle } from "lucide-react";import { UpsertModelFormDialog } from "@/src/features/models/components/UpsertModelFormDialog";import { LocalIsoDate } from "@/src/components/LocalIsoDate";import { Badge } from "@/src/components/ui/badge";-import { type RowSelectionState, type Row } from "@tanstack/react-table";+import { type RowSelectionState } from "@tanstack/react-table";import TableIdOrName from "@/src/components/table/table-id";import { ItemBadge } from "@/src/components/ItemBadge";import { PeekViewObservationDetail } from "@/src/components/table/peek/peek-observation-detail";@@ -1129,7 +1129,7 @@ export default function ObservationsTable({id: "tokensPerSecond",header: "Tokens per second",size: 200,- cell: ({ row }: { row: Row<ObservationsTableRow> }) => {+ cell: ({ row }) => {const latency: number | undefined = row.getValue("latency");const usage: {promptTokens: number;@@ -1158,7 +1158,7 @@ export default function ObservationsTable({enableHiding: true,defaultHidden: true,enableSorting,- cell: ({ row }: { row: Row<ObservationsTableRow> }) => {+ cell: ({ row }) => {const value: {inputUsage: number;outputUsage: number;@@ -1176,7 +1176,7 @@ export default function ObservationsTable({enableHiding: true,defaultHidden: true,enableSorting,- cell: ({ row }: { row: Row<ObservationsTableRow> }) => {+ cell: ({ row }) => {const value: {inputUsage: number;outputUsage: number;@@ -1194,7 +1194,7 @@ export default function ObservationsTable({enableHiding: true,defaultHidden: true,enableSorting,- cell: ({ row }: { row: Row<ObservationsTableRow> }) => {+ cell: ({ row }) => {const value: {inputUsage: number;outputUsage: number;@@ -1203,7 +1203,7 @@ export default function ObservationsTable({return <span>{numberFormatter(value.totalUsage, 0)}</span>;},},- ],+ ] satisfies LangfuseColumnDef<ObservationsTableRow>[],},{accessorKey: "cost",@@ -1221,7 +1221,7 @@ export default function ObservationsTable({header: "Input Cost",size: 120,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<ObservationsTableRow> }) => {+ cell: ({ row }) => {const value: {inputCost: number | undefined;outputCost: number | undefined;@@ -1241,7 +1241,7 @@ export default function ObservationsTable({header: "Output Cost",size: 120,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<ObservationsTableRow> }) => {+ cell: ({ row }) => {const value: {inputCost: number | undefined;outputCost: number | undefined;@@ -1255,7 +1255,7 @@ export default function ObservationsTable({defaultHidden: true,enableSorting,},- ],+ ] satisfies LangfuseColumnDef<ObservationsTableRow>[],},];diff --git a/web/src/components/table/use-cases/traces.tsx b/web/src/components/table/use-cases/traces.tsxindex 04efe2700e..3cb78bb9ef 100644--- a/web/src/components/table/use-cases/traces.tsx+++ b/web/src/components/table/use-cases/traces.tsx@@ -18,7 +18,7 @@ import useColumnVisibility from "@/src/features/column-visibility/hooks/useColumimport { api } from "@/src/utils/api";import { formatIntervalSeconds } from "@/src/utils/dates";import { type RouterOutput } from "@/src/utils/types";-import { type Row, type RowSelectionState } from "@tanstack/react-table";+import { type RowSelectionState } from "@tanstack/react-table";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { usePaginationState } from "@/src/hooks/usePaginationState";import type Decimal from "decimal.js";@@ -607,7 +607,7 @@ export default function TracesTable({const columns: LangfuseColumnDef<TracesTableRow>[] = [...(hideControls? []- : [+ : ([selectActionColumn,{accessorKey: "bookmarked",@@ -616,7 +616,7 @@ export default function TracesTable({size: 30,isFixedPosition: true,loadingCell: <TableIconButtonLoadingCell />,- cell: ({ row }: { row: Row<TracesTableRow> }) => {+ cell: ({ row }) => {const bookmarked: TracesTableRow["bookmarked"] =row.getValue("bookmarked");const traceId = row.getValue("id");@@ -633,7 +633,7 @@ export default function TracesTable({},enableSorting,},- ]),+ ] satisfies LangfuseColumnDef<TracesTableRow>[])),{accessorKey: "timestamp",header: "Timestamp",@@ -1135,7 +1135,7 @@ export default function TracesTable({header: "Input Cost",size: 100,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<TracesTableRow> }) => {+ cell: ({ row }) => {const cost: TracesTableRow["cost"] = row.getValue("cost");if (!traceMetrics.data) return <TableTextLoadingCell />;return (@@ -1158,7 +1158,7 @@ export default function TracesTable({header: "Output Cost",size: 100,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<TracesTableRow> }) => {+ cell: ({ row }) => {const cost: TracesTableRow["cost"] = row.getValue("cost");if (!traceMetrics.data) return <TableTextLoadingCell />;return (@@ -1175,7 +1175,7 @@ export default function TracesTable({defaultHidden: true,enableSorting,},- ],+ ] satisfies LangfuseColumnDef<TracesTableRow>[],},{accessorKey: "usage",@@ -1193,7 +1193,7 @@ export default function TracesTable({header: "Input Tokens",size: 110,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<TracesTableRow> }) => {+ cell: ({ row }) => {const value: TracesTableRow["usage"] = row.getValue("usage");if (!traceMetrics.data) return <TableTextLoadingCell />;return <span>{numberFormatter(value.inputUsage, 0)}</span>;@@ -1208,7 +1208,7 @@ export default function TracesTable({header: "Output Tokens",size: 110,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<TracesTableRow> }) => {+ cell: ({ row }) => {const value: TracesTableRow["usage"] = row.getValue("usage");if (!traceMetrics.data) return <TableTextLoadingCell />;return <span>{numberFormatter(value.outputUsage, 0)}</span>;@@ -1223,7 +1223,7 @@ export default function TracesTable({header: "Total Tokens",size: 110,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<TracesTableRow> }) => {+ cell: ({ row }) => {const value: TracesTableRow["usage"] = row.getValue("usage");if (!traceMetrics.data) return <TableTextLoadingCell />;return <span>{numberFormatter(value.totalUsage, 0)}</span>;@@ -1232,17 +1232,17 @@ export default function TracesTable({defaultHidden: true,enableSorting,},- ],+ ] satisfies LangfuseColumnDef<TracesTableRow>[],},...(hideControls? []- : [+ : ([{accessorKey: "action",header: "Action",size: 70,isFixedPosition: true,- cell: ({ row }: { row: Row<TracesTableRow> }) => {+ cell: ({ row }) => {const traceId: TracesTableRow["id"] = row.getValue("id");return (traceId &&@@ -1267,7 +1267,7 @@ export default function TracesTable({);},},- ]),+ ] satisfies LangfuseColumnDef<TracesTableRow>[])),];const [columnVisibility, setColumnVisibility] =diff --git a/web/src/components/trace2/Trace.tsx b/web/src/components/trace2/Trace.tsxindex 30323ea535..9c41ef9b92 100644--- a/web/src/components/trace2/Trace.tsx+++ b/web/src/components/trace2/Trace.tsx@@ -1,5 +1,4 @@import { type TraceDomain } from "@langfuse/shared";-import { type UrlUpdateType } from "use-query-params";import { type ObservationReturnTypeWithMetadata } from "@/src/server/api/routers/traces";import { type ScoreDomain } from "@langfuse/shared";import { type WithStringifiedMetadata } from "@/src/utils/clientSideDomainTypes";@@ -32,14 +31,7 @@ export type TraceProps = {scores: WithStringifiedMetadata<ScoreDomain>[];corrections: ScoreDomain[];projectId: string;- viewType?: "detailed" | "focused";context?: "peek" | "fullscreen";- isValidObservationId?: boolean;- selectedTab?: string;- setSelectedTab?: (- newValue?: string | null,- updateType?: UrlUpdateType,- ) => void;};export function Trace({diff --git a/web/src/components/trace2/TracePage.tsx b/web/src/components/trace2/TracePage.tsxindex 10c5b76241..aee724652b 100644--- a/web/src/components/trace2/TracePage.tsx+++ b/web/src/components/trace2/TracePage.tsx@@ -1,4 +1,3 @@-import { StringParam, useQueryParam, withDefault } from "use-query-params";import { PublishTraceSwitch } from "@/src/components/publish-object-switch";import { DetailPageNav } from "@/src/features/navigate-detail-pages/DetailPageNav";import { useRouter } from "next/router";@@ -73,11 +72,6 @@ export function TracePage({projectIdForAccessCheck,);- const [selectedTab, setSelectedTab] = useQueryParam(- "display",- withDefault(StringParam, "details"),- );-useEffect(() => {if (isBetaEnabled && eventsData.cutoffObservationsAfterMaxCount) {showErrorToast(@@ -235,8 +229,6 @@ export function TracePage({corrections={trace.data.corrections}projectId={trace.data.projectId}observations={trace.data.observations}- selectedTab={selectedTab}- setSelectedTab={setSelectedTab}context={router.query.peek !== undefined ? "peek" : "fullscreen"}/></div>diff --git a/web/src/components/ui/AdvancedJsonViewer/SimpleMultiSectionViewer.tsx b/web/src/components/ui/AdvancedJsonViewer/SimpleMultiSectionViewer.tsxindex d97107ac46..1a8f74ca9f 100644--- a/web/src/components/ui/AdvancedJsonViewer/SimpleMultiSectionViewer.tsx+++ b/web/src/components/ui/AdvancedJsonViewer/SimpleMultiSectionViewer.tsx@@ -56,391 +56,390 @@ export interface SimpleMultiSectionViewerProps {commentedPathsByField?: CommentedPathsByField;}-export const SimpleMultiSectionViewer = memo(- forwardRef<SimpleMultiSectionViewerHandle, SimpleMultiSectionViewerProps>(- function SimpleMultiSectionViewer(- {- tree,- sections,- expansionVersion,- theme,- defaultRenderHeader,- searchQuery,- currentMatchIndex = 0,- matchCounts,- showLineNumbers = true,- enableCopy = false,- stringWrapMode = "wrap",- truncateStringsAt = 100,- onToggleExpansion,- scrollContainerRef,- media,- commentedPathsByField,- },- ref,+const SimpleMultiSectionViewerInner = forwardRef<+ SimpleMultiSectionViewerHandle,+ SimpleMultiSectionViewerProps+>(function SimpleMultiSectionViewer(+ {+ tree,+ sections,+ expansionVersion,+ theme,+ defaultRenderHeader,+ searchQuery,+ currentMatchIndex = 0,+ matchCounts,+ showLineNumbers = true,+ enableCopy = false,+ stringWrapMode = "wrap",+ truncateStringsAt = 100,+ onToggleExpansion,+ scrollContainerRef,+ media,+ commentedPathsByField,+ },+ ref,+) {+ const containerRef = useRef<HTMLDivElement>(null);+ const [containerWidth, setContainerWidth] = useState<number | null>(null);++ // Build sections map for O(1) lookup+ const sectionsMap = useMemo(() => {+ return new Map(sections.map((s) => [s.key, s]));+ }, [sections]);++ // Measure scroll container width for sticky headers+ useLayoutEffect(() => {+ const container = scrollContainerRef?.current;+ if (!container) return;++ const updateWidth = () => {+ const newWidth = container.clientWidth;+ setContainerWidth((prev) => (prev === newWidth ? prev : newWidth));+ };++ updateWidth(); // Initial measurement++ if (+ typeof window !== "undefined" &&+ typeof ResizeObserver !== "undefined") {- const containerRef = useRef<HTMLDivElement>(null);- const [containerWidth, setContainerWidth] = useState<number | null>(null);-- // Build sections map for O(1) lookup- const sectionsMap = useMemo(() => {- return new Map(sections.map((s) => [s.key, s]));- }, [sections]);-- // Measure scroll container width for sticky headers- useLayoutEffect(() => {+ const resizeObserver = new ResizeObserver(updateWidth);+ resizeObserver.observe(container);+ return () => resizeObserver.disconnect();+ }+ }, [scrollContainerRef]);++ // Get all visible nodes+ const allNodes = useMemo(() => {+ if (!tree) return [];+ return getAllVisibleNodes(tree.rootNode);+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [tree, expansionVersion]);++ // Filter out meta-root (depth: -1)+ const visibleNodes = useMemo(() => {+ return allNodes.filter((node) => node.depth >= 0);+ }, [allNodes]);++ // Layout calculations+ const {+ maxLineNumberDigits,+ fixedColumnWidth,+ scrollableMinWidth,+ scrollableMaxWidth,+ } = useJsonViewerLayout({+ tree,+ expansionVersion,+ theme,+ showLineNumbers,+ totalLineCount: tree?.totalNodeCount,+ stringWrapMode,+ truncateStringsAt,+ });++ // Search matches+ const searchMatches = useMemo(() => {+ if (!searchQuery || !tree) return [];+ return searchInTree(tree, searchQuery);+ }, [tree, searchQuery]);++ const { matchMap, currentMatch, currentMatchIndexInRow } = useJsonSearch(+ searchMatches,+ currentMatchIndex,+ );++ // Store refs to row elements for scroll-to-match+ const rowRefs = useRef<Map<string, HTMLDivElement>>(new Map());++ // Scroll to current match when it changes+ useEffect(() => {+ if (!currentMatch) return;+ const element = rowRefs.current.get(currentMatch.rowId);+ if (element) {+ element.scrollIntoView({ block: "center", behavior: "smooth" });+ }+ }, [currentMatch]);++ // Expose scrollToSection method via ref+ useImperativeHandle(+ ref,+ () => ({+ scrollToSection: (sectionKey: string) => {const container = scrollContainerRef?.current;if (!container) return;- const updateWidth = () => {- const newWidth = container.clientWidth;- setContainerWidth((prev) => (prev === newWidth ? prev : newWidth));+ // Find section by data-section-key attribute+ const sectionElement = container.querySelector(+ `[data-section-key="${sectionKey}"]`,+ );+ if (sectionElement) {+ sectionElement.scrollIntoView({+ behavior: "smooth",+ block: "start",+ });+ }+ },+ }),+ [scrollContainerRef],+ );++ // Group nodes by section for rendering+ const sectionGroups = useMemo(() => {+ interface SectionGroup {+ header: (typeof visibleNodes)[0];+ content: typeof visibleNodes;+ spacer: (typeof visibleNodes)[0] | null;+ footer: (typeof visibleNodes)[0] | null;+ }++ const result: SectionGroup[] = [];+ let currentSection: SectionGroup | null = null;++ visibleNodes.forEach((node) => {+ if (node.nodeType === "section-header") {+ currentSection = {+ header: node,+ content: [],+ spacer: null,+ footer: null,};-- updateWidth(); // Initial measurement-- if (- typeof window !== "undefined" &&- typeof ResizeObserver !== "undefined"- ) {- const resizeObserver = new ResizeObserver(updateWidth);- resizeObserver.observe(container);- return () => resizeObserver.disconnect();+ result.push(currentSection);+ } else if (node.nodeType === "section-spacer") {+ if (currentSection) {+ currentSection.spacer = node;}- }, [scrollContainerRef]);-- // Get all visible nodes- const allNodes = useMemo(() => {- if (!tree) return [];- return getAllVisibleNodes(tree.rootNode);- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [tree, expansionVersion]);-- // Filter out meta-root (depth: -1)- const visibleNodes = useMemo(() => {- return allNodes.filter((node) => node.depth >= 0);- }, [allNodes]);-- // Layout calculations- const {- maxLineNumberDigits,- fixedColumnWidth,- scrollableMinWidth,- scrollableMaxWidth,- } = useJsonViewerLayout({- tree,- expansionVersion,- theme,- showLineNumbers,- totalLineCount: tree?.totalNodeCount,- stringWrapMode,- truncateStringsAt,- });-- // Search matches- const searchMatches = useMemo(() => {- if (!searchQuery || !tree) return [];- return searchInTree(tree, searchQuery);- }, [tree, searchQuery]);-- const { matchMap, currentMatch, currentMatchIndexInRow } = useJsonSearch(- searchMatches,- currentMatchIndex,- );-- // Store refs to row elements for scroll-to-match- const rowRefs = useRef<Map<string, HTMLDivElement>>(new Map());-- // Scroll to current match when it changes- useEffect(() => {- if (!currentMatch) return;- const element = rowRefs.current.get(currentMatch.rowId);- if (element) {- element.scrollIntoView({ block: "center", behavior: "smooth" });+ } else if (node.nodeType === "section-footer") {+ if (currentSection) {+ currentSection.footer = node;}- }, [currentMatch]);-- // Expose scrollToSection method via ref- useImperativeHandle(- ref,- () => ({- scrollToSection: (sectionKey: string) => {- const container = scrollContainerRef?.current;- if (!container) return;-- // Find section by data-section-key attribute- const sectionElement = container.querySelector(- `[data-section-key="${sectionKey}"]`,- );- if (sectionElement) {- sectionElement.scrollIntoView({- behavior: "smooth",- block: "start",- });- }- },- }),- [scrollContainerRef],- );-- // Group nodes by section for rendering- const sectionGroups = useMemo(() => {- interface SectionGroup {- header: (typeof visibleNodes)[0];- content: typeof visibleNodes;- spacer: (typeof visibleNodes)[0] | null;- footer: (typeof visibleNodes)[0] | null;+ } else if (node.nodeType === "json") {+ if (currentSection) {+ currentSection.content.push(node);}-- const result: SectionGroup[] = [];- let currentSection: SectionGroup | null = null;-- visibleNodes.forEach((node) => {- if (node.nodeType === "section-header") {- currentSection = {- header: node,- content: [],- spacer: null,- footer: null,- };- result.push(currentSection);- } else if (node.nodeType === "section-spacer") {- if (currentSection) {- currentSection.spacer = node;- }- } else if (node.nodeType === "section-footer") {- if (currentSection) {- currentSection.footer = node;- }- } else if (node.nodeType === "json") {- if (currentSection) {- currentSection.content.push(node);- }+ }+ });++ return result;+ }, [visibleNodes]);++ const renderJsonRow = (node: (typeof visibleNodes)[0], index: number) => {+ const searchMatch = matchMap.get(node.id);+ const isCurrentMatch = currentMatch?.rowId === node.id;+ const row = treeNodeToFlatRow(node, index);+ const matchCount = matchCounts?.get(node.id);++ // Get comment ranges for this row+ const commentRanges = getCommentRangesForRow(+ row,+ node.sectionKey,+ commentedPathsByField,+ );+ const rowJsonPath = pathArrayToJsonPath(row.pathArray);++ return (+ <div+ key={node.id}+ ref={(el) => {+ if (el) {+ rowRefs.current.set(node.id, el);+ } else {+ rowRefs.current.delete(node.id);}- });-- return result;- }, [visibleNodes]);-- const renderJsonRow = (node: (typeof visibleNodes)[0], index: number) => {- const searchMatch = matchMap.get(node.id);- const isCurrentMatch = currentMatch?.rowId === node.id;- const row = treeNodeToFlatRow(node, index);- const matchCount = matchCounts?.get(node.id);-- // Get comment ranges for this row- const commentRanges = getCommentRangesForRow(- row,- node.sectionKey,- commentedPathsByField,- );- const rowJsonPath = pathArrayToJsonPath(row.pathArray);-- return (- <div- key={node.id}- ref={(el) => {- if (el) {- rowRefs.current.set(node.id, el);- } else {- rowRefs.current.delete(node.id);+ }}+ style={{+ display: "grid",+ gridTemplateColumns: `${fixedColumnWidth}px auto`,+ width: stringWrapMode === "nowrap" ? undefined : "100%",+ backgroundColor: node.backgroundColor || theme.background,+ }}+ >+ {/* Fixed column */}+ <div+ style={{+ position: "sticky",+ left: 0,+ zIndex: 1,+ width: `${fixedColumnWidth}px`,+ backgroundColor: node.backgroundColor || theme.background,+ }}+ >+ <JsonRowFixed+ row={row}+ theme={theme}+ showLineNumber={showLineNumbers}+ lineNumber={node.sectionLineNumber ?? index + 1}+ maxLineNumberDigits={maxLineNumberDigits}+ searchMatch={searchMatch}+ isCurrentMatch={isCurrentMatch}+ matchCount={matchCount}+ currentMatchIndexInRow={+ isCurrentMatch ? currentMatchIndexInRow : undefined+ }+ onToggleExpansion={onToggleExpansion}+ stringWrapMode={stringWrapMode}+ />+ </div>++ {/* Scrollable column */}+ <div+ style={{+ width: "fit-content",+ minWidth: scrollableMinWidth ? `${scrollableMinWidth}px` : 0,+ maxWidth: scrollableMaxWidth+ ? `${scrollableMaxWidth}px`+ : undefined,+ overflow: stringWrapMode === "nowrap" ? undefined : "hidden",+ }}+ >+ <JsonRowScrollable+ row={row}+ theme={theme}+ searchMatch={searchMatch}+ isCurrentMatch={isCurrentMatch}+ enableCopy={enableCopy}+ stringWrapMode={stringWrapMode}+ truncateStringsAt={truncateStringsAt}+ jsonPath={rowJsonPath}+ commentRanges={commentRanges}+ sectionKey={node.sectionKey}+ />+ </div>+ </div>+ );+ };++ return (+ <div+ ref={containerRef}+ style={{+ width: stringWrapMode === "wrap" ? "100%" : "fit-content",+ minWidth: "100%",+ backgroundColor: theme.background,+ color: theme.foreground,+ fontFamily: "monospace",+ }}+ >+ <div style={{ position: "relative" }}>+ {sectionGroups.map((sectionGroup) => {+ // Look up JsonSection for render functions+ const sectionKey = sectionGroup.header.sectionKey;+ const jsonSection = sectionKey ? sectionsMap.get(sectionKey) : null;++ // Get section context (using hook requires component wrapper)+ const sectionContext = {+ sectionKey: sectionKey || "",+ rowCount:+ sectionGroup.header.totalDescendantCount ??+ sectionGroup.content.length,+ isExpanded: sectionGroup.header.isExpanded,+ setExpanded: (_expanded: boolean) => {+ if (onToggleExpansion) {+ onToggleExpansion(sectionGroup.header.id);}- }}- style={{- display: "grid",- gridTemplateColumns: `${fixedColumnWidth}px auto`,- width: stringWrapMode === "nowrap" ? undefined : "100%",- backgroundColor: node.backgroundColor || theme.background,- }}- >- {/* Fixed column */}- <div- style={{- position: "sticky",- left: 0,- zIndex: 1,- width: `${fixedColumnWidth}px`,- backgroundColor: node.backgroundColor || theme.background,- }}- >- <JsonRowFixed- row={row}- theme={theme}- showLineNumber={showLineNumbers}- lineNumber={node.sectionLineNumber ?? index + 1}- maxLineNumberDigits={maxLineNumberDigits}- searchMatch={searchMatch}- isCurrentMatch={isCurrentMatch}- matchCount={matchCount}- currentMatchIndexInRow={- isCurrentMatch ? currentMatchIndexInRow : undefined- }- onToggleExpansion={onToggleExpansion}- stringWrapMode={stringWrapMode}+ },+ };++ // Derive title from section config or capitalize key+ const title =+ jsonSection?.title ||+ (sectionKey+ ? sectionKey.charAt(0).toUpperCase() + sectionKey.slice(1)+ : "");++ // Filter media for this section+ const sectionMedia = media?.filter((m) => m.field === sectionKey);++ // Get comment count for this section+ const sectionCommentCount = getCommentCountForSection(+ sectionKey,+ commentedPathsByField,+ );++ // Render header with fallback chain+ let headerContent;+ if (jsonSection?.renderHeader) {+ headerContent = jsonSection.renderHeader(sectionContext);+ } else if (defaultRenderHeader) {+ headerContent = defaultRenderHeader({+ ...sectionContext,+ title,+ });+ } else {+ headerContent = (+ <MultiSectionJsonViewerHeader+ title={title}+ context={sectionContext}+ media={sectionMedia}+ commentCount={sectionCommentCount}/>- </div>+ );+ }- {/* Scrollable column */}+ return (<div+ key={sectionGroup.header.id}+ data-section-key={sectionKey}style={{- width: "fit-content",- minWidth: scrollableMinWidth ? `${scrollableMinWidth}px` : 0,- maxWidth: scrollableMaxWidth- ? `${scrollableMaxWidth}px`- : undefined,- overflow: stringWrapMode === "nowrap" ? undefined : "hidden",+ width: stringWrapMode === "wrap" ? "100%" : "fit-content",+ backgroundColor:+ sectionGroup.header.backgroundColor || theme.background,}}>- <JsonRowScrollable- row={row}- theme={theme}- searchMatch={searchMatch}- isCurrentMatch={isCurrentMatch}- enableCopy={enableCopy}- stringWrapMode={stringWrapMode}- truncateStringsAt={truncateStringsAt}- jsonPath={rowJsonPath}- commentRanges={commentRanges}- sectionKey={node.sectionKey}- />- </div>- </div>- );- };-- return (- <div- ref={containerRef}- style={{- width: stringWrapMode === "wrap" ? "100%" : "fit-content",- minWidth: "100%",- backgroundColor: theme.background,- color: theme.foreground,- fontFamily: "monospace",- }}- >- <div style={{ position: "relative" }}>- {sectionGroups.map((sectionGroup) => {- // Look up JsonSection for render functions- const sectionKey = sectionGroup.header.sectionKey;- const jsonSection = sectionKey- ? sectionsMap.get(sectionKey)- : null;-- // Get section context (using hook requires component wrapper)- const sectionContext = {- sectionKey: sectionKey || "",- rowCount:- sectionGroup.header.totalDescendantCount ??- sectionGroup.content.length,- isExpanded: sectionGroup.header.isExpanded,- setExpanded: (_expanded: boolean) => {- if (onToggleExpansion) {- onToggleExpansion(sectionGroup.header.id);- }- },- };-- // Derive title from section config or capitalize key- const title =- jsonSection?.title ||- (sectionKey- ? sectionKey.charAt(0).toUpperCase() + sectionKey.slice(1)- : "");-- // Filter media for this section- const sectionMedia = media?.filter((m) => m.field === sectionKey);-- // Get comment count for this section- const sectionCommentCount = getCommentCountForSection(- sectionKey,- commentedPathsByField,- );-- // Render header with fallback chain- let headerContent;- if (jsonSection?.renderHeader) {- headerContent = jsonSection.renderHeader(sectionContext);- } else if (defaultRenderHeader) {- headerContent = defaultRenderHeader({- ...sectionContext,- title,- });- } else {- headerContent = (- <MultiSectionJsonViewerHeader- title={title}- context={sectionContext}- media={sectionMedia}- commentCount={sectionCommentCount}- />- );- }+ {/* Render section header */}+ <div+ style={{+ position: "sticky",+ top: 0,+ left: 0,+ width: containerWidth ? `${containerWidth}px` : "100%",+ zIndex: 10,+ backgroundColor:+ sectionGroup.header.backgroundColor || theme.background,+ borderBottom: "1px solid",+ borderColor: theme.punctuationColor || "#e5e7eb",+ }}+ >+ {headerContent}+ </div>++ {/* Render section content */}+ <div+ style={{+ width: stringWrapMode === "wrap" ? "100%" : "max-content",+ }}+ >+ {sectionGroup.content.map((node, index) =>+ renderJsonRow(node, index),+ )}+ </div>++ {/* Render spacer if exists */}+ {sectionGroup.spacer && (+ <div+ style={{+ height: `${sectionGroup.spacer.spacerHeight}px`,+ }}+ />+ )}- return (+ {/* Render section footer if exists */}+ {jsonSection?.renderFooter && sectionContext.isExpanded && (<div- key={sectionGroup.header.id}- data-section-key={sectionKey}style={{- width: stringWrapMode === "wrap" ? "100%" : "fit-content",- backgroundColor:- sectionGroup.header.backgroundColor || theme.background,+ width: containerWidth ? `${containerWidth}px` : "100%",+ paddingBottom: "0.5rem",}}>- {/* Render section header */}- <div- style={{- position: "sticky",- top: 0,- left: 0,- width: containerWidth ? `${containerWidth}px` : "100%",- zIndex: 10,- backgroundColor:- sectionGroup.header.backgroundColor || theme.background,- borderBottom: "1px solid",- borderColor: theme.punctuationColor || "#e5e7eb",- }}- >- {headerContent}- </div>-- {/* Render section content */}- <div- style={{- width: stringWrapMode === "wrap" ? "100%" : "max-content",- }}- >- {sectionGroup.content.map((node, index) =>- renderJsonRow(node, index),- )}- </div>-- {/* Render spacer if exists */}- {sectionGroup.spacer && (- <div- style={{- height: `${sectionGroup.spacer.spacerHeight}px`,- }}- />- )}-- {/* Render section footer if exists */}- {jsonSection?.renderFooter && sectionContext.isExpanded && (- <div- style={{- width: containerWidth ? `${containerWidth}px` : "100%",- paddingBottom: "0.5rem",- }}- >- {jsonSection.renderFooter(sectionContext)}- </div>- )}+ {jsonSection.renderFooter(sectionContext)}</div>- );- })}- </div>- </div>- );- },- ),-);+ )}+ </div>+ );+ })}+ </div>+ </div>+ );+});++export const SimpleMultiSectionViewer = memo(SimpleMultiSectionViewerInner);diff --git a/web/src/components/ui/AdvancedJsonViewer/VirtualizedMultiSectionViewer.tsx b/web/src/components/ui/AdvancedJsonViewer/VirtualizedMultiSectionViewer.tsxindex c71585f31c..6adbb43edb 100644--- a/web/src/components/ui/AdvancedJsonViewer/VirtualizedMultiSectionViewer.tsx+++ b/web/src/components/ui/AdvancedJsonViewer/VirtualizedMultiSectionViewer.tsx@@ -63,379 +63,345 @@ export interface VirtualizedMultiSectionViewerProps {commentedPathsByField?: CommentedPathsByField;}-export const VirtualizedMultiSectionViewer = memo(- forwardRef<- VirtualizedMultiSectionViewerHandle,- VirtualizedMultiSectionViewerProps- >(function VirtualizedMultiSectionViewer(- {- tree,- sections,- expansionVersion,- theme,- defaultRenderHeader,- searchQuery,- currentMatchIndex = 0,- matchCounts,- showLineNumbers = true,- enableCopy = false,- stringWrapMode = "wrap",- truncateStringsAt = 100,- onToggleExpansion,- scrollContainerRef,- media,- commentedPathsByField,- },- ref,- ) {- const parentRef = useRef<HTMLDivElement>(null);- const [containerWidth, setContainerWidth] = useState<number | null>(null);-- // Measure actual monospace character width for accurate height estimation- const charWidth = useMonospaceCharWidth();-- // Build sections map for O(1) lookup- const sectionsMap = useMemo(() => {- return new Map(sections.map((s) => [s.key, s]));- }, [sections]);-- // Measure scroll container width for sticky headers- useLayoutEffect(() => {- const container = scrollContainerRef?.current;- if (!container) {- return;- }-- const updateWidth = () => {- const width = container.clientWidth;- setContainerWidth(width);+const VirtualizedMultiSectionViewerInner = forwardRef<+ VirtualizedMultiSectionViewerHandle,+ VirtualizedMultiSectionViewerProps+>(function VirtualizedMultiSectionViewer(+ {+ tree,+ sections,+ expansionVersion,+ theme,+ defaultRenderHeader,+ searchQuery,+ currentMatchIndex = 0,+ matchCounts,+ showLineNumbers = true,+ enableCopy = false,+ stringWrapMode = "wrap",+ truncateStringsAt = 100,+ onToggleExpansion,+ scrollContainerRef,+ media,+ commentedPathsByField,+ },+ ref,+) {+ const parentRef = useRef<HTMLDivElement>(null);+ const [containerWidth, setContainerWidth] = useState<number | null>(null);++ // Measure actual monospace character width for accurate height estimation+ const charWidth = useMonospaceCharWidth();++ // Build sections map for O(1) lookup+ const sectionsMap = useMemo(() => {+ return new Map(sections.map((s) => [s.key, s]));+ }, [sections]);++ // Measure scroll container width for sticky headers+ useLayoutEffect(() => {+ const container = scrollContainerRef?.current;+ if (!container) {+ return;+ }++ const updateWidth = () => {+ const width = container.clientWidth;+ setContainerWidth(width);+ };++ updateWidth(); // Initial measurement++ if (+ typeof window !== "undefined" &&+ typeof ResizeObserver !== "undefined"+ ) {+ const resizeObserver = new ResizeObserver(updateWidth);+ resizeObserver.observe(container);+ return () => {+ resizeObserver.disconnect();};+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [scrollContainerRef?.current]);++ // Row count (includes meta-root, but we skip it in rendering)+ const rowCount = tree ? 1 + tree.rootNode.visibleDescendantCount : 0;++ // Layout calculations+ const {+ maxLineNumberDigits,+ fixedColumnWidth,+ scrollableMinWidth,+ scrollableMaxWidth,+ estimateSize,+ } = useJsonViewerLayout({+ tree,+ expansionVersion,+ theme,+ showLineNumbers,+ totalLineCount: tree?.totalNodeCount,+ stringWrapMode,+ truncateStringsAt,+ charWidth,+ });++ // Calculate total content width (stable, memoized)+ const totalContentWidth = useMemo(() => {+ if (!tree) return undefined;++ if (stringWrapMode === "nowrap") {+ return fixedColumnWidth + tree.maxContentWidth;+ }++ if (scrollableMaxWidth) {+ return fixedColumnWidth + scrollableMaxWidth;+ }++ return undefined;+ }, [tree, fixedColumnWidth, stringWrapMode, scrollableMaxWidth]);++ // Calculate effective row width (takes max of content width and container width)+ const effectiveRowWidth = useMemo(() => {+ if (!totalContentWidth && !containerWidth) return undefined;+ if (!totalContentWidth) return containerWidth;+ if (!containerWidth) return totalContentWidth;+ return Math.max(totalContentWidth, containerWidth);+ }, [totalContentWidth, containerWidth]);++ // Search matches+ const searchMatches = useMemo(() => {+ if (!searchQuery || !tree) return [];+ return searchInTree(tree, searchQuery);+ }, [tree, searchQuery]);++ const { matchMap, currentMatch, currentMatchIndexInRow } = useJsonSearch(+ searchMatches,+ currentMatchIndex,+ );++ // Virtualizer with custom estimateSize for different node types+ const rowVirtualizer = useVirtualizer({+ count: rowCount,+ getScrollElement: () => scrollContainerRef?.current || parentRef.current,+ estimateSize: (index) => {+ if (!tree) return 16;+ const node = getNodeByIndex(tree.rootNode, index);++ if (!node) return 16;++ // Meta-root should have 0 height (it's never rendered)+ if (node.nodeType === "meta") return 0;++ // Custom heights for different node types+ if (node.nodeType === "section-header") return 32;+ if (node.nodeType === "section-footer") return 40;+ if (node.nodeType === "section-spacer") return node.spacerHeight || 0;++ // Regular JSON rows+ return estimateSize(index);+ },+ overscan: 100,+ measureElement:+ typeof window !== "undefined"+ ? (element) => element.getBoundingClientRect().height+ : undefined,+ getItemKey: (index) => {+ if (!tree) return index;+ const node = getNodeByIndex(tree.rootNode, index);+ return node ? node.id : index;+ },+ });- updateWidth(); // Initial measurement-- if (- typeof window !== "undefined" &&- typeof ResizeObserver !== "undefined"- ) {- const resizeObserver = new ResizeObserver(updateWidth);- resizeObserver.observe(container);- return () => {- resizeObserver.disconnect();- };- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [scrollContainerRef?.current]);-- // Row count (includes meta-root, but we skip it in rendering)- const rowCount = tree ? 1 + tree.rootNode.visibleDescendantCount : 0;-- // Layout calculations- const {- maxLineNumberDigits,- fixedColumnWidth,- scrollableMinWidth,- scrollableMaxWidth,- estimateSize,- } = useJsonViewerLayout({- tree,- expansionVersion,- theme,- showLineNumbers,- totalLineCount: tree?.totalNodeCount,- stringWrapMode,- truncateStringsAt,- charWidth,- });-- // Calculate total content width (stable, memoized)- const totalContentWidth = useMemo(() => {- if (!tree) return undefined;-- if (stringWrapMode === "nowrap") {- return fixedColumnWidth + tree.maxContentWidth;- }-- if (scrollableMaxWidth) {- return fixedColumnWidth + scrollableMaxWidth;- }-- return undefined;- }, [tree, fixedColumnWidth, stringWrapMode, scrollableMaxWidth]);-- // Calculate effective row width (takes max of content width and container width)- const effectiveRowWidth = useMemo(() => {- if (!totalContentWidth && !containerWidth) return undefined;- if (!totalContentWidth) return containerWidth;- if (!containerWidth) return totalContentWidth;- return Math.max(totalContentWidth, containerWidth);- }, [totalContentWidth, containerWidth]);-- // Search matches- const searchMatches = useMemo(() => {- if (!searchQuery || !tree) return [];- return searchInTree(tree, searchQuery);- }, [tree, searchQuery]);-- const { matchMap, currentMatch, currentMatchIndexInRow } = useJsonSearch(- searchMatches,- currentMatchIndex,- );-- // Virtualizer with custom estimateSize for different node types- const rowVirtualizer = useVirtualizer({- count: rowCount,- getScrollElement: () => scrollContainerRef?.current || parentRef.current,- estimateSize: (index) => {- if (!tree) return 16;- const node = getNodeByIndex(tree.rootNode, index);-- if (!node) return 16;-- // Meta-root should have 0 height (it's never rendered)- if (node.nodeType === "meta") return 0;-- // Custom heights for different node types- if (node.nodeType === "section-header") return 32;- if (node.nodeType === "section-footer") return 40;- if (node.nodeType === "section-spacer") return node.spacerHeight || 0;-- // Regular JSON rows- return estimateSize(index);- },- overscan: 100,- measureElement:- typeof window !== "undefined"- ? (element) => element.getBoundingClientRect().height- : undefined,- getItemKey: (index) => {- if (!tree) return index;- const node = getNodeByIndex(tree.rootNode, index);- return node ? node.id : index;- },- });-- // Scroll to current search match- useEffect(() => {- if (!currentMatch || !tree) return;-- const index = findNodeIndex(tree.rootNode, currentMatch.rowId);-- if (index !== -1) {- rowVirtualizer.scrollToIndex(index, { align: "center" });- }- }, [currentMatch, tree, rowVirtualizer]);-- // Expose scrollToSection method via ref- useImperativeHandle(- ref,- () => ({- scrollToSection: (sectionKey: string) => {- if (!tree) return;-- const index = findSectionHeaderIndex(tree.rootNode, sectionKey);+ // Scroll to current search match+ useEffect(() => {+ if (!currentMatch || !tree) return;- if (index !== -1) {- rowVirtualizer.scrollToIndex(index, {- align: "start",- behavior: "auto",- });- }- },- }),- [tree, rowVirtualizer],- );+ const index = findNodeIndex(tree.rootNode, currentMatch.rowId);- const virtualItems = rowVirtualizer.getVirtualItems();+ if (index !== -1) {+ rowVirtualizer.scrollToIndex(index, { align: "center" });+ }+ }, [currentMatch, tree, rowVirtualizer]);- return (+ // Expose scrollToSection method via ref+ useImperativeHandle(+ ref,+ () => ({+ scrollToSection: (sectionKey: string) => {+ if (!tree) return;++ const index = findSectionHeaderIndex(tree.rootNode, sectionKey);++ if (index !== -1) {+ rowVirtualizer.scrollToIndex(index, {+ align: "start",+ behavior: "auto",+ });+ }+ },+ }),+ [tree, rowVirtualizer],+ );++ const virtualItems = rowVirtualizer.getVirtualItems();++ return (+ <div+ ref={parentRef}+ id="virtualized-multi-section-parent"+ style={{+ height: "100%",+ width: stringWrapMode === "nowrap" ? "fit-content" : "100%",+ minWidth: "100%",+ backgroundColor: theme.background,+ }}+ ><div- ref={parentRef}- id="virtualized-multi-section-parent"+ id="virtualized-multi-section-content"style={{- height: "100%",- width: stringWrapMode === "nowrap" ? "fit-content" : "100%",- minWidth: "100%",- backgroundColor: theme.background,+ height: `${rowVirtualizer.getTotalSize()}px`,+ minWidth: totalContentWidth ? `${totalContentWidth}px` : "100%",+ width: "max-content",+ position: "relative",}}>- <div- id="virtualized-multi-section-content"- style={{- height: `${rowVirtualizer.getTotalSize()}px`,- minWidth: totalContentWidth ? `${totalContentWidth}px` : "100%",- width: "max-content",- position: "relative",- }}- >- {virtualItems.map((virtualRow) => {- const node = getNodeByIndex(tree.rootNode, virtualRow.index);-- if (!node) return null;-- // Skip meta-root (depth: -1)- if (node.depth < 0) return null;-- const searchMatch = matchMap.get(node.id);- const isCurrentMatch = currentMatch?.rowId === node.id;-- // Render based on node type- if (node.nodeType === "section-header") {- const jsonSection = node.sectionKey- ? sectionsMap.get(node.sectionKey)- : null;- const sectionContext = {- sectionKey: node.sectionKey || "",- rowCount:- node.totalDescendantCount ?? node.visibleDescendantCount,- isExpanded: node.isExpanded,- setExpanded: (_expanded: boolean) => {- if (onToggleExpansion) {- onToggleExpansion(node.id);- }- },- };-- // Derive title from section config or capitalize key- const title =- jsonSection?.title ||- (node.sectionKey- ? node.sectionKey.charAt(0).toUpperCase() +- node.sectionKey.slice(1)- : "");-- // Filter media for this section- const sectionMedia = media?.filter(- (m) => m.field === node.sectionKey,- );+ {virtualItems.map((virtualRow) => {+ const node = getNodeByIndex(tree.rootNode, virtualRow.index);++ if (!node) return null;++ // Skip meta-root (depth: -1)+ if (node.depth < 0) return null;++ const searchMatch = matchMap.get(node.id);+ const isCurrentMatch = currentMatch?.rowId === node.id;++ // Render based on node type+ if (node.nodeType === "section-header") {+ const jsonSection = node.sectionKey+ ? sectionsMap.get(node.sectionKey)+ : null;+ const sectionContext = {+ sectionKey: node.sectionKey || "",+ rowCount:+ node.totalDescendantCount ?? node.visibleDescendantCount,+ isExpanded: node.isExpanded,+ setExpanded: (_expanded: boolean) => {+ if (onToggleExpansion) {+ onToggleExpansion(node.id);+ }+ },+ };++ // Derive title from section config or capitalize key+ const title =+ jsonSection?.title ||+ (node.sectionKey+ ? node.sectionKey.charAt(0).toUpperCase() ++ node.sectionKey.slice(1)+ : "");++ // Filter media for this section+ const sectionMedia = media?.filter(+ (m) => m.field === node.sectionKey,+ );- // Get comment count for this section- const sectionCommentCount = getCommentCountForSection(- node.sectionKey,- commentedPathsByField,- );+ // Get comment count for this section+ const sectionCommentCount = getCommentCountForSection(+ node.sectionKey,+ commentedPathsByField,+ );- // Render header with fallback chain- let headerContent;- if (jsonSection?.renderHeader) {- headerContent = jsonSection.renderHeader(sectionContext);- } else if (defaultRenderHeader) {- headerContent = defaultRenderHeader({- ...sectionContext,- title,- });- } else {- headerContent = (- <MultiSectionJsonViewerHeader- title={title}- context={sectionContext}- media={sectionMedia}- commentCount={sectionCommentCount}- />- );- }-- return (- <div- key={virtualRow.key}- data-index={virtualRow.index}- data-section-key={node.sectionKey}- ref={rowVirtualizer.measureElement}- style={{- position: "absolute",- top: 0,- left: 0,- minWidth: effectiveRowWidth- ? `${effectiveRowWidth}px`- : "100%",- width: "max-content",- transform: `translateY(${virtualRow.start}px)`,- }}- >- <div- style={{- position: "sticky",- left: 0,- width: containerWidth ? `${containerWidth}px` : "100%",- zIndex: 2,- backgroundColor: node.backgroundColor || theme.background,- borderBottom: "1px solid",- borderColor: theme.punctuationColor || "#e5e7eb",- }}- >- {headerContent}- </div>- </div>+ // Render header with fallback chain+ let headerContent;+ if (jsonSection?.renderHeader) {+ headerContent = jsonSection.renderHeader(sectionContext);+ } else if (defaultRenderHeader) {+ headerContent = defaultRenderHeader({+ ...sectionContext,+ title,+ });+ } else {+ headerContent = (+ <MultiSectionJsonViewerHeader+ title={title}+ context={sectionContext}+ media={sectionMedia}+ commentCount={sectionCommentCount}+ />);}- if (node.nodeType === "section-footer") {- // Skip footer if section is collapsed- if (!node.isExpanded) return null;-- const jsonSection = node.sectionKey- ? sectionsMap.get(node.sectionKey)- : null;- const sectionContext = {- sectionKey: node.sectionKey || "",- rowCount: 0, // Footer doesn't track row count- isExpanded: true, // Footers are always shown- setExpanded: () => {}, // No-op- };-- return (+ return (+ <div+ key={virtualRow.key}+ data-index={virtualRow.index}+ data-section-key={node.sectionKey}+ ref={rowVirtualizer.measureElement}+ style={{+ position: "absolute",+ top: 0,+ left: 0,+ minWidth: effectiveRowWidth+ ? `${effectiveRowWidth}px`+ : "100%",+ width: "max-content",+ transform: `translateY(${virtualRow.start}px)`,+ }}+ ><div- key={virtualRow.key}- data-index={virtualRow.index}- ref={rowVirtualizer.measureElement}style={{- position: "absolute",- top: 0,+ position: "sticky",left: 0,width: containerWidth ? `${containerWidth}px` : "100%",- transform: `translateY(${virtualRow.start}px)`,+ zIndex: 2,backgroundColor: node.backgroundColor || theme.background,- paddingBottom: "0.5rem",+ borderBottom: "1px solid",+ borderColor: theme.punctuationColor || "#e5e7eb",}}>- {jsonSection?.renderFooter?.(sectionContext)}+ {headerContent}</div>- );- }+ </div>+ );+ }- if (node.nodeType === "section-spacer") {- return (- <div- key={virtualRow.key}- data-index={virtualRow.index}- ref={rowVirtualizer.measureElement}- style={{- position: "absolute",- top: 0,- left: 0,- minWidth: effectiveRowWidth- ? `${effectiveRowWidth}px`- : "100%",- width: "max-content",- transform: `translateY(${virtualRow.start}px)`,- height: `${node.spacerHeight}px`,- backgroundColor: node.backgroundColor || theme.background,- }}- />- );- }+ if (node.nodeType === "section-footer") {+ // Skip footer if section is collapsed+ if (!node.isExpanded) return null;- // Regular JSON row- const row = treeNodeToFlatRow(node, virtualRow.index);- const matchCount = matchCounts?.get(row.id);+ const jsonSection = node.sectionKey+ ? sectionsMap.get(node.sectionKey)+ : null;+ const sectionContext = {+ sectionKey: node.sectionKey || "",+ rowCount: 0, // Footer doesn't track row count+ isExpanded: true, // Footers are always shown+ setExpanded: () => {}, // No-op+ };- // Get comment ranges for this row- const commentRanges = getCommentRangesForRow(- row,- node.sectionKey,- commentedPathsByField,+ return (+ <div+ key={virtualRow.key}+ data-index={virtualRow.index}+ ref={rowVirtualizer.measureElement}+ style={{+ position: "absolute",+ top: 0,+ left: 0,+ width: containerWidth ? `${containerWidth}px` : "100%",+ transform: `translateY(${virtualRow.start}px)`,+ backgroundColor: node.backgroundColor || theme.background,+ paddingBottom: "0.5rem",+ }}+ >+ {jsonSection?.renderFooter?.(sectionContext)}+ </div>);- const rowJsonPath = pathArrayToJsonPath(row.pathArray);+ }+ if (node.nodeType === "section-spacer") {return (<divkey={virtualRow.key}@@ -450,70 +416,101 @@ export const VirtualizedMultiSectionViewer = memo(: "100%",width: "max-content",transform: `translateY(${virtualRow.start}px)`,- display: "grid",- gridTemplateColumns: `${fixedColumnWidth}px auto`,+ height: `${node.spacerHeight}px`,+ backgroundColor: node.backgroundColor || theme.background,+ }}+ />+ );+ }++ // Regular JSON row+ const row = treeNodeToFlatRow(node, virtualRow.index);+ const matchCount = matchCounts?.get(row.id);++ // Get comment ranges for this row+ const commentRanges = getCommentRangesForRow(+ row,+ node.sectionKey,+ commentedPathsByField,+ );+ const rowJsonPath = pathArrayToJsonPath(row.pathArray);++ return (+ <div+ key={virtualRow.key}+ data-index={virtualRow.index}+ ref={rowVirtualizer.measureElement}+ style={{+ position: "absolute",+ top: 0,+ left: 0,+ minWidth: effectiveRowWidth ? `${effectiveRowWidth}px` : "100%",+ width: "max-content",+ transform: `translateY(${virtualRow.start}px)`,+ display: "grid",+ gridTemplateColumns: `${fixedColumnWidth}px auto`,+ backgroundColor: node.backgroundColor || theme.background,+ }}+ >+ {/* Fixed column (line numbers + expand buttons) */}+ <div+ style={{+ position: "sticky",+ left: 0,+ zIndex: 1,+ width: `${fixedColumnWidth}px`,backgroundColor: node.backgroundColor || theme.background,}}>- {/* Fixed column (line numbers + expand buttons) */}- <div- style={{- position: "sticky",- left: 0,- zIndex: 1,- width: `${fixedColumnWidth}px`,- backgroundColor: node.backgroundColor || theme.background,- }}- >- <JsonRowFixed- row={row}- theme={theme}- showLineNumber={showLineNumbers}- lineNumber={node.sectionLineNumber ?? virtualRow.index + 1}- maxLineNumberDigits={maxLineNumberDigits}- searchMatch={searchMatch}- isCurrentMatch={isCurrentMatch}- matchCount={matchCount}- currentMatchIndexInRow={- isCurrentMatch ? currentMatchIndexInRow : undefined- }- onToggleExpansion={onToggleExpansion}- stringWrapMode={stringWrapMode}- />- </div>+ <JsonRowFixed+ row={row}+ theme={theme}+ showLineNumber={showLineNumbers}+ lineNumber={node.sectionLineNumber ?? virtualRow.index + 1}+ maxLineNumberDigits={maxLineNumberDigits}+ searchMatch={searchMatch}+ isCurrentMatch={isCurrentMatch}+ matchCount={matchCount}+ currentMatchIndexInRow={+ isCurrentMatch ? currentMatchIndexInRow : undefined+ }+ onToggleExpansion={onToggleExpansion}+ stringWrapMode={stringWrapMode}+ />+ </div>- {/* Scrollable column (JSON content) */}- <div- style={{- width: "fit-content",- minWidth: scrollableMinWidth- ? `${scrollableMinWidth}px`- : 0,- maxWidth: scrollableMaxWidth- ? `${scrollableMaxWidth}px`- : undefined,- overflow:- stringWrapMode === "nowrap" ? undefined : "hidden",- }}- >- <JsonRowScrollable- row={row}- theme={theme}- searchMatch={searchMatch}- isCurrentMatch={isCurrentMatch}- enableCopy={enableCopy}- stringWrapMode={stringWrapMode}- truncateStringsAt={truncateStringsAt}- jsonPath={rowJsonPath}- commentRanges={commentRanges}- sectionKey={node.sectionKey}- />- </div>+ {/* Scrollable column (JSON content) */}+ <div+ style={{+ width: "fit-content",+ minWidth: scrollableMinWidth ? `${scrollableMinWidth}px` : 0,+ maxWidth: scrollableMaxWidth+ ? `${scrollableMaxWidth}px`+ : undefined,+ overflow: stringWrapMode === "nowrap" ? undefined : "hidden",+ }}+ >+ <JsonRowScrollable+ row={row}+ theme={theme}+ searchMatch={searchMatch}+ isCurrentMatch={isCurrentMatch}+ enableCopy={enableCopy}+ stringWrapMode={stringWrapMode}+ truncateStringsAt={truncateStringsAt}+ jsonPath={rowJsonPath}+ commentRanges={commentRanges}+ sectionKey={node.sectionKey}+ /></div>- );- })}- </div>+ </div>+ );+ })}</div>- );- }),+ </div>+ );+});++export const VirtualizedMultiSectionViewer = memo(+ VirtualizedMultiSectionViewerInner,);diff --git a/web/src/features/annotation-queues/components/processors/TraceAnnotationProcessor.tsx b/web/src/features/annotation-queues/components/processors/TraceAnnotationProcessor.tsxindex 06658373e1..b31959945f 100644--- a/web/src/features/annotation-queues/components/processors/TraceAnnotationProcessor.tsx+++ b/web/src/features/annotation-queues/components/processors/TraceAnnotationProcessor.tsx@@ -32,10 +32,7 @@ export const TraceAnnotationProcessor: React.FC<> = ({ item, data, view, configs, projectId }) => {const traceId = item.parentTraceId ?? item.objectId;- const [currentObservationId, setCurrentObservationId] = useQueryParam(- "observation",- StringParam,- );+ const [, setCurrentObservationId] = useQueryParam("observation", StringParam);const isAuthenticatedAndProjectMember =useIsAuthenticatedAndProjectMember(projectId);@@ -91,17 +88,6 @@ export const TraceAnnotationProcessor: React.FC<if (!data) return <div className="p-3">Loading...</div>;- let isValidObservationId = false;-- if (- currentObservationId &&- data.observations.some(- ({ id }: { id: string }) => id === currentObservationId,- )- ) {- isValidObservationId = true;- }-const leftPanel =view === "hideTree" ? (<JsonExpansionProvider>@@ -143,8 +129,6 @@ export const TraceAnnotationProcessor: React.FC<corrections={data.corrections}projectId={data.projectId}observations={data.observations}- viewType="focused"- isValidObservationId={isValidObservationId}/></div>);diff --git a/web/src/features/batch-actions/components/AddObservationsToDatasetDialog/index.tsx b/web/src/features/batch-actions/components/AddObservationsToDatasetDialog/index.tsxindex 8708312a33..9ee5eefd49 100644--- a/web/src/features/batch-actions/components/AddObservationsToDatasetDialog/index.tsx+++ b/web/src/features/batch-actions/components/AddObservationsToDatasetDialog/index.tsx@@ -9,7 +9,6 @@ import {DialogFooter,} from "@/src/components/ui/dialog";import { ChevronLeft } from "lucide-react";-import type { BatchActionQuery } from "@langfuse/shared";// Step componentsimport { DatasetChoiceStep } from "./DatasetChoiceStep";@@ -20,21 +19,15 @@ import { FinalPreviewStep } from "./FinalPreviewStep";import { StatusStep } from "./StatusStep";// Hook-import { useAddToDatasetWizard } from "./useAddToDatasetWizard";+import {+ useAddToDatasetWizard,+ type UseAddToDatasetWizardProps,+} from "./useAddToDatasetWizard";type AddObservationsToDatasetDialogProps = {projectId: string;- selectedObservationIds: string[];- query: BatchActionQuery;- selectAll: boolean;- totalCount: number;onClose: () => void;- exampleObservation: {- id: string;- traceId: string;- startTime?: Date;- };-};+} & UseAddToDatasetWizardProps;export function AddObservationsToDatasetDialog(props: AddObservationsToDatasetDialogProps,diff --git a/web/src/features/datasets/components/DatasetAnalytics.tsx b/web/src/features/datasets/components/DatasetAnalytics.tsxindex b41edef295..bb2e46c922 100644--- a/web/src/features/datasets/components/DatasetAnalytics.tsx+++ b/web/src/features/datasets/components/DatasetAnalytics.tsx@@ -4,7 +4,6 @@ import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePosimport { MultiSelectKeyValues } from "@/src/features/scores/components/multi-select-key-values";export function DatasetAnalytics(props: {- projectId: string;scoreOptions: { key: string; value: string }[];selectedMetrics: string[];setSelectedMetrics: (metrics: string[]) => void;diff --git a/web/src/features/datasets/components/DatasetCompareRunsTable.tsx b/web/src/features/datasets/components/DatasetCompareRunsTable.tsxindex 95c001a724..9bf387c80b 100644--- a/web/src/features/datasets/components/DatasetCompareRunsTable.tsx+++ b/web/src/features/datasets/components/DatasetCompareRunsTable.tsx@@ -44,7 +44,6 @@ function DatasetCompareRunsTableInternal(props: {projectId: string;datasetId: string;runIds: string[];- localExperiments: { key: string; value: string }[];}) {const { toggleField, isFieldSelected } = useDatasetCompareFields();const [isFieldsDropdownOpen, setIsFieldsDropdownOpen] = useState(false);@@ -312,7 +311,6 @@ export function DatasetCompareRunsTable(props: {projectId: string;datasetId: string;runIds: string[];- localExperiments: { key: string; value: string }[];}) {return (<DatasetCompareFieldsProvider>diff --git a/web/src/features/events/components/EventsTable.tsx b/web/src/features/events/components/EventsTable.tsxindex db457d2f53..46371bb046 100644--- a/web/src/features/events/components/EventsTable.tsx+++ b/web/src/features/events/components/EventsTable.tsx@@ -55,7 +55,7 @@ import { InfoIcon, LightbulbIcon, PlusCircle } from "lucide-react";import { UpsertModelFormDialog } from "@/src/features/models/components/UpsertModelFormDialog";import { LocalIsoDate } from "@/src/components/LocalIsoDate";import { Badge } from "@/src/components/ui/badge";-import { type Row, type RowSelectionState } from "@tanstack/react-table";+import { type RowSelectionState } from "@tanstack/react-table";import TableIdOrName from "@/src/components/table/table-id";import { ItemBadge } from "@/src/components/ItemBadge";import { PeekViewObservationDetail } from "@/src/components/table/peek/peek-observation-detail";@@ -820,7 +820,7 @@ export default function ObservationsEventsTable({header: getEventsColumnName("inputCost"),size: 120,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<EventsTableRow> }) => {+ cell: ({ row }) => {const value = row.getValue("cost") as {inputCost: number | undefined;outputCost: number | undefined;@@ -840,7 +840,7 @@ export default function ObservationsEventsTable({header: getEventsColumnName("outputCost"),size: 120,loadingCell: <TableTextLoadingCell />,- cell: ({ row }: { row: Row<EventsTableRow> }) => {+ cell: ({ row }) => {const value = row.getValue("cost") as {inputCost: number | undefined;outputCost: number | undefined;@@ -854,7 +854,7 @@ export default function ObservationsEventsTable({defaultHidden: true,enableSorting,},- ],+ ] satisfies LangfuseColumnDef<EventsTableRow>[],},{accessorKey: "toolDefinitions",@@ -921,7 +921,7 @@ export default function ObservationsEventsTable({id: "tokensPerSecond",header: "Tokens per second",size: 200,- cell: ({ row }: { row: Row<EventsTableRow> }) => {+ cell: ({ row }) => {const latency: number | undefined = row.getValue("latency");const usage = row.getValue("usage") as {inputUsage: number;@@ -950,7 +950,7 @@ export default function ObservationsEventsTable({enableHiding: true,defaultHidden: true,enableSorting,- cell: ({ row }: { row: Row<EventsTableRow> }) => {+ cell: ({ row }) => {const value = row.getValue("usage") as {inputUsage: number;outputUsage: number;@@ -968,7 +968,7 @@ export default function ObservationsEventsTable({enableHiding: true,defaultHidden: true,enableSorting,- cell: ({ row }: { row: Row<EventsTableRow> }) => {+ cell: ({ row }) => {const value = row.getValue("usage") as {inputUsage: number;outputUsage: number;@@ -986,7 +986,7 @@ export default function ObservationsEventsTable({enableHiding: true,defaultHidden: true,enableSorting,- cell: ({ row }: { row: Row<EventsTableRow> }) => {+ cell: ({ row }) => {const value = row.getValue("usage") as {inputUsage: number;outputUsage: number;@@ -995,7 +995,7 @@ export default function ObservationsEventsTable({return <span>{numberFormatter(value.totalUsage, 0)}</span>;},},- ],+ ] satisfies LangfuseColumnDef<EventsTableRow>[],},{accessorKey: "providedModelName",diff --git a/web/src/features/experiments/components/ExperimentComparisonSelector.tsx b/web/src/features/experiments/components/ExperimentComparisonSelector.tsxindex 76556539de..81a562d860 100644--- a/web/src/features/experiments/components/ExperimentComparisonSelector.tsx+++ b/web/src/features/experiments/components/ExperimentComparisonSelector.tsx@@ -14,9 +14,7 @@ type ExperimentComparisonSelectorProps = {baselineExperimentId?: string;selectedIds: string[];onSelectedIdsChange: (ids: string[]) => void;- isLoading?: boolean;maxSelections?: number;- disabled?: boolean;};export function ExperimentComparisonSelector({diff --git a/web/src/features/experiments/components/table/ExperimentFilterPills.tsx b/web/src/features/experiments/components/table/ExperimentFilterPills.tsxindex 2ad9cc512a..e3d4b93a31 100644--- a/web/src/features/experiments/components/table/ExperimentFilterPills.tsx+++ b/web/src/features/experiments/components/table/ExperimentFilterPills.tsx@@ -63,7 +63,6 @@ function formatFilterForPill(filter: FilterCondition): string {interface FilterPillWithTargetProps {filter: FilterCondition;- filterIndex: number;experimentId: string;experimentName: string;selectedExperimentNames: { experimentId: string; experimentName: string }[];@@ -183,7 +182,6 @@ export function ExperimentFilterPills({<FilterPillWithTargetkey={item.key}filter={item.filter}- filterIndex={item.filterIndex}experimentId={item.experimentId}experimentName={item.experimentName}selectedExperimentNames={selectedExperimentNames}diff --git a/web/src/features/experiments/components/table/ExperimentGridCell.tsx b/web/src/features/experiments/components/table/ExperimentGridCell.tsxindex 8f2265a39e..68f0e52ec7 100644--- a/web/src/features/experiments/components/table/ExperimentGridCell.tsx+++ b/web/src/features/experiments/components/table/ExperimentGridCell.tsx@@ -32,7 +32,6 @@ import { cn } from "@/src/utils/tailwind";type ExperimentGridCellProps = {projectId: string;- experimentId: string;itemId: string;output: unknown;level: string;diff --git a/web/src/features/experiments/components/table/ExperimentGridView.tsx b/web/src/features/experiments/components/table/ExperimentGridView.tsxindex 04b2e763db..797252bd04 100644--- a/web/src/features/experiments/components/table/ExperimentGridView.tsx+++ b/web/src/features/experiments/components/table/ExperimentGridView.tsx@@ -108,7 +108,7 @@ export const ExperimentGridView = ({</div>),size: 400,- cell: ({ row }: { row: { original: ExperimentItemsTableRow } }) => {+ cell: ({ row }) => {// Find this experiment's dataconst expData = row.original.experiments.find((e) => e.experimentId === expId,@@ -132,7 +132,6 @@ export const ExperimentGridView = ({return (<ExperimentGridCellprojectId={projectId}- experimentId={expId}itemId={row.original.itemId}output={output}level={expData.level}diff --git a/web/src/features/experiments/components/table/ExperimentItemsTable.tsx b/web/src/features/experiments/components/table/ExperimentItemsTable.tsxindex 614e7ab1c9..4f6b22449a 100644--- a/web/src/features/experiments/components/table/ExperimentItemsTable.tsx+++ b/web/src/features/experiments/components/table/ExperimentItemsTable.tsx@@ -507,12 +507,10 @@ export default function ExperimentItemsTable({scoreColumns.map((scoreCol) => ({...scoreCol,// Override the cell renderer to show stacked scores for each experiment- cell: ({ row }: { row: any }) => {+ cell: ({ row }) => {const experiments = row.original.experiments;const baselineExperiment = hasBaseline- ? experiments.find(- (exp: ExperimentItemData) => exp.experimentId === baselineId,- )+ ? experiments.find((exp) => exp.experimentId === baselineId): undefined;const baselineScoresData = baselineExperiment?.[scoreField] ?? null;// todo: fix properlydiff --git a/web/src/features/models/components/test-match/MatchedModelCard.tsx b/web/src/features/models/components/test-match/MatchedModelCard.tsxindex 09cf138581..4980e4531d 100644--- a/web/src/features/models/components/test-match/MatchedModelCard.tsx+++ b/web/src/features/models/components/test-match/MatchedModelCard.tsx@@ -6,19 +6,14 @@ import {} from "@/src/components/ui/card";import { Badge } from "@/src/components/ui/badge";-type MatchedModelCardProps = {- projectId: string;+export type MatchedModelCardProps = {model: {- id: string;modelName: string;matchPattern: string;projectId: string | null;};- pricingTierId: string;};-export type { MatchedModelCardProps };-export function MatchedModelCard({ model }: MatchedModelCardProps) {const isLangfuseModel = !model.projectId;diff --git a/web/src/features/models/components/test-match/TestModelMatchDialog.tsx b/web/src/features/models/components/test-match/TestModelMatchDialog.tsxindex 12d84f6b54..dd46d2bf7e 100644--- a/web/src/features/models/components/test-match/TestModelMatchDialog.tsx+++ b/web/src/features/models/components/test-match/TestModelMatchDialog.tsx@@ -153,11 +153,7 @@ export function TestModelMatchDialog({Match Found</span></div>- <MatchedModelCard- projectId={projectId}- model={data.model}- pricingTierId={data.matchedTier.id}- />+ <MatchedModelCard model={data.model} /><MatchedTierCard tier={data.matchedTier} /></>) : (diff --git a/web/src/features/prompts/components/prompt-detail.tsx b/web/src/features/prompts/components/prompt-detail.tsxindex 45b9da566c..524ecaa2bb 100644--- a/web/src/features/prompts/components/prompt-detail.tsx+++ b/web/src/features/prompts/components/prompt-detail.tsx@@ -371,7 +371,6 @@ export const PromptDetail = ({setCurrentPromptVersion(version);setCurrentPromptLabel(null);}}- totalCount={promptHistory.data.totalCount}commentCounts={commentCounts.data}/></div>diff --git a/web/src/features/prompts/components/prompt-history.tsx b/web/src/features/prompts/components/prompt-history.tsxindex 93b94e7747..aed8fea4a2 100644--- a/web/src/features/prompts/components/prompt-history.tsx+++ b/web/src/features/prompts/components/prompt-history.tsx@@ -15,8 +15,6 @@ const PromptHistoryTraceNode = (props: {currentPromptVersion: number | undefined;setCurrentPromptVersion: (version: number | undefined) => void;router: NextRouter;- projectId: string;- totalCount: number;commentCounts?: Map<string, number>;}) => {const [isHovered, setIsHovered] = useState(false);@@ -176,11 +174,9 @@ export const PromptHistoryNode = (props: {prompts: RouterOutputs["prompts"]["allVersions"]["promptVersions"];currentPromptVersion: number | undefined;setCurrentPromptVersion: (id: number | undefined) => void;- totalCount: number;commentCounts?: Map<string, number>;}) => {const router = useRouter();- const projectId = router.query.projectId as string;const currentPrompt = props.prompts.find((p) => p.version === props.currentPromptVersion,);@@ -196,8 +192,6 @@ export const PromptHistoryNode = (props: {currentPromptVersion={props.currentPromptVersion}setCurrentPromptVersion={props.setCurrentPromptVersion}router={router}- projectId={projectId}- totalCount={props.totalCount}commentCounts={props.commentCounts}/>))}diff --git a/web/src/features/rbac/components/MembersTable.tsx b/web/src/features/rbac/components/MembersTable.tsxindex b52062299d..f3a6f18bd4 100644--- a/web/src/features/rbac/components/MembersTable.tsx+++ b/web/src/features/rbac/components/MembersTable.tsx@@ -19,7 +19,6 @@ import { api } from "@/src/utils/api";import { safeExtract } from "@/src/utils/map-utils";import type { RouterOutput } from "@/src/utils/types";import { Role } from "@langfuse/shared";-import { type Row } from "@tanstack/react-table";import { Trash } from "lucide-react";import { useSession } from "next-auth/react";import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";@@ -254,7 +253,7 @@ export function MembersTable({},},...(project- ? [+ ? ([{accessorKey: "projectRole",id: "projectRole",@@ -264,11 +263,7 @@ export function MembersTable({"The role for this user in this specific project. This role overrides the default project role.",href: "https://langfuse.com/docs/administration/rbac",},- cell: ({- row,- }: {- row: Row<MembersTableRow>; // need to specify the type here due to conditional rendering- }) => {+ cell: ({ row }) => {const projectRole = row.getValue("projectRole",) as MembersTableRow["projectRole"];@@ -292,7 +287,7 @@ export function MembersTable({);},},- ]+ ] satisfies LangfuseColumnDef<MembersTableRow>[]): []),{accessorKey: "createdAt",diff --git a/web/src/features/support-chat/IntroSection.tsx b/web/src/features/support-chat/IntroSection.tsxindex eee37174cc..7f2015519e 100644--- a/web/src/features/support-chat/IntroSection.tsx+++ b/web/src/features/support-chat/IntroSection.tsx@@ -22,12 +22,7 @@ import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostype SupportType = "in-app-support" | "custom" | "community";-export function IntroSection({- onStartForm,-}: {- onStartForm: () => void;- displayDensity?: "default" | "compact";-}) {+export function IntroSection({ onStartForm }: { onStartForm: () => void }) {const uiCustomization = useUiCustomization();const { isLangfuseCloud } = useLangfuseCloudRegion();const capture = usePostHogClientCapture();diff --git a/web/src/features/support-chat/SuccessSection.tsx b/web/src/features/support-chat/SuccessSection.tsxindex ad048214f9..6d36ab5964 100644--- a/web/src/features/support-chat/SuccessSection.tsx+++ b/web/src/features/support-chat/SuccessSection.tsx@@ -3,12 +3,7 @@ import { Separator } from "@/src/components/ui/separator";import { CheckCircle2 } from "lucide-react";import { IntroSection } from "@/src/features/support-chat/IntroSection";-export function SuccessSection({- onAnother,-}: {- onClose: () => void;- onAnother: () => void;-}) {+export function SuccessSection({ onAnother }: { onAnother: () => void }) {return (<div className="mt-1 flex flex-col gap-6">{/* Success card */}diff --git a/web/src/features/support-chat/SupportDrawer.tsx b/web/src/features/support-chat/SupportDrawer.tsxindex e410454a7d..9cb5d803b3 100644--- a/web/src/features/support-chat/SupportDrawer.tsx+++ b/web/src/features/support-chat/SupportDrawer.tsx@@ -94,10 +94,7 @@ export const SupportDrawer = ({/>)}{currentMode === "success" && (- <SuccessSection- onClose={close}- onAnother={() => setCurrentMode("form")}- />+ <SuccessSection onAnother={() => setCurrentMode("form")} />)}</div></div>diff --git a/web/src/features/tag/components/TagList.tsx b/web/src/features/tag/components/TagList.tsxindex bf0ef92f07..f3112b68fa 100644--- a/web/src/features/tag/components/TagList.tsx+++ b/web/src/features/tag/components/TagList.tsx@@ -7,7 +7,6 @@ type TagListProps = {isLoading: boolean;viewOnly?: boolean;isTableCell?: boolean;- className?: string;};const TagList = ({diff --git a/web/src/features/widgets/chart-library/PivotTable.tsx b/web/src/features/widgets/chart-library/PivotTable.tsxindex a31672c302..c94252f2bb 100644--- a/web/src/features/widgets/chart-library/PivotTable.tsx+++ b/web/src/features/widgets/chart-library/PivotTable.tsx@@ -56,12 +56,6 @@ export interface PivotTableProps {/** Pivot table specific configuration */config?: PivotTableConfig;- /** Chart configuration from shadcn/ui (for consistency with other charts) */- chartConfig?: ChartProps["config"];-- /** Accessibility layer flag */- accessibilityLayer?: boolean;-/** Current sort state */sortState?: OrderByState;diff --git a/web/src/pages/project/[projectId]/datasets/[datasetId]/compare/charts.tsx b/web/src/pages/project/[projectId]/datasets/[datasetId]/compare/charts.tsxindex f961d4e8a6..bd8f613ab4 100644--- a/web/src/pages/project/[projectId]/datasets/[datasetId]/compare/charts.tsx+++ b/web/src/pages/project/[projectId]/datasets/[datasetId]/compare/charts.tsx@@ -237,7 +237,6 @@ export default function DatasetCompare() {<div className="flex w-full justify-end"><DatasetAnalyticskey="dataset-analytics"- projectId={projectId}scoreOptions={scoreAnalyticsOptions}selectedMetrics={selectedMetrics}setSelectedMetrics={setSelectedMetrics}diff --git a/web/src/pages/project/[projectId]/datasets/[datasetId]/compare/index.tsx b/web/src/pages/project/[projectId]/datasets/[datasetId]/compare/index.tsxindex cecd18f439..b1bc9b5813 100644--- a/web/src/pages/project/[projectId]/datasets/[datasetId]/compare/index.tsx+++ b/web/src/pages/project/[projectId]/datasets/[datasetId]/compare/index.tsx@@ -54,7 +54,6 @@ function DatasetCompareInternal() {runs,dataset,runsData,- localRuns,handleExperimentSettled: handleExperimentSettledBase,setRunState,setLocalRuns,@@ -259,7 +258,6 @@ function DatasetCompareInternal() {projectId={projectId}datasetId={datasetId}runIds={runIds ?? []}- localExperiments={localRuns}/></div><SidePaneldiff --git a/web/src/pages/project/[projectId]/datasets/[datasetId]/index.tsx b/web/src/pages/project/[projectId]/datasets/[datasetId]/index.tsxindex 3106474039..2cb84b2a81 100644--- a/web/src/pages/project/[projectId]/datasets/[datasetId]/index.tsx+++ b/web/src/pages/project/[projectId]/datasets/[datasetId]/index.tsx@@ -318,7 +318,6 @@ export default function Dataset() {<DatasetAnalyticskey="dataset-analytics"- projectId={projectId}scoreOptions={scoreOptions}selectedMetrics={selectedMetrics}setSelectedMetrics={setSelectedMetrics}