🪢 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
chore(design-sync): apply fixes from the daily design-system sync (#19461)
Mark Salpeter6c2ed22228a9
diff --git a/.design-sync/NOTES.md b/.design-sync/NOTES.mdindex ef233b44ac..15e5a3b504 100644--- a/.design-sync/NOTES.md+++ b/.design-sync/NOTES.md@@ -79,9 +79,11 @@- DateRangeInput (added 2026-10-22): all four `(Test)` stories open the popover in play() -> skipped by id; the three `features-evaluations-...-daterangeinput--*` stories (an out-of-scope `web/src/features` component of the same name, whose props differ -> `Cannot read properties of undefined (reading 'find')`) are skipped by id too. Only `Default` (closed trigger) is graded; popover content is unverified.- Upstream file renames break gen-entry.sh's explicit shared list first (`[UNRESOLVED_IMPORT] ... missing from node_modules` from `ds-package/index.ts`): update the module path there and re-run gen-entry.sh - the driver does NOT run `buildCmd`.- Story `beforeEach` runs in the preview shim (see Build fixes); a story relying on Storybook loaders, `mount`, or async `beforeEach` work will still diverge.-- Late mount (2026-10-19): `_preview/Table.js` and `_preview/DataTable.js` are ~4.8MB (zod, `@langfuse/shared` dist, posthog, next) and finish executing ~1s after `networkidle`. Validate then fails `[RENDER] ... root empty` and compare reports every story `unpaired`, although the cards render fine. The fix is a local wait in the staged harness (lost on every restage - re-apply after the `cp -r`): in `.ds-sync/package-validate.mjs` before the big `page.evaluate`, `await page.waitForFunction(() => [...document.querySelectorAll('#root, [id^="r"]')].some((r) => r.innerHTML.trim().length), null, { timeout: 15_000 }).catch(() => {})`; in `.ds-sync/storybook/compare.mjs` wait for `Array.isArray(window.__dsCells)` before the pairing `evaluate`, and for `#r0` content in `storyShot` before `settleRender`. Better long-term: shrink those previews (they pull the server-side shared barrel).+- Late mount (2026-10-19): `_preview/Table.js` and `_preview/DataTable.js` are ~4.8MB (zod, `@langfuse/shared` dist, posthog, next) and finish executing ~1s after `networkidle`. Validate then fails `[RENDER] ... root empty` and compare reports every story `unpaired`, although the cards render fine. The fix is a local wait in the staged harness (lost on every restage - re-apply after the `cp -r`): in `.ds-sync/package-validate.mjs` before the big `page.evaluate`, `await page.waitForFunction(() => [...document.querySelectorAll('#root, [id^="r"]')].some((r) => r.innerHTML.trim().length), null, { timeout: 15_000 }).catch(() => {})`; in `.ds-sync/storybook/compare.mjs` wait for `Array.isArray(window.__dsCells)` before the pairing `evaluate`, and for `#r0` content in `storyShot` before `settleRender`. Better long-term: shrink those previews (they pull the server-side shared barrel). Still required on 2026-10-29 (previews now ~5.4MB; without the waits validate failed on Table in 3 of 3 runs).- The driver applies `--max-stories` to every component; without it Table/DataTable are capped at 6 stories. Run compare for Table (`--max-stories 120`) and DataTable (`--max-stories 20`) separately when they are in scope.- Play-state skips are by story id; renamed stories silently lose their skip (compare then shows the post-play delta - re-skip).- Story caps (Table 120, Tabs 24), Table name collisions, ConfirmationDialogController pairing and HoverCard "(Test) Delayed" timing (see above).- A new Storybook framework mock (router, image, font) is invisible to the bundle - a blank or throwing preview usually means one is missing from LangfuseProvider.- Previews compile with esbuild `charset: 'utf8'`, so a `"\uFFFD"` string constant anywhere in the import graph lands as a raw U+FFFD and claude.ai flags the file as having unreadable characters. Check with `perl -CSD -ne 'print "$ARGV\n" if /\x{FFFD}/' ds-bundle/_preview/*.js`; fix at the source (e.g. `String.fromCharCode(0xfffd)`, as in `packages/shared/src/domain/auditLogs.ts`).+- Anchor global-key mismatch (2026-10-29): the uploaded `_ds_sync.json` had sourceKeys for all 85 components that differ from a build of `main`'s committed `.design-sync/` (same keyRecipe 7, scriptsSha cca50c6b4bf08bb1 -> 77113bc9d026db83), so every component is `changed` and needs a full re-grade on the next passing run. Likely cause: the last upload ran with config/fork bytes that never landed on `main`. Grade the whole roster once (primary-story sampling per the skill) and upload; the anchor then matches `main`.+- MobilePageActionsContent (2026-10-29): upstream added a "Menu rows" story (HeaderActionMenuRow + DS Badge) and wrapped both stories in `flex justify-end p-3` with `layout: "fullscreen"`. The owned preview now mirrors both, in story order. Not yet graded - capture never ran.diff --git a/.design-sync/previews/MobilePageActionsContent.tsx b/.design-sync/previews/MobilePageActionsContent.tsxindex a02dd17b60..b850f96146 100644--- a/.design-sync/previews/MobilePageActionsContent.tsx+++ b/.design-sync/previews/MobilePageActionsContent.tsx@@ -1,43 +1,84 @@import * as React from "react";+import {+ Badge,+ MobilePageActionsContent,+ Popover,+ PopoverTrigger,+} from "@langfuse/design-system";+import {+ History,LayoutDashboard,PencilIcon,+ Play,+ RefreshCw,+ Settings,SlidersHorizontal,} from "@langfuse/icons";+import { HeaderActionMenuRow } from "../../web/src/components/HeaderActionMenuRow";import { Button } from "../../web/src/components/ui/button";-import {- MobilePageActionsContent,- Popover,- PopoverTrigger,-} from "@langfuse/design-system";-// Mirrors mobile-page-actions-content.stories.tsx "Mixed page controls".-// Popover/PopoverTrigger come from the bundle so they share a context with the-// bundled MobilePageActionsContent (it renders the ui PopoverContent).+// Popover/PopoverTrigger come from the bundle so they share a context with the bundled MobilePageActionsContent.++/** MenuRows mirrors the "Menu rows" story. */+export const MenuRows = () => (+ <div className="flex justify-end p-3">+ <Popover defaultOpen>+ <PopoverTrigger asChild>+ <Button variant="outline">More actions</Button>+ </PopoverTrigger>+ <MobilePageActionsContent onCloseAutoFocus={() => {}}>+ <div className="flex flex-col items-stretch gap-0.5">+ <HeaderActionMenuRow+ label="Auto-analyze"+ icon={<Play size="base" color="default" />}+ badge={<Badge text="On" size="sm" />}+ />+ <HeaderActionMenuRow+ label="Regenerate topics"+ icon={<RefreshCw size="base" color="default" />}+ />+ <HeaderActionMenuRow+ label="History"+ icon={<History size="base" color="default" />}+ />+ <HeaderActionMenuRow+ label="Settings"+ icon={<Settings size="base" color="default" />}+ />+ </div>+ </MobilePageActionsContent>+ </Popover>+ </div>+);++/** MixedPageControls mirrors the "Mixed page controls" story. */export const MixedPageControls = () => (- <Popover defaultOpen>- <PopoverTrigger asChild>- <Button variant="outline">More actions</Button>- </PopoverTrigger>- <MobilePageActionsContent onCloseAutoFocus={() => {}}>- <div className="flex flex-col gap-1">- <span className="text-muted-foreground px-2 text-xs">Dashboard</span>- <Button variant="outline" className="w-full justify-start gap-2">- <LayoutDashboard size="base" color="default" />- Langfuse Home- </Button>- <Button variant="ghost" className="w-full justify-start gap-2">- <PencilIcon size="base" color="default" />- Edit dashboard- </Button>- </div>- <div className="flex flex-col gap-1 border-t pt-2">- <span className="text-muted-foreground px-2 text-xs">Data</span>- <Button variant="outline" className="w-full justify-start gap-2">- <SlidersHorizontal size="base" color="default" />- Environment and filters- </Button>- </div>- </MobilePageActionsContent>- </Popover>+ <div className="flex justify-end p-3">+ <Popover defaultOpen>+ <PopoverTrigger asChild>+ <Button variant="outline">More actions</Button>+ </PopoverTrigger>+ <MobilePageActionsContent onCloseAutoFocus={() => {}}>+ <div className="flex flex-col gap-1">+ <span className="text-muted-foreground px-2 text-xs">Dashboard</span>+ <Button variant="outline" className="w-full justify-start gap-2">+ <LayoutDashboard size="base" color="default" />+ Langfuse Home+ </Button>+ <Button variant="ghost" className="w-full justify-start gap-2">+ <PencilIcon size="base" color="default" />+ Edit dashboard+ </Button>+ </div>+ <div className="flex flex-col gap-1 border-t pt-2">+ <span className="text-muted-foreground px-2 text-xs">Data</span>+ <Button variant="outline" className="w-full justify-start gap-2">+ <SlidersHorizontal size="base" color="default" />+ Environment and filters+ </Button>+ </div>+ </MobilePageActionsContent>+ </Popover>+ </div>);