🪢 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(web): hoist the shared export-source test context helper (#16238)
Niklas Semmler57fd57de2b23
diff --git a/web/src/features/analytics-integrations/exportSource.clienttest.ts b/web/src/features/analytics-integrations/exportSource.clienttest.tsindex fddfca5202..7f84948a8d 100644--- a/web/src/features/analytics-integrations/exportSource.clienttest.ts+++ b/web/src/features/analytics-integrations/exportSource.clienttest.ts@@ -26,6 +26,16 @@ const PROJECT_PRE = new Date(LEGACY_BLOB_EXPORT_CUTOFF.getTime() - MS_PER_DAY);const PROJECT_POST = new Date(LEGACY_BLOB_EXPORT_CUTOFF.getTime() + MS_PER_DAY);const ROW_PRE = new Date(LEGACY_BLOB_EXPORTER_CUTOFF.getTime() - MS_PER_DAY);+// Self-hosted unless a case overrides it, so the two capability flags always+// come from the real builder rather than being hand-set per case.+const ctxFor = (+ writeMode: BlobExportWriteMode,+ over: Partial<+ Omit<ExportSourceContext, "enrichedAvailable" | "legacyWritesActive">+ > = {},+): ExportSourceContext =>+ buildExportSourceContext({ writeMode, isCloud: false, ...over });+const cloudPreCutoff: ExportSourceContext = {isCloud: true,enrichedAvailable: true,@@ -264,14 +274,6 @@ describe("shouldHideExportSourceSelector", () => {describe("write mode drives the settings-page selector", () => {const WRITE_MODES: BlobExportWriteMode[] = ["legacy", "dual", "events_only"];- const ctxFor = (- writeMode: BlobExportWriteMode,- over: Partial<- Omit<ExportSourceContext, "enrichedAvailable" | "legacyWritesActive">- > = {},- ): ExportSourceContext =>- buildExportSourceContext({ writeMode, isCloud: false, ...over });-const selectableValues = (ctx: ExportSourceContext) =>getExportSourceOptions(undefined, ctx).filter((o) => !o.unavailable)@@ -407,14 +409,6 @@ describe("write mode drives the settings-page selector", () => {// The pages consume only this composite, so the pieces being correct// individually is not enough — visibility and the default must agree.describe("getExportSourceFieldState", () => {- const ctxFor = (- writeMode: BlobExportWriteMode,- over: Partial<- Omit<ExportSourceContext, "enrichedAvailable" | "legacyWritesActive">- > = {},- ): ExportSourceContext =>- buildExportSourceContext({ writeMode, isCloud: false, ...over });-it.each<BlobExportWriteMode>(["legacy", "dual", "events_only"])("%s: a hidden selector always leaves a selectable default",(mode) => {