+
({
width={1200}
className={classes.modalContainer}
confirmLoading={submitLoading}
+ okButtonProps={{"data-tour": "run-eval-confirm"}}
styles={{
container: {
height: 700,
diff --git a/web/oss/src/components/pages/observability/components/ObservabilityHeader/index.tsx b/web/oss/src/components/pages/observability/components/ObservabilityHeader/index.tsx
index 94dfc107fd..49f83afabf 100644
--- a/web/oss/src/components/pages/observability/components/ObservabilityHeader/index.tsx
+++ b/web/oss/src/components/pages/observability/components/ObservabilityHeader/index.tsx
@@ -416,6 +416,7 @@ const ObservabilityHeader = ({
icon={}
disabled={traces.length === 0 || selectedRowKeys.length === 0}
tooltipProps={{title: "Add to testset"}}
+ data-tour="create-testset-button"
/>
>
) : null}
@@ -480,6 +481,7 @@ const ObservabilityHeader = ({
onClick={() => getTestsetTraceData()}
icon={}
disabled={traces.length === 0 || selectedRowKeys.length === 0}
+ data-tour="create-testset-button"
>
Add to testset
diff --git a/web/oss/src/components/pages/observability/components/ObservabilityTable/index.tsx b/web/oss/src/components/pages/observability/components/ObservabilityTable/index.tsx
index cfd41c9cc1..0aa5e0d2b8 100644
--- a/web/oss/src/components/pages/observability/components/ObservabilityTable/index.tsx
+++ b/web/oss/src/components/pages/observability/components/ObservabilityTable/index.tsx
@@ -173,6 +173,9 @@ const ObservabilityTable = () => {
setSelectedRowKeys(keys)
},
columnWidth: 48,
+ getCheckboxProps: () => ({
+ "data-tour": "trace-checkbox",
+ }),
}
const showTableLoading = isLoading && traces.length === 0
@@ -262,6 +265,7 @@ const ObservabilityTable = () => {
setSpanParam(undefined)
}
},
+ "data-tour": "trace-row",
})}
components={{
header: {
diff --git a/web/oss/src/hooks/usePlaygroundNavigation.ts b/web/oss/src/hooks/usePlaygroundNavigation.ts
index 2ece0a4bdc..d5ac351e5d 100644
--- a/web/oss/src/hooks/usePlaygroundNavigation.ts
+++ b/web/oss/src/hooks/usePlaygroundNavigation.ts
@@ -1,10 +1,11 @@
import {useCallback} from "react"
-import {useSetAtom} from "jotai"
+import {message} from "antd"
+import {useAtomValue, useSetAtom} from "jotai"
import {useAppId} from "@/oss/hooks/useAppId"
import useURL from "@/oss/hooks/useURL"
-import {recentAppIdAtom} from "@/oss/state/app/atoms/fetcher"
+import {appsQueryAtom, recentAppIdAtom} from "@/oss/state/app/atoms/fetcher"
import {useAppNavigation} from "@/oss/state/appState"
interface VariantLike {
@@ -54,11 +55,23 @@ export const usePlaygroundNavigation = () => {
const appId = useAppId()
const {push} = useAppNavigation()
const {baseAppURL} = useURL()
+ const appsQuery = useAtomValue(appsQueryAtom)
+ const recentAppId = useAtomValue(recentAppIdAtom)
const setRecentAppId = useSetAtom(recentAppIdAtom)
const goToPlayground = useCallback(
(target?: PlaygroundTarget, options?: GoToPlaygroundOptions) => {
- const resolvedAppId = options?.appId ?? appId
+ let resolvedAppId = options?.appId ?? appId ?? recentAppId ?? null
+ const apps = appsQuery?.data ?? []
+
+ if (!resolvedAppId && appsQuery?.isSuccess) {
+ if (apps.length === 0) {
+ message.info("Create an application to explore the playground.")
+ return
+ }
+ resolvedAppId = apps[0]?.app_id ?? null
+ }
+
if (!resolvedAppId) return
const selectedKeys = Array.from(
new Set(
@@ -69,6 +82,8 @@ export const usePlaygroundNavigation = () => {
)
if (options?.appId) {
setRecentAppId(options.appId)
+ } else if (!appId && resolvedAppId && resolvedAppId !== recentAppId) {
+ setRecentAppId(resolvedAppId)
}
const querySuffix =
selectedKeys.length > 0
@@ -77,7 +92,7 @@ export const usePlaygroundNavigation = () => {
push(`${baseAppURL}/${resolvedAppId}/playground${querySuffix}`)
},
- [appId, baseAppURL, push, setRecentAppId],
+ [appId, appsQuery, baseAppURL, push, recentAppId, setRecentAppId],
)
return {goToPlayground}
diff --git a/web/oss/src/lib/helpers/dynamicEnv.ts b/web/oss/src/lib/helpers/dynamicEnv.ts
index f26a912f2c..461bf3ea47 100644
--- a/web/oss/src/lib/helpers/dynamicEnv.ts
+++ b/web/oss/src/lib/helpers/dynamicEnv.ts
@@ -34,7 +34,6 @@ export const processEnv = {
NEXT_PUBLIC_AGENTA_AUTH_EMAIL_ENABLED: process.env.NEXT_PUBLIC_AGENTA_AUTH_EMAIL_ENABLED,
NEXT_PUBLIC_AGENTA_AUTH_OIDC_ENABLED: process.env.NEXT_PUBLIC_AGENTA_AUTH_OIDC_ENABLED,
NEXT_PUBLIC_AGENTA_SENDGRID_ENABLED: process.env.NEXT_PUBLIC_AGENTA_SENDGRID_ENABLED,
- NEXT_PUBLIC_ENABLE_WALKTHROUGHS: process.env.NEXT_PUBLIC_ENABLE_WALKTHROUGHS,
NEXT_PUBLIC_LOG_APP_ATOMS: "true",
// process.env.NEXT_PUBLIC_LOG_APP_ATOMS,
NEXT_PUBLIC_ENABLE_ATOM_LOGS: "true",
diff --git a/web/oss/src/lib/onboarding/index.ts b/web/oss/src/lib/onboarding/index.ts
index f3fb881048..72937fa339 100644
--- a/web/oss/src/lib/onboarding/index.ts
+++ b/web/oss/src/lib/onboarding/index.ts
@@ -19,8 +19,10 @@ export {
onboardingWidgetExpandedSectionsAtom,
onboardingWidgetStatusAtom,
onboardingWidgetUIStateAtom,
+ onboardingWidgetActivationAtom,
recordWidgetEventAtom,
setOnboardingWidgetConfigAtom,
+ setOnboardingWidgetActivationAtom,
setWidgetSectionExpandedAtom,
hasSeenCloseTooltipAtom,
openWidgetAtom,
diff --git a/web/oss/src/lib/onboarding/widget/config.ts b/web/oss/src/lib/onboarding/widget/config.ts
index 97ccacaceb..ae52c67f3b 100644
--- a/web/oss/src/lib/onboarding/widget/config.ts
+++ b/web/oss/src/lib/onboarding/widget/config.ts
@@ -21,12 +21,13 @@ export const defaultWidgetConfig: OnboardingWidgetConfig = {
description: "Run, commit, load a test set, and compare variants.",
activationHint: "playground-walkthrough",
completionEventIds: [
+ "playground_explored",
"playground_ran_prompt",
"playground_committed_change",
"playground_loaded_testset",
"playground_compared_side_by_side",
],
- completionMode: "all",
+ completionMode: "any",
},
],
},
@@ -86,6 +87,7 @@ export const defaultWidgetConfig: OnboardingWidgetConfig = {
id: "deploy-environment",
title: "Deploy to an environment",
description: "Open the deploy UI in registry.",
+ tourId: "deploy-prompt",
activationHint: "deploy-variant",
completionEventIds: ["variant_deployed"],
completionMode: "any",
@@ -118,6 +120,7 @@ export const defaultWidgetConfig: OnboardingWidgetConfig = {
title: "Annotate traces",
description: "Navigate to traces and annotate.",
activationHint: "trace-annotations",
+ tourId: "annotate-traces",
completionEventIds: ["trace_annotated"],
completionMode: "any",
},
@@ -126,6 +129,7 @@ export const defaultWidgetConfig: OnboardingWidgetConfig = {
title: "Create a test set from traces",
description: "Create a test set from trace data.",
activationHint: "trace-to-testset",
+ tourId: "testset-from-traces",
completionEventIds: ["testset_created_from_traces"],
completionMode: "any",
},
diff --git a/web/oss/src/lib/onboarding/widget/index.ts b/web/oss/src/lib/onboarding/widget/index.ts
index 1c81ae9598..06b6643341 100644
--- a/web/oss/src/lib/onboarding/widget/index.ts
+++ b/web/oss/src/lib/onboarding/widget/index.ts
@@ -8,11 +8,13 @@ export type {
export {
onboardingWidgetCompletionAtom,
onboardingWidgetConfigAtom,
+ onboardingWidgetActivationAtom,
onboardingWidgetEventsAtom,
onboardingWidgetExpandedSectionsAtom,
onboardingWidgetStatusAtom,
onboardingWidgetUIStateAtom,
recordWidgetEventAtom,
+ setOnboardingWidgetActivationAtom,
setOnboardingWidgetConfigAtom,
setWidgetSectionExpandedAtom,
hasSeenCloseTooltipAtom,
diff --git a/web/oss/src/lib/onboarding/widget/store.ts b/web/oss/src/lib/onboarding/widget/store.ts
index 9036d55eed..24cd146437 100644
--- a/web/oss/src/lib/onboarding/widget/store.ts
+++ b/web/oss/src/lib/onboarding/widget/store.ts
@@ -24,7 +24,7 @@ export const onboardingWidgetStatusAtom = atomWithStorage(
STORAGE_KEYS.WIDGET_UI,
{
- isOpen: true,
+ isOpen: false,
isMinimized: false,
},
)
@@ -45,6 +45,15 @@ export const onboardingWidgetConfigAtom = atom({
sections: [],
})
+export const onboardingWidgetActivationAtom = atom(null)
+
+export const setOnboardingWidgetActivationAtom = atom(
+ null,
+ (_get, set, activationHint: string | null) => {
+ set(onboardingWidgetActivationAtom, activationHint)
+ },
+)
+
export const onboardingWidgetEventsAtom = atomWithStorage>(
STORAGE_KEYS.COMPLETED_TASKS,
{},