πͺ’ 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
feat(search-bar): make the grammar search bar GA on the v4 events tables (#14340)
Nikita Kabardinb10b01196c51
diff --git a/web/src/features/events/components/EventsTable.tsx b/web/src/features/events/components/EventsTable.tsxindex ea462cbfab..b425dc5702 100644--- a/web/src/features/events/components/EventsTable.tsx+++ b/web/src/features/events/components/EventsTable.tsx@@ -409,16 +409,17 @@ export default function ObservationsEventsTable({queryFilterOptions,);- // Grammar search bar (per-user Feature Preview opt-in): an ADDITIONAL editor- // that coexists with the facet sidebar and the two stay in sync (Datadog model).- // The sidebar's FilterState (+ the table's full-text search) remains the- // single source of truth β the bar reads from and writes to it. Only the- // legacy toolbar search field is replaced (full-text search β bare text and- // content:/input:/output: β goes inline in the bar); the sidebar and- // time/refresh controls stay.- const searchBarFlagEnabled = useSearchBarEnabled();+ // Grammar search bar: an ADDITIONAL editor that coexists with the facet+ // sidebar, and the two stay in sync. Generally available on the v4 events+ // tables (no longer a per-user Feature Preview opt-in β useSearchBarEnabled()+ // is now always true). The sidebar's FilterState (+ the table's full-text+ // search) remains the single source of truth β the bar reads from and writes+ // to it. Only the legacy toolbar search field is replaced (full-text search β+ // bare text and content:/input:/output: β goes inline in the bar); the+ // sidebar and time/refresh controls stay.+ const searchBarEnabled = useSearchBarEnabled();const searchBarMode =- searchBarFlagEnabled &&+ searchBarEnabled &&!hideControls &&!externalFilterState &&!peekContext &&diff --git a/web/src/features/feature-flags/available-flags.ts b/web/src/features/feature-flags/available-flags.tsindex a8984dd3e8..c3a66e50cd 100644--- a/web/src/features/feature-flags/available-flags.ts+++ b/web/src/features/feature-flags/available-flags.ts@@ -1,5 +1,9 @@export const availableFlags = ["inAppAgent",+ // TODO(remove ~2026-06-19): "searchBar" is retired β the grammar search bar+ // is now GA on the v4 events tables for everyone (see useSearchBarEnabled),+ // no longer a per-user Feature Preview opt-in. Kept as dead plumbing for a+ // safe rollback; drop once the GA rollout is confirmed stable."searchBar","templateFlag","excludeClickhouseRead",diff --git a/web/src/features/feature-previews/components/ControlledFeaturePreviewModal.tsx b/web/src/features/feature-previews/components/ControlledFeaturePreviewModal.tsxindex 71aaafd552..8df6b96f71 100644--- a/web/src/features/feature-previews/components/ControlledFeaturePreviewModal.tsx+++ b/web/src/features/feature-previews/components/ControlledFeaturePreviewModal.tsx@@ -85,15 +85,14 @@ export function ControlledFeaturePreviewModal({onToggle: onToggle("inAppAgent"),isToggling: isToggling("inAppAgent"),},- searchBar: {- enabled: user.featureFlags.searchBar === true,- // The bar renders on the new (v4) Observations and Traces tables, so flag it.- warningReason: user.v4BetaEnabled- ? undefined- : "The search bar appears on the new (v4) Observations and Traces tables. Turn on Fast (Preview) in the sidebar to use it after enabling this preview.",- onToggle: onToggle("searchBar"),- isToggling: isToggling("searchBar"),- },+ // The "Filter Search Bar" preview is retired β the bar is now generally+ // available on the v4 events tables for everyone (see useSearchBarEnabled),+ // so it no longer renders a tile here. The `searchBar` flag plumbing+ // (PreviewFlag type, PREVIEW_LABEL, registry entry, the userAccount+ // allowlist) is kept for now so a rollback is a one-line revert; restore+ // the `searchBar: { ... }` state entry to bring the tile back.+ // TODO(remove ~2026-06-19): delete the dead searchBar plumbing once the GA+ // rollout is confirmed stable β see useSearchBarEnabled for the full list.};return (diff --git a/web/src/features/feature-previews/components/FeaturePreviewModal.tsx b/web/src/features/feature-previews/components/FeaturePreviewModal.tsxindex d98a2a58f1..82c9e97339 100644--- a/web/src/features/feature-previews/components/FeaturePreviewModal.tsx+++ b/web/src/features/feature-previews/components/FeaturePreviewModal.tsx@@ -19,7 +19,11 @@ import filterSearchBarDarkIllustration from "../assets/filter-search-bar-dark.svimport filterSearchBarLightIllustration from "../assets/filter-search-bar-light.svg";/** Flags the Feature Preview modal can toggle. Keep in sync with the- * userAccount.setFeaturePreviewEnabled allowlist and available-flags.ts. */+ * userAccount.setFeaturePreviewEnabled allowlist and available-flags.ts.+ * NOTE: "searchBar" is retired (the bar is GA on the v4 events tables) and no+ * longer renders a tile β see ControlledFeaturePreviewModal. It is kept in the+ * type + registry below only as dead code for a safe rollback.+ * TODO(remove ~2026-06-19): drop "searchBar" here once GA is confirmed. */export type PreviewFlag = "inAppAgent" | "searchBar";type PreviewIllustration = {@@ -65,6 +69,10 @@ const PREVIEW_REGISTRY: PreviewRegistryItem[] = [alt: "Langfuse Assistant connects traces, scores, and prompts to answer project questions.",},},+ // TODO(remove ~2026-06-19): dead registry entry β "searchBar" is GA on the v4+ // events tables and no longer surfaced in the dialog (no state entry in+ // ControlledFeaturePreviewModal), so this is filtered out and never renders.+ // Kept for a safe rollback; delete with the rest of the searchBar plumbing.{flag: "searchBar",title: "Filter Search Bar",diff --git a/web/src/features/search-bar/README.md b/web/src/features/search-bar/README.mdindex 5ef2b8a352..145d2f17a9 100644--- a/web/src/features/search-bar/README.md+++ b/web/src/features/search-bar/README.md@@ -6,24 +6,30 @@ coexists with the sidebar and stays in sync with it. The facetsidebar's `FilterState` (+ the table's full-text search) remains the singlesource of truth; the bar reads from and writes to it. Only the legacy toolbarsearch field is replaced (full-text search goes inline in the bar).-Per-user **Feature Preview** opt-in. Based on the `langfuse-search-bar` prototype.+Generally available on the v4 events tables (no opt-in). Based on the+`langfuse-search-bar` prototype.## Enablement-- Per-user **Feature Preview** opt-in (sidebar user menu β Feature Preview β- "Filter Search Bar"), exactly like the Langfuse Assistant. Stored on- `user.featureFlags` (the `searchBar` flag, see- `features/feature-flags/available-flags.ts`); toggled via- `userAccount.setFeaturePreviewEnabled({ flag, enabled })`; read through the- session by `hooks/useSearchBarEnabled.ts`- (`session.user.featureFlags.searchBar`). No project metadata, no `project:update`- RBAC. The Feature Preview menu is Cloud-only, so the flag is Cloud-enableable.-- `EventsTable` activates the bar only when the user enabled the preview, the- viewer has the **v4 beta** (the bar only renders on the v4 Observations- table), and the table is a full-page surface+- **Generally available on the v4 events tables** β every user gets the bar; it+ is no longer a per-user Feature Preview opt-in. `hooks/useSearchBarEnabled.ts`+ now returns `true` for everyone, so the bar renders wherever the v4 events+ table does.+- `EventsTable` activates the bar when the table is a full-page surface(`!hideControls && !externalFilterState && !peekContext && !userId && !sessionId`).- Default off β zero changes for users who don't opt in. The Feature Preview- modal warns that the v4 beta is also required.+ The **v4 beta** gate is implicit: `EventsTable` only mounts on the v4+ Observations/Traces tables, so call sites still read as+ `isBetaEnabled && useSearchBarEnabled()`.+- **Rollout/rollback (temporary).** GA was shipped by force-on shim, not by+ deleting the opt-in: `useSearchBarEnabled` hard-returns `true` and the+ "Filter Search Bar" tile was removed from the Feature Preview modal, but the+ `searchBar` flag plumbing is intentionally **left as dead code** for a day or+ two so a rollback is a one-line revert. The pieces still present and marked+ `TODO(remove ~2026-06-19)`: the `searchBar` entry in+ `features/feature-flags/available-flags.ts`, the+ `userAccount.setFeaturePreviewEnabled` allowlist, and the modal's+ `PreviewFlag`/registry entry (`features/feature-previews/`). Once the rollout+ is confirmed stable, delete those and inline `true` at the call site.## Query language@@ -180,9 +186,9 @@ committedText ββresetToβββΆ store.draft ββ(type/pick/remove)ββsticky stack around the composer + toolbar). The time-range + refreshcontrols live in the toolbar row below the composer (next to the filtertoggle and views), via `DataTableToolbar`'s `timeRange`/`refreshConfig`- props β same as non-bar mode, not in the page header. The enablement toggle- lives in the shared Feature Preview modal (`features/feature-previews/`),- not in this feature.+ props β same as non-bar mode, not in the page header. The bar is now GA on+ the v4 tables, so there is no enablement toggle (the retired Feature Preview+ tile lived in `features/feature-previews/`; see Enablement above).## Integration (EventsTable)diff --git a/web/src/features/search-bar/hooks/useSearchBarEnabled.ts b/web/src/features/search-bar/hooks/useSearchBarEnabled.tsindex a24b14a21f..05f8f6dae6 100644--- a/web/src/features/search-bar/hooks/useSearchBarEnabled.ts+++ b/web/src/features/search-bar/hooks/useSearchBarEnabled.ts@@ -1,13 +1,25 @@-import { useSession } from "next-auth/react";-/**- * Whether the current user has opted into the grammar search bar via the- * Feature Preview menu (sidebar user dropdown β Feature Preview β "Filter- * Search Bar"). Per-user, stored on `user.featureFlags` (no project metadata,- * no admin RBAC). The bar still only renders on the v4 events tables, so call- * sites gate on `isBetaEnabled && useSearchBarEnabled()`.+ * Whether the grammar search bar should render. It is now **generally available+ * on the v4 events tables** β every user gets it, no longer a per-user Feature+ * Preview opt-in. The bar still only renders on the v4 Observations/Traces+ * tables, so call sites keep gating on `isBetaEnabled && useSearchBarEnabled()`+ * (EventsTable only mounts in v4 mode, so the v4 gate is implicit there).+ *+ * TODO(remove ~2026-06-19, after the GA rollout has been stable for a day or+ * two): this hook is now a force-on shim kept only so a rollback to the opt-in+ * is a one-line revert (restore the `useSession` read below). Once we're+ * confident, delete this hook and inline `true` at the call site, and remove+ * the dead `searchBar` Feature Preview plumbing:+ * - `features/feature-flags/available-flags.ts` ("searchBar")+ * - `server/api/routers/userAccount.ts` (setFeaturePreviewEnabled allowlist)+ * - `features/feature-previews/components/FeaturePreviewModal.tsx` (registry+ * entry + `PreviewFlag` type + filter-search-bar illustration assets)+ * - the `searchBar` rows in `userAccount.servertest.ts` /+ * `FeaturePreviewModal.stories.tsx`*/export function useSearchBarEnabled(): boolean {- const session = useSession();- return session.data?.user?.featureFlags.searchBar === true;+ return true;+ // Rollback to the per-user Feature Preview opt-in by restoring:+ // return useSession().data?.user?.featureFlags.searchBar === true;+ // (re-add `import { useSession } from "next-auth/react";` above).}diff --git a/web/src/server/api/routers/userAccount.ts b/web/src/server/api/routers/userAccount.tsindex 4606a20c8d..b5e2768871 100644--- a/web/src/server/api/routers/userAccount.ts+++ b/web/src/server/api/routers/userAccount.ts@@ -100,6 +100,10 @@ export const userAccountRouter = createTRPCRouter({z.object({// Allowlist of user-toggleable Feature Preview flags (the Feature// Preview modal). Keep in sync with the modal's preview registry.+ // TODO(remove ~2026-06-19): "searchBar" is retired β the bar is now GA+ // on the v4 events tables (see useSearchBarEnabled) and no longer has a+ // dialog tile. Kept in the allowlist as dead plumbing for a safe+ // rollback; drop once the GA rollout is confirmed stable.flag: z.enum(["inAppAgent", "searchBar"]),enabled: z.boolean(),}),