Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(web): remove trace and session bookmarking from the UI (#16113)

Max Deichmann807eedd4af04
diff --git a/web/.structure-baseline.json b/web/.structure-baseline.json
index 12d47b00c6..de4afebda5 100644
--- a/web/.structure-baseline.json
+++ b/web/.structure-baseline.json
@@ -42,7 +42,6 @@
"src/components/session/NewDatasetItemFromTrace.tsx: component NewDatasetItemFromTraceId != filename",
"src/components/session/TraceEventsRow.tsx: 3 components: TraceEventsSkeleton, TraceEventsRow, LazyTraceEventsRow",
"src/components/session/TraceRow.tsx: component LazyTraceRow != filename",
- "src/components/star-toggle.tsx: filename not PascalCase; 4 components: StarToggle, StarTraceToggle, StarTraceDetailsToggle, StarSessionToggle",
"src/components/table/data-table-ai-filters.tsx: filename not PascalCase",
"src/components/table/data-table-column-visibility-filter.tsx: filename not PascalCase",
"src/components/table/data-table-controls.tsx: filename not PascalCase; 13 components: ControlsContext, DataTableControlsProvider, DataTableControls, FilterAccordionItem, CategoricalFacet, NumericFacet, StringFacet, KeyValueFacet, NumericKeyValueFacet, BooleanKeyValueFacet, StringKeyValueFacet, FilterValueCheckbox, DataTableControlsSection",
diff --git a/web/src/components/session/ModernSessionHeaderActionsController.clienttest.tsx b/web/src/components/session/ModernSessionHeaderActionsController.clienttest.tsx
index 661bf961b0..d3b5c06fdd 100644
--- a/web/src/components/session/ModernSessionHeaderActionsController.clienttest.tsx
+++ b/web/src/components/session/ModernSessionHeaderActionsController.clienttest.tsx
@@ -70,9 +70,6 @@ vi.mock("@/src/utils/api", () => ({
api: {
useUtils: () => ({ sessions: { invalidate: vi.fn() } }),
sessions: {
- bookmark: {
- useMutation: () => ({ mutate: vi.fn(), isPending: false }),
- },
publish: {
useMutation: () => ({ mutate: vi.fn(), isPending: false }),
},
@@ -90,7 +87,6 @@ describe("ModernSessionHeaderActionsController", () => {
<ModernSessionHeaderActionsController
projectId="project-id"
sessionId="session-id"
- bookmarked={false}
isPublic={false}
showCorrections={false}
showInlineToolCalls={false}
diff --git a/web/src/components/session/ModernSessionHeaderActionsController.tsx b/web/src/components/session/ModernSessionHeaderActionsController.tsx
index cf30ca113c..38cc8308fb 100644
--- a/web/src/components/session/ModernSessionHeaderActionsController.tsx
+++ b/web/src/components/session/ModernSessionHeaderActionsController.tsx
@@ -1,4 +1,4 @@
-import { CopyIcon, Share2, Star } from "lucide-react";
+import { CopyIcon, Share2 } from "lucide-react";
import { type ReactNode } from "react";
import {
@@ -19,7 +19,6 @@ import { api } from "@/src/utils/api";
export function ModernSessionHeaderActionsController({
projectId,
sessionId,
- bookmarked,
isPublic,
showCorrections,
showInlineToolCalls,
@@ -31,7 +30,6 @@ export function ModernSessionHeaderActionsController({
}: {
projectId: string;
sessionId: string;
- bookmarked: boolean;
isPublic: boolean;
showCorrections: boolean;
showInlineToolCalls: boolean;
@@ -44,17 +42,10 @@ export function ModernSessionHeaderActionsController({
const capture = usePostHogClientCapture();
const { copy } = useCopyToClipboard();
const utils = api.useUtils();
- const hasBookmarkAccess = useHasProjectAccess({
- projectId,
- scope: "objects:bookmark",
- });
const hasPublishAccess = useHasProjectAccess({
projectId,
scope: "objects:publish",
});
- const bookmarkMutation = api.sessions.bookmark.useMutation({
- onSuccess: () => utils.sessions.invalidate(),
- });
const publishMutation = api.sessions.publish.useMutation({
onSuccess: () => utils.sessions.invalidate(),
});
@@ -63,27 +54,6 @@ export function ModernSessionHeaderActionsController({
<DropdownMenu>
{children}
<DropdownMenuContent align="end">
- <DropdownMenuItem
- disabled={!hasBookmarkAccess || bookmarkMutation.isPending}
- onClick={() => {
- capture("table:bookmark_button_click", {
- table: "sessions",
- id: sessionId,
- value: !bookmarked,
- });
- bookmarkMutation.mutate({
- projectId,
- sessionId,
- bookmarked: !bookmarked,
- });
- }}
- >
- <Star
- className="mr-2 h-3.5 w-3.5"
- fill={bookmarked ? "currentColor" : "none"}
- />
- {bookmarked ? "Remove from favourites" : "Add to favourites"}
- </DropdownMenuItem>
<DropdownMenuItem
disabled={!hasPublishAccess || publishMutation.isPending}
onClick={() => {
diff --git a/web/src/components/session/index.tsx b/web/src/components/session/index.tsx
index a8d5ee038a..fcc8e7d388 100644
--- a/web/src/components/session/index.tsx
+++ b/web/src/components/session/index.tsx
@@ -2,7 +2,6 @@ import { cn } from "@/src/utils/tailwind";
import { GroupedScoreBadges } from "@/src/components/grouped-score-badge";
import { ErrorPage } from "@/src/components/error-page";
import { PublishSessionSwitch } from "@/src/components/publish-object-switch";
-import { StarSessionToggle } from "@/src/components/star-toggle";
import { IOPreview } from "@/src/features/traces/components/IOPreview/IOPreview";
import { JsonSkeleton } from "@/src/components/ui/CodeJsonViewer";
import { Badge } from "@/src/components/ui/badge";
@@ -506,13 +505,6 @@ export const SessionPage: React.FC<{
],
actionButtonsLeft: (
<div className="flex items-center gap-0">
- <StarSessionToggle
- key="star"
- projectId={projectId}
- sessionId={sessionId}
- value={session.data?.bookmarked ?? false}
- size="icon-xs"
- />
<PublishSessionSwitch
projectId={projectId}
sessionId={sessionId}
@@ -597,12 +589,6 @@ export const SessionPage: React.FC<{
// inline icon toolbar. Session-to-session nav stays desktop-only.
actionButtonsMenu: (
<>
- <StarSessionToggle
- projectId={projectId}
- sessionId={sessionId}
- value={session.data?.bookmarked ?? false}
- showLabel
- />
<PublishSessionSwitch
projectId={projectId}
sessionId={sessionId}
@@ -1381,13 +1367,6 @@ const LoadedSessionEventsPage: React.FC<{
],
actionButtonsLeft: !isModernSessionEnabled ? (
<div className="flex items-center gap-0">
- <StarSessionToggle
- key="star"
- projectId={projectId}
- sessionId={sessionId}
- value={session.bookmarked}
- size="icon-xs"
- />
<PublishSessionSwitch
projectId={projectId}
sessionId={sessionId}
@@ -1461,7 +1440,6 @@ const LoadedSessionEventsPage: React.FC<{
<ModernSessionHeaderActionsController
projectId={projectId}
sessionId={sessionId}
- bookmarked={session.bookmarked}
isPublic={session.public}
showCorrections={showCorrections}
showInlineToolCalls={showInlineToolCalls}
@@ -1488,12 +1466,6 @@ const LoadedSessionEventsPage: React.FC<{
// inline icon toolbar. Session-to-session nav stays desktop-only.
actionButtonsMenu: (
<>
- <StarSessionToggle
- projectId={projectId}
- sessionId={sessionId}
- value={session.bookmarked}
- showLabel
- />
<PublishSessionSwitch
projectId={projectId}
sessionId={sessionId}
diff --git a/web/src/components/star-toggle.clienttest.tsx b/web/src/components/star-toggle.clienttest.tsx
deleted file mode 100644
index 6d4f632612..0000000000
--- a/web/src/components/star-toggle.clienttest.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { render, screen } from "@testing-library/react";
-
-import { TooltipProvider } from "@/src/components/ui/tooltip";
-import { StarToggle } from "@/src/components/star-toggle";
-
-/**
- * LFE-10535 (#1/#2): the star button's accessible name, its labeled-menu text,
- * and its tooltip are all derived from `value`, so a screen reader always hears
- * the real bookmark state and every text surface stays in sync with the
- * (optimistic) icon. A stable `data-bookmark-toggle` hook lets the table keep
- * "click the star without closing the peek" decoupled from the human label.
- */
-const noop = () => Promise.resolve();
-
-describe("StarToggle accessible name (LFE-10535)", () => {
- it("announces the bookmark state on the icon button", () => {
- const { rerender } = render(
- <StarToggle value={false} isLoading={false} onClick={noop} />,
- );
- expect(
- screen.getByRole("button", { name: "Bookmark" }),
- ).toBeInTheDocument();
-
- rerender(<StarToggle value={true} isLoading={false} onClick={noop} />);
- expect(
- screen.getByRole("button", { name: "Remove bookmark" }),
- ).toBeInTheDocument();
- });
-
- it("announces the state in the labeled menu item and shows matching text", () => {
- const { rerender } = render(
- <StarToggle value={false} isLoading={false} onClick={noop} showLabel />,
- );
- expect(screen.getByRole("button", { name: "Bookmark" })).toHaveTextContent(
- "Bookmark",
- );
-
- rerender(
- <StarToggle value={true} isLoading={false} onClick={noop} showLabel />,
- );
- expect(
- screen.getByRole("button", { name: "Remove bookmark" }),
- ).toHaveTextContent("Remove bookmark");
- });
-
- it("wires the tooltip onto the real focusable button with a stable behaviour hook", () => {
- render(
- <TooltipProvider>
- <StarToggle value={true} isLoading={false} onClick={noop} tooltip />
- </TooltipProvider>,
- );
- // The accessible name lives on the button itself (TooltipTrigger asChild),
- // not on a wrapping <span> — so SR users hear the tooltip.
- const button = screen.getByRole("button", { name: "Remove bookmark" });
- expect(button).toHaveAttribute("data-bookmark-toggle");
- });
-});
diff --git a/web/src/components/star-toggle.tsx b/web/src/components/star-toggle.tsx
deleted file mode 100644
index faf54eba13..0000000000
--- a/web/src/components/star-toggle.tsx
+++ /dev/null
@@ -1,282 +0,0 @@
-import { StarIcon } from "lucide-react";
-
-import { Button } from "@/src/components/ui/button";
-import {
- Tooltip,
- TooltipContent,
- TooltipTrigger,
-} from "@/src/components/ui/tooltip";
-import { api } from "@/src/utils/api";
-import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { type RouterInput } from "@/src/utils/types";
-import { useEffect, useState } from "react";
-import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
-import { trpcErrorToast } from "@/src/utils/trpcErrorToast";
-
-export function StarToggle({
- value,
- disabled = false,
- onClick,
- size = "icon",
- isLoading,
- showLabel = false,
- tooltip = false,
-}: {
- value: boolean;
- disabled?: boolean;
- onClick: (value: boolean) => Promise<unknown>;
- size?: "icon" | "icon-xs";
- isLoading: boolean;
- /** When set, render as a full-width labeled menu item instead of an icon. */
- showLabel?: boolean;
- /** When set, wrap the icon button in a hover tooltip announcing the state. */
- tooltip?: boolean;
-}) {
- // Single source of truth for the accessible name, the menu label, AND the
- // tooltip — all derived from `value`, so an optimistic flip updates the icon
- // and every text surface together, and a screen reader always hears the real
- // state in both the toolbar and the menu (LFE-10535).
- const stateLabel = value ? "Remove bookmark" : "Bookmark";
-
- const button = (
- <Button
- variant="ghost"
- size={showLabel ? "sm" : size}
- className={
- showLabel ? "w-full justify-start gap-2 font-normal" : undefined
- }
- onClick={(e) => {
- e.stopPropagation();
- onClick(!value);
- }}
- disabled={disabled}
- loading={isLoading}
- aria-label={stateLabel}
- // Stable behaviour hook (decoupled from the human-facing label): the
- // table marks this selector as "don't close the peek" so you can bookmark
- // a row without dismissing the open peek.
- data-bookmark-toggle="true"
- >
- <StarIcon
- className="h-4 w-4"
- fill={value ? "#facc15" : "none"}
- stroke={value ? "#ca8a04" : "currentColor"}
- strokeWidth={2}
- />
- {showLabel ? <span className="text-sm">{stateLabel}</span> : null}
- </Button>
- );
-
- if (!tooltip) return button;
-
- // TooltipTrigger asChild wraps the real <Button> (not a <span>), so Radix puts
- // aria-describedby on the focusable control and SR users hear the tooltip.
- return (
- <Tooltip>
- <TooltipTrigger asChild>{button}</TooltipTrigger>
- <TooltipContent>{stateLabel}</TooltipContent>
- </Tooltip>
- );
-}
-
-// use by the trace table
-export function StarTraceToggle({
- tracesFilter,
- projectId,
- traceId,
- value,
- size = "icon",
-}: {
- tracesFilter: RouterInput["traces"]["all"];
- projectId: string;
- traceId: string;
- value: boolean;
- size?: "icon" | "icon-xs";
-}) {
- const utils = api.useUtils();
- const hasAccess = useHasProjectAccess({
- projectId,
- scope: "objects:bookmark",
- });
- const capture = usePostHogClientCapture();
- const [isLoading, setIsLoading] = useState(false);
-
- const mutBookmarkTrace = api.traces.bookmark.useMutation({
- onMutate: async (newBookmarkState) => {
- await utils.traces.all.cancel();
- setIsLoading(true);
-
- const previousData = utils.traces.all.getData(tracesFilter);
-
- utils.traces.all.setData(tracesFilter, (old) => {
- if (!old) return old;
- return {
- ...old,
- traces: old.traces.map((trace) =>
- trace.id === traceId
- ? { ...trace, bookmarked: newBookmarkState.bookmarked }
- : trace,
- ),
- };
- });
-
- return { previousData };
- },
- onError: (err, newBookmarkState, context) => {
- setIsLoading(false);
- trpcErrorToast(err);
- if (context?.previousData) {
- utils.traces.all.setData(tracesFilter, context.previousData);
- }
- },
- onSettled: () => {
- setIsLoading(false);
- },
- });
-
- return (
- <StarToggle
- value={value}
- size={size}
- disabled={!hasAccess}
- isLoading={isLoading}
- onClick={(newValue) => {
- capture("table:bookmark_button_click", {
- table: "traces",
- id: traceId,
- value: newValue,
- });
- return mutBookmarkTrace.mutateAsync({
- projectId,
- traceId,
- bookmarked: newValue,
- });
- }}
- />
- );
-}
-
-// use by the single trace view
-export function StarTraceDetailsToggle({
- projectId,
- traceId,
- value,
- size = "icon",
- showLabel = false,
- tooltip = false,
-}: {
- projectId: string;
- traceId: string;
- value: boolean;
- size?: "icon" | "icon-xs";
- /** Render as a full-width labeled menu item (label tracks the optimistic state). */
- showLabel?: boolean;
- /** Wrap the icon button in a hover tooltip announcing the optimistic state. */
- tooltip?: boolean;
-}) {
- const utils = api.useUtils();
- const hasAccess = useHasProjectAccess({
- projectId,
- scope: "objects:bookmark",
- });
- const capture = usePostHogClientCapture();
- const [isLoading, setIsLoading] = useState(false);
- const [optimisticValue, setOptimisticValue] = useState(value);
-
- useEffect(() => {
- setOptimisticValue(value);
- }, [value]);
-
- const mutBookmarkTrace = api.traces.bookmark.useMutation({
- onError: (err) => {
- setIsLoading(false);
- trpcErrorToast(err);
- },
- onSettled: () => {
- setIsLoading(false);
- // Refetch to ensure we have the latest data from the server
- utils.traces.byIdWithObservationsAndScores.invalidate();
- utils.traces.all.invalidate();
- utils.events.byTraceId.invalidate();
- },
- });
-
- return (
- <StarToggle
- value={optimisticValue}
- size={size}
- showLabel={showLabel}
- tooltip={tooltip}
- disabled={!hasAccess}
- isLoading={isLoading}
- onClick={(nextValue) => {
- const previousValue = optimisticValue;
- setIsLoading(true);
- setOptimisticValue(nextValue);
- capture("trace_detail:bookmark_button_click", {
- id: traceId,
- value: nextValue,
- });
- return mutBookmarkTrace
- .mutateAsync({
- projectId,
- traceId,
- bookmarked: nextValue,
- })
- .catch((error) => {
- setOptimisticValue(previousValue);
- throw error;
- });
- }}
- />
- );
-}
-
-export function StarSessionToggle({
- projectId,
- sessionId,
- value,
- size = "icon",
- showLabel = false,
-}: {
- projectId: string;
- sessionId: string;
- value: boolean;
- size?: "icon" | "icon-xs";
- /** Render as a full-width labeled menu item (label tracks the state). */
- showLabel?: boolean;
-}) {
- const utils = api.useUtils();
- const hasAccess = useHasProjectAccess({
- projectId,
- scope: "objects:bookmark",
- });
- const capture = usePostHogClientCapture();
- const mutBookmarkSession = api.sessions.bookmark.useMutation({
- onSuccess: () => {
- utils.sessions.invalidate();
- },
- });
-
- return (
- <StarToggle
- value={value}
- size={size}
- showLabel={showLabel}
- isLoading={mutBookmarkSession.isPending}
- disabled={!hasAccess}
- onClick={(value) => {
- capture("table:bookmark_button_click", {
- table: "sessions",
- id: sessionId,
- value: value,
- });
- return mutBookmarkSession.mutateAsync({
- projectId,
- sessionId,
- bookmarked: value,
- });
- }}
- />
- );
-}
diff --git a/web/src/components/table/DataTable.stories.tsx b/web/src/components/table/DataTable.stories.tsx
index 091adbf3fe..0849afc032 100644
--- a/web/src/components/table/DataTable.stories.tsx
+++ b/web/src/components/table/DataTable.stories.tsx
@@ -29,13 +29,11 @@ import {
type LevelCount,
} from "@/src/components/level-counts-display";
import { formatAsLabel, LevelSymbols } from "@/src/components/level-colors";
-import { StarToggle } from "@/src/components/star-toggle";
import TagList from "@/src/features/tag/components/TagList";
import { FolderBreadcrumbLink } from "@/src/features/folders/components/FolderBreadcrumbLink";
import { BreakdownTooltip } from "@/src/features/traces/components/BreakdownTooltip";
import {
TableBadgeLoadingCell,
- TableIconButtonLoadingCell,
TableTextLoadingCell,
} from "@/src/components/table/loading-cells";
import {
@@ -78,8 +76,6 @@ import {
//
// Where a real cell needs heavy runtime context (tRPC/router/peek), we render
// the standalone visual part with identical DOM/classes:
-// - bookmark: real StarToggle (the visual half of StarTraceToggle) + local
-// state, instead of the tRPC-bound StarTraceToggle.
// - tags: real TagList in the real `flex gap-x-2 gap-y-1` wrapper,
// instead of TagPromptPopover/TagManager (same visible children).
// - actions: real DropdownMenu + ghost MoreVertical, with a plain menu item
@@ -127,7 +123,6 @@ const TRACE_TAG_POOL = [
// identically to production (string `name`, numeric `latency`, Date `timestamp`,
// Decimal `totalCost`, parsed-object input/output, etc.).
type TraceRow = {
- bookmarked: boolean;
id: string;
timestamp: Date;
name: string;
@@ -166,7 +161,6 @@ function makeTraceRow(index: number): TraceRow {
const inputCost = Number((seeded(index * 2) * 0.18).toFixed(6));
const outputCost = Number((seeded(index * 6) * 0.22).toFixed(6));
return {
- bookmarked: index % 5 === 0,
id: `trace-${(index + 1).toString().padStart(5, "0")}-${Math.floor(
seeded(index) * 1e6,
)
@@ -229,7 +223,7 @@ function loadedTraceData(count = 20): AsyncTableData<TraceRow[]> {
// -----------------------------------------------------------------------------
// Traces columns — faithful copy of the real Traces column structure
// -----------------------------------------------------------------------------
-// Mirrors the visible-by-default Traces columns. The action/bookmark/selection
+// Mirrors the visible-by-default Traces columns. The action/selection
// cells use the standalone visual components (see FIDELITY GOAL note). The IO
// cells use the same MemoizedIOTableCell with the same bg classes + the
// `singleLine = rowHeight === "s"` rule the real table applies.
@@ -268,19 +262,6 @@ function buildTraceColumns(
/>
),
},
- {
- accessorKey: "bookmarked",
- header: undefined,
- id: "bookmarked",
- size: 30,
- isFixedPosition: true,
- loadingCell: <TableIconButtonLoadingCell />,
- // Visual half of StarTraceToggle (StarToggle) with local state, avoiding
- // the tRPC mutation/project-access while keeping identical DOM/classes.
- cell: ({ row }) => (
- <BookmarkCell defaultValue={row.original.bookmarked} />
- ),
- },
{
accessorKey: "timestamp",
header: "Timestamp",
@@ -545,20 +526,6 @@ function buildTraceColumns(
];
}
-function BookmarkCell({ defaultValue }: { defaultValue: boolean }) {
- const [value, setValue] = useState(defaultValue);
- return (
- <StarToggle
- value={value}
- size="icon-xs"
- isLoading={false}
- onClick={async (next) => {
- setValue(next);
- }}
- />
- );
-}
-
// -----------------------------------------------------------------------------
// Plain columns (simple data-state / pagination stories)
// -----------------------------------------------------------------------------
diff --git a/web/src/components/table/peek.tsx b/web/src/components/table/peek.tsx
index f1f0f4c467..1385d20720 100644
--- a/web/src/components/table/peek.tsx
+++ b/web/src/components/table/peek.tsx
@@ -110,7 +110,7 @@ const ALWAYS_KEEP_PEEK_OPEN_SELECTORS = ['[role="checkbox"]'];
* - clicking another table row (`[data-row-index]`) switches the peeked item in
* place rather than closing (handled by the row's own click handler),
* - shared selection controls and any table-specific `ignoredSelectors`
- * (bookmark toggles, etc.) don't close it, and
+ * (row action buttons, etc.) don't close it, and
* - regions that opt out via `data-ignore-outside-interaction` (e.g. the in-app
* assistant) never trigger a close.
*
diff --git a/web/src/components/table/peek/outsideInteraction.clienttest.tsx b/web/src/components/table/peek/outsideInteraction.clienttest.tsx
index 232e988c29..d65f6b7ef8 100644
--- a/web/src/components/table/peek/outsideInteraction.clienttest.tsx
+++ b/web/src/components/table/peek/outsideInteraction.clienttest.tsx
@@ -20,7 +20,7 @@ function targetWith(
return el;
}
-const IGNORED = ['[role="checkbox"]', "[data-bookmark-toggle]"];
+const IGNORED = ['[role="checkbox"]', "[aria-label='edit']"];
describe("shouldKeepPeekOpenOnOutsideInteraction", () => {
afterEach(() => {
@@ -60,7 +60,7 @@ describe("shouldKeepPeekOpenOnOutsideInteraction", () => {
it("keeps open for a table-configured ignoredSelector", () => {
expect(
shouldKeepPeekOpenOnOutsideInteraction(
- targetWith({ "data-bookmark-toggle": "true" }),
+ targetWith({ "aria-label": "edit" }),
IGNORED,
),
).toBe(true);
diff --git a/web/src/components/table/peek/peek-observation-detail.tsx b/web/src/components/table/peek/peek-observation-detail.tsx
index 28a647a744..312ef3c891 100644
--- a/web/src/components/table/peek/peek-observation-detail.tsx
+++ b/web/src/components/table/peek/peek-observation-detail.tsx
@@ -48,7 +48,6 @@ export const TablePeekViewObservationDetail = (
? {
traceId: trace.data.id,
projectId: trace.data.projectId,
- bookmarked: trace.data.bookmarked,
isPublic: trace.data.public,
shareUrl: buildTraceDetailPath({
projectId: trace.data.projectId,
diff --git a/web/src/components/table/peek/peek-trace-detail.tsx b/web/src/components/table/peek/peek-trace-detail.tsx
index fb48a55139..394b41b68f 100644
--- a/web/src/components/table/peek/peek-trace-detail.tsx
+++ b/web/src/components/table/peek/peek-trace-detail.tsx
@@ -47,7 +47,6 @@ export const TablePeekViewTraceDetail = (
? {
traceId: trace.data.id,
projectId: trace.data.projectId,
- bookmarked: trace.data.bookmarked,
isPublic: trace.data.public,
shareUrl: buildTraceDetailPath({
projectId: trace.data.projectId,
diff --git a/web/src/components/table/use-cases/session-row-data.clienttest.ts b/web/src/components/table/use-cases/session-row-data.clienttest.ts
index 6c3e9c474a..73b18e1751 100644
--- a/web/src/components/table/use-cases/session-row-data.clienttest.ts
+++ b/web/src/components/table/use-cases/session-row-data.clienttest.ts
@@ -10,7 +10,6 @@ describe("joinSessionCoreAndMetrics", () => {
{
id: "session-1",
createdAt: filteredCreatedAt,
- bookmarked: false,
public: false,
userIds: ["filtered-user"],
countTraces: 1,
@@ -22,7 +21,6 @@ describe("joinSessionCoreAndMetrics", () => {
{
id: "session-1",
createdAt: allTimeCreatedAt,
- bookmarked: true,
public: true,
userIds: ["all-time-user"],
countTraces: 5,
@@ -38,7 +36,6 @@ describe("joinSessionCoreAndMetrics", () => {
expect(result.rows).toHaveLength(1);
expect(result.rows?.[0]).toMatchObject({
id: "session-1",
- bookmarked: false,
public: false,
userIds: ["filtered-user"],
countTraces: 1,
diff --git a/web/src/components/table/use-cases/session-row-data.ts b/web/src/components/table/use-cases/session-row-data.ts
index 06e53b7987..1a4f6b4ddb 100644
--- a/web/src/components/table/use-cases/session-row-data.ts
+++ b/web/src/components/table/use-cases/session-row-data.ts
@@ -3,7 +3,6 @@ import { joinTableCoreAndMetrics } from "@/src/components/table/utils/joinTableC
type SessionCoreFields = {
id: string;
createdAt?: Date;
- bookmarked?: boolean;
public?: boolean;
userIds?: string[];
countTraces?: number;
@@ -14,7 +13,6 @@ type SessionCoreFields = {
const pickSessionCoreFields = <Core extends SessionCoreFields>(core: Core) => ({
id: core.id,
createdAt: core.createdAt,
- bookmarked: core.bookmarked,
public: core.public,
userIds: core.userIds,
countTraces: core.countTraces,
diff --git a/web/src/components/table/use-cases/sessions.tsx b/web/src/components/table/use-cases/sessions.tsx
index 65bd515fb2..914aee9047 100644
--- a/web/src/components/table/use-cases/sessions.tsx
+++ b/web/src/components/table/use-cases/sessions.tsx
@@ -1,4 +1,3 @@
-import { StarSessionToggle } from "@/src/components/star-toggle";
import { DataTable } from "@/src/components/table/data-table";
import { DataTableToolbar } from "@/src/components/table/data-table-toolbar";
import {
@@ -7,7 +6,6 @@ import {
} from "@/src/components/table/data-table-controls";
import {
TableBadgeLoadingCell,
- TableIconButtonLoadingCell,
TableTextLoadingCell,
} from "@/src/components/table/loading-cells";
import { ResizableFilterLayout } from "@/src/components/table/resizable-filter-layout";
@@ -71,7 +69,6 @@ import { BatchExportTableButton } from "@/src/components/BatchExportTableButton"
export type SessionTableRow = {
id: string;
createdAt: Date;
- bookmarked: boolean;
userIds: string[] | undefined;
countTraces: number | undefined;
sessionDuration: number | null | undefined;
@@ -241,7 +238,6 @@ export default function SessionsTable({
const scoresBoolean = filterOptions.data?.score_booleans ?? undefined;
return {
- bookmarked: ["Bookmarked", "Not bookmarked"],
environment: environmentOptions,
userIds:
filterOptions.data?.userIds.map((u) => ({
@@ -463,31 +459,6 @@ export default function SessionsTable({
const columns: LangfuseColumnDef<SessionTableRow>[] = [
selectActionColumn,
- {
- accessorKey: "bookmarked",
- id: "bookmarked",
- isFixedPosition: true,
- header: undefined,
- size: 50,
- loadingCell: <TableIconButtonLoadingCell />,
- cell: ({ row }) => {
- const bookmarked: SessionTableRow["bookmarked"] =
- row.getValue("bookmarked");
- const sessionId: SessionTableRow["id"] = row.getValue("id");
-
- return typeof sessionId === "string" &&
- typeof bookmarked === "boolean" ? (
- <StarSessionToggle
- sessionId={sessionId}
- projectId={projectId}
- value={bookmarked}
- size="icon-xs"
- />
- ) : undefined;
- },
- enableSorting: false,
- },
-
{
accessorKey: "id",
id: "id",
@@ -919,7 +890,6 @@ export default function SessionsTable({
return {
id: session.id,
createdAt: session.createdAt,
- bookmarked: session.bookmarked,
userIds: session.userIds,
countTraces: session.countTraces,
sessionDuration: session.sessionDuration,
diff --git a/web/src/components/table/use-cases/traces.tsx b/web/src/components/table/use-cases/traces.tsx
index 646fd38f81..13ad5e0533 100644
--- a/web/src/components/table/use-cases/traces.tsx
+++ b/web/src/components/table/use-cases/traces.tsx
@@ -1,4 +1,3 @@
-import { StarTraceToggle } from "@/src/components/star-toggle";
import { DataTable } from "@/src/components/table/data-table";
import { DataTableToolbar } from "@/src/components/table/data-table-toolbar";
import {
@@ -7,7 +6,6 @@ import {
} from "@/src/components/table/data-table-controls";
import {
TableBadgeLoadingCell,
- TableIconButtonLoadingCell,
TableTextLoadingCell,
} from "@/src/components/table/loading-cells";
import { ResizableFilterLayout } from "@/src/components/table/resizable-filter-layout";
@@ -110,7 +108,6 @@ import TagList from "@/src/features/tag/components/TagList";
export type TracesTableRow = {
// Shown by default
- bookmarked: boolean;
timestamp: Date;
name: string;
// i/o and metadata not set explicitly, but fetched from the server from the cell
@@ -352,7 +349,6 @@ export default function TracesTable({
environmentFilterOptions.data?.map((value) => value.environment) ??
undefined,
level: ["DEFAULT", "DEBUG", "WARNING", "ERROR"],
- bookmarked: ["Bookmarked", "Not bookmarked"],
userId:
traceFilterOptionsResponse.data?.users?.map((u) => ({
value: u.value,
@@ -672,35 +668,7 @@ export default function TracesTable({
const enableSorting = !hideControls;
const columns: LangfuseColumnDef<TracesTableRow>[] = [
- ...(hideControls
- ? []
- : ([
- selectActionColumn,
- {
- accessorKey: "bookmarked",
- header: undefined,
- id: "bookmarked",
- size: 30,
- isFixedPosition: true,
- loadingCell: <TableIconButtonLoadingCell />,
- cell: ({ row }) => {
- const bookmarked: TracesTableRow["bookmarked"] =
- row.getValue("bookmarked");
- const traceId = row.getValue("id");
- return typeof traceId === "string" &&
- typeof bookmarked === "boolean" ? (
- <StarTraceToggle
- tracesFilter={tracesAllQueryFilter}
- traceId={traceId}
- projectId={projectId}
- value={bookmarked}
- size="icon-xs"
- />
- ) : undefined;
- },
- enableSorting,
- },
- ] satisfies LangfuseColumnDef<TracesTableRow>[])),
+ ...(hideControls ? [] : [selectActionColumn]),
{
accessorKey: "timestamp",
header: "Timestamp",
@@ -1375,11 +1343,6 @@ export default function TracesTable({
return {
itemType: "TRACE" as const,
detailNavigationKey: detailPageListKeys.traces,
- peekEventOptions: {
- // Stable hook (decoupled from the star's state-aware aria-label) so
- // clicking a row's bookmark toggles it without dismissing the peek.
- ignoredSelectors: ['[role="checkbox"]', "[data-bookmark-toggle]"],
- },
...peekNavigationProps,
};
}, [hideControls, peekNavigationProps]);
@@ -1420,7 +1383,6 @@ export default function TracesTable({
return traces.isSuccess
? (traceRowData?.rows?.map((trace) => {
return {
- bookmarked: trace.bookmarked,
id: trace.id,
timestamp: trace.timestamp,
name: trace.name ?? "",
diff --git a/web/src/features/filters/config/sessions-config.ts b/web/src/features/filters/config/sessions-config.ts
index 173d6da4c3..f804e8a99c 100644
--- a/web/src/features/filters/config/sessions-config.ts
+++ b/web/src/features/filters/config/sessions-config.ts
@@ -19,9 +19,13 @@ export const SESSION_COLUMN_TO_BACKEND_KEY: ColumnToBackendKeyMap = {
export const sessionFilterConfig: FilterConfig = {
tableName: "sessions",
- columnDefinitions: sessionsViewCols,
+ // Bookmarking is gone from the UI, so the sidebar no longer knows the
+ // column: a `bookmarked` filter left in a saved view or an old deep link is
+ // dropped rather than silently narrowing the rows nobody can widen again.
+ // The shared definition stays for the public API.
+ columnDefinitions: sessionsViewCols.filter((col) => col.id !== "bookmarked"),
- defaultExpanded: ["environment", "bookmarked"],
+ defaultExpanded: ["environment"],
facets: [
{
@@ -44,13 +48,6 @@ export const sessionFilterConfig: FilterConfig = {
column: "tags",
label: "Trace Tags",
},
- {
- type: "boolean" as const,
- column: "bookmarked",
- label: "Bookmarked",
- trueLabel: "Bookmarked",
- falseLabel: "Not bookmarked",
- },
{
type: "numeric" as const,
column: "sessionDuration",
@@ -149,7 +146,9 @@ const sessionMetadataFacet: Facet = {
export const sessionEventsFilterConfig: FilterConfig = {
...sessionFilterConfig,
- columnDefinitions: sessionsEventsViewCols,
+ columnDefinitions: sessionsEventsViewCols.filter(
+ (col) => col.id !== "bookmarked",
+ ),
facets: sessionFilterConfig.facets.flatMap((facet) =>
facet.column === "tags" ? [facet, sessionMetadataFacet] : [facet],
),
diff --git a/web/src/features/filters/config/traces-config.ts b/web/src/features/filters/config/traces-config.ts
index aaca1943e0..fb0c1fe69a 100644
--- a/web/src/features/filters/config/traces-config.ts
+++ b/web/src/features/filters/config/traces-config.ts
@@ -10,7 +10,11 @@ export type TraceOmittableFilterColumn = "userId" | "sessionId";
export const traceFilterConfig: FilterConfig = {
tableName: "traces",
- columnDefinitions: tracesTableCols,
+ // Bookmarking is gone from the UI, so the sidebar no longer knows the
+ // column: a `bookmarked` filter left in a saved view or an old deep link is
+ // dropped rather than silently narrowing the rows nobody can widen again.
+ // The shared definition stays for the public API.
+ columnDefinitions: tracesTableCols.filter((col) => col.id !== "bookmarked"),
defaultExpanded: ["environment", "traceName"],
@@ -62,13 +66,6 @@ export const traceFilterConfig: FilterConfig = {
column: "release",
label: "Release",
},
- {
- type: "boolean" as const,
- column: "bookmarked",
- label: "Bookmarked",
- trueLabel: "Bookmarked",
- falseLabel: "Not bookmarked",
- },
{
type: "numeric" as const,
column: "commentCount",
diff --git a/web/src/features/filters/filter-integration.clienttest.ts b/web/src/features/filters/filter-integration.clienttest.ts
index c7f4e1854e..41cf7f2c19 100644
--- a/web/src/features/filters/filter-integration.clienttest.ts
+++ b/web/src/features/filters/filter-integration.clienttest.ts
@@ -9,6 +9,7 @@ import {
type ColumnDefinition,
tracesTableCols,
observationsTableCols,
+ sessionsViewCols,
encodeFiltersGeneric,
decodeFiltersGeneric,
computeSelectedValues,
@@ -593,6 +594,74 @@ describe("Config Validation of old saved views", () => {
});
});
+describe("Retired bookmarked filters (traces + sessions)", () => {
+ const bookmarkedFilter: FilterState = [
+ { column: "bookmarked", type: "boolean", operator: "=", value: true },
+ ];
+ const surfaces = [
+ ["traces", traceFilterConfig],
+ ["sessions", sessionFilterConfig],
+ ["sessions (v4)", sessionEventsFilterConfig],
+ ] as const;
+
+ it.each(surfaces)(
+ "drops a deep-linked bookmarked filter on the %s table",
+ (_label, config) => {
+ expect(
+ decodeAndNormalizeFilters(
+ encodeFiltersGeneric(bookmarkedFilter),
+ config.columnDefinitions,
+ config.migrateFilterState,
+ ),
+ ).toEqual([]);
+ },
+ );
+
+ it.each(surfaces)(
+ "drops a saved-view bookmarked filter on the %s table but keeps the rest",
+ (_label, config) => {
+ const savedView: FilterState = [
+ ...bookmarkedFilter,
+ {
+ column: "environment",
+ type: "stringOptions",
+ operator: "any of",
+ value: ["production"],
+ },
+ ];
+
+ expect(
+ validateFilters(
+ savedView,
+ config.columnDefinitions,
+ config.migrateFilterState,
+ ),
+ ).toEqual([
+ {
+ column: "environment",
+ type: "stringOptions",
+ operator: "any of",
+ value: ["production"],
+ },
+ ]);
+ },
+ );
+
+ it("drops the legacy star display name a pre-ID saved view stored", () => {
+ expect(
+ validateFilters(
+ [{ column: "⭐️", type: "boolean", operator: "=", value: true }],
+ sessionFilterConfig.columnDefinitions,
+ ),
+ ).toEqual([]);
+ });
+
+ it("keeps bookmarked in the shared definitions the public API filters on", () => {
+ expect(tracesTableCols.some((col) => col.id === "bookmarked")).toBe(true);
+ expect(sessionsViewCols.some((col) => col.id === "bookmarked")).toBe(true);
+ });
+});
+
describe("Filter Flow: URL → Decode → Normalize → Transform", () => {
it("should preserve multiple string contains filters from URL", () => {
// environment contains "e" AND environment contains "a"
diff --git a/web/src/features/posthog-analytics/usePostHogClientCapture.ts b/web/src/features/posthog-analytics/usePostHogClientCapture.ts
index 8972e3cc43..8a5aed44a9 100644
--- a/web/src/features/posthog-analytics/usePostHogClientCapture.ts
+++ b/web/src/features/posthog-analytics/usePostHogClientCapture.ts
@@ -17,13 +17,11 @@ export const events = {
"pagination_page_size_select",
"column_visibility_change",
"column_sorting_header_click",
- "bookmark_button_click",
"column_visibility_changed",
],
trace: ["delete_form_open", "delete", "delete_form_submit"],
trace_detail: [
"publish_button_click",
- "bookmark_button_click",
"observation_tree_collapse",
"observation_tree_expand",
"observation_tree_toggle_scores",
@@ -366,7 +364,7 @@ export const events = {
],
} as const;
-// type that represents all possible event names, e.g. "traces:bookmark"
+// type that represents all possible event names, e.g. "trace:delete"
type EventName = {
[Resource in keyof typeof events]: `${Resource}:${(typeof events)[Resource][number]}`;
}[keyof typeof events];
diff --git a/web/src/features/traces/TracePage.tsx b/web/src/features/traces/TracePage.tsx
index 72360135b0..5b7b1fa009 100644
--- a/web/src/features/traces/TracePage.tsx
+++ b/web/src/features/traces/TracePage.tsx
@@ -134,7 +134,6 @@ export function TracePage({
<TraceDetailActions
traceId={trace.data.id}
projectId={trace.data.projectId}
- bookmarked={trace.data.bookmarked}
isPublic={trace.data.public}
name={trace.data.name}
timestamp={timestamp}
@@ -143,13 +142,12 @@ export function TracePage({
</>
),
// Mobile compact header: the same trace actions as full-width labeled
- // menu rows (Bookmark / Share / Delete) for the `⋯` overflow, instead
- // of the inline icon toolbar. Trace-to-trace nav is desktop-only.
+ // menu rows (Share / Delete) for the `⋯` overflow, instead of the
+ // inline icon toolbar. Trace-to-trace nav is desktop-only.
actionButtonsMenu: (
<TraceDetailActions
traceId={trace.data.id}
projectId={trace.data.projectId}
- bookmarked={trace.data.bookmarked}
isPublic={trace.data.public}
name={trace.data.name}
timestamp={timestamp}
diff --git a/web/src/features/traces/components/TraceDetailActions.tsx b/web/src/features/traces/components/TraceDetailActions.tsx
index 8d6a3499dd..da3263b271 100644
--- a/web/src/features/traces/components/TraceDetailActions.tsx
+++ b/web/src/features/traces/components/TraceDetailActions.tsx
@@ -1,10 +1,9 @@
import { api } from "@/src/utils/api";
-import { StarTraceDetailsToggle } from "@/src/components/star-toggle";
import { PublishTraceSwitch } from "@/src/components/publish-object-switch";
import { DeleteTraceButton } from "@/src/components/deleteButton";
/**
- * Trace-level header actions (star / publish / delete) shared by the peek and
+ * Trace-level header actions (publish / delete) shared by the peek and
* the standalone trace page, so both surfaces expose the same controls. Each
* sub-component renders DISABLED (not hidden) when the user lacks the relevant
* project scope, matching the page's long-standing behavior.
@@ -27,7 +26,6 @@ import { DeleteTraceButton } from "@/src/components/deleteButton";
export function TraceDetailActions({
traceId,
projectId,
- bookmarked,
isPublic,
shareUrl,
name,
@@ -39,7 +37,6 @@ export function TraceDetailActions({
}: {
traceId: string;
projectId: string;
- bookmarked: boolean;
isPublic: boolean;
shareUrl?: string;
name?: string | null;
@@ -65,12 +62,6 @@ export function TraceDetailActions({
if (isMenu) {
return (
<div className="flex w-full flex-col gap-0.5">
- <StarTraceDetailsToggle
- projectId={projectId}
- traceId={traceId}
- value={bookmarked}
- showLabel
- />
<PublishTraceSwitch
projectId={projectId}
traceId={traceId}
@@ -95,16 +86,6 @@ export function TraceDetailActions({
return (
<div className="flex flex-row items-center gap-1">
- {/* The star owns its tooltip (composed onto the real button, so the
- aria-describedby lands on the focusable control) and drives its label
- from the optimistic state — see StarToggle. */}
- <StarTraceDetailsToggle
- projectId={projectId}
- traceId={traceId}
- value={bookmarked}
- size={size}
- tooltip
- />
<PublishTraceSwitch
projectId={projectId}
traceId={traceId}
@@ -121,8 +102,8 @@ export function TraceDetailActions({
invalidateFunc={onDeleteInvalidate}
deleteConfirmation={name ?? ""}
icon
- // Match Star/Publish so the three icons share one row height and a
- // ghost (not boxed "outline") style.
+ // Match Publish so both icons share one row height and a ghost (not
+ // boxed "outline") style.
size={size}
variant="ghost"
/>