Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6c32b05
fix(frontend): re-enable full-page playground for evaluator workflows
ardaerzin May 28, 2026
becb486
fix(frontend): address PR #4474 review comments
ardaerzin May 28, 2026
4eb3071
Merge branch 'main' into fe-fix/app-workflow-router-unification-regre…
ardaerzin May 28, 2026
d3bf2fe
Merge branch 'main' into fe-fix/app-workflow-router-unification-regre…
ardaerzin May 29, 2026
1ac6771
Merge branch 'release/v0.100.7' into fe-fix/app-workflow-router-unifi…
junaway May 29, 2026
12be989
Merge branch 'release/v0.100.7' into fe-fix/app-workflow-router-unifi…
ardaerzin May 31, 2026
f6d1100
Merge branch 'main' into fe-fix/app-workflow-router-unification-regre…
ardaerzin Jun 2, 2026
52e4ff4
fix(playground): filter root-node inputs by entity schema (#4525)
ardaerzin Jun 2, 2026
d925746
fix(playground-ui): dark-mode classes on evaluator info callout
ardaerzin Jun 2, 2026
970c18c
fix(playground-ui): readable dark-mode text on evaluator callout
ardaerzin Jun 2, 2026
1d8cddc
fix(playground): close depth>0 leak path for stale chat fields (#4525)
ardaerzin Jun 2, 2026
c4a2f3a
chore(playground): log when input-schema filter falls back or strips …
ardaerzin Jun 2, 2026
ea7da19
fix(playground): reconcile testcase rows when primary entity swaps (#…
ardaerzin Jun 2, 2026
96b2492
fix(playground): resolve input allow-list from inputPorts, not inputS…
ardaerzin Jun 3, 2026
d0442d3
fix(playground): clean shared testcase row before run, not just app i…
ardaerzin Jun 3, 2026
de548da
fix(playground): clean stale row on app swap + drop diagnostic logs (…
ardaerzin Jun 3, 2026
f0d60d1
feat(frontend): add Run-on mode selector to the evaluator playground
mmabrouk Jun 5, 2026
72c020f
Merge pull request #4553 from Agenta-AI/fe-feat/evaluator-run-on-mode
mmabrouk Jun 5, 2026
3a7df2c
fix(evaluator): guard local-draft ids in refs + filter non-playground…
ardaerzin Jun 5, 2026
b29b103
chore(evaluator): TEMP [B-repro] diagnostics for re-select-app QA bug
ardaerzin Jun 5, 2026
7312e6f
fix(evaluator): reflect reconnect in UI after disconnect (#4474 QA)
ardaerzin Jun 5, 2026
e2ae75c
fix(playground): strip non-UUID reference ids from invoke body (#4474…
ardaerzin Jun 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Reads evaluator info from playground nodes (URL-driven, no props needed).
*/

import {useMemo} from "react"
import {useCallback, useMemo} from "react"

import {workflowMolecule} from "@agenta/entities/workflow"
import {EntityPicker} from "@agenta/entity-ui"
Expand All @@ -15,11 +15,19 @@ import type {
WorkflowRevisionSelectionResult,
} from "@agenta/entity-ui/selection"
import {playgroundController} from "@agenta/playground"
import {Typography} from "antd"
import {useAtomValue} from "jotai"
import {X} from "@phosphor-icons/react"
import {Button, Tooltip, Typography} from "antd"
import {useAtomValue, useSetAtom} from "jotai"
import dynamic from "next/dynamic"

import {selectedAppLabelAtom} from "./atoms"
import {
disconnectAppFromEvaluatorAtom,
effectiveRunOnModeAtom,
runOnModeAtom,
selectedAppLabelAtom,
type RunOnMode,
} from "./atoms"
import RunOnSelector from "./RunOnSelector"

const TestsetDropdown = dynamic(
() => import("@/oss/components/Playground/Components/TestsetDropdown"),
Expand Down Expand Up @@ -71,10 +79,42 @@ const EvaluatorPlaygroundHeader: React.FC<EvaluatorPlaygroundHeaderProps> = ({

// Selected app label for display in the picker trigger
const selectedAppLabel = useAtomValue(selectedAppLabelAtom)
const disconnectApp = useSetAtom(disconnectAppFromEvaluatorAtom)
const handleDisconnect = useCallback(() => {
disconnectApp()
}, [disconnectApp])

// Run-on mode — drives which loaders are surfaced. A connected app forces
// "app" mode (see effectiveRunOnModeAtom); the stored mode only matters when
// nothing is connected.
const runOnMode = useAtomValue(effectiveRunOnModeAtom)
const setRunOnMode = useSetAtom(runOnModeAtom)
const handlePickRunOn = useCallback(
(next: RunOnMode) => {
if (next === "trace") return // disabled, not selectable
// Leaving "app" mode means dropping the connected app so the graph
// returns to standalone-evaluator shape.
if (next === "data") disconnectApp()
setRunOnMode(next)
},
[disconnectApp, setRunOnMode],
)
const isAppMode = runOnMode === "app"

// Check if we have an app node (depth-0 with a different entity than evaluator)
const hasAppSelected = nodes.some((n) => n.depth === 0 && n.entityId !== evaluatorEntityId)

// Footer inside the picker popover — only when an app is currently connected.
// Mirrors the "Disconnect all" pattern used by the evaluator picker in
// `Playground/Components/PlaygroundHeader/index.tsx`.
const popupFooter = hasAppSelected ? (
<div className="border-0 border-t border-solid border-[rgba(5,23,41,0.06)] p-2">
<Button size="small" danger className="w-full" onClick={handleDisconnect}>
Disconnect app
</Button>
</div>
) : undefined

return (
<div className="flex items-center justify-between gap-4 px-2.5 py-2 bg-[var(--ag-rgba-000-02)] border-0 border-b border-solid border-[var(--ag-rgba-051729-06)]">
<div className="flex shrink-0 items-center gap-2 pl-2">
Expand All @@ -83,15 +123,36 @@ const EvaluatorPlaygroundHeader: React.FC<EvaluatorPlaygroundHeaderProps> = ({
</Typography>
</div>

<div className="flex min-w-0 flex-1 items-center justify-end gap-2">
<EntityPicker<WorkflowRevisionSelectionResult>
variant="popover-cascader"
adapter={appWorkflowAdapter}
onSelect={onAppSelect}
size="small"
placeholder={selectedAppLabel ?? "Select app"}
/>
{hasAppSelected && <TestsetDropdown />}
<div className="flex min-w-0 flex-1 items-center justify-end gap-1">
<RunOnSelector mode={runOnMode} onPick={handlePickRunOn} />
{isAppMode && (
<EntityPicker<WorkflowRevisionSelectionResult>
variant="popover-cascader"
adapter={appWorkflowAdapter}
onSelect={onAppSelect}
size="small"
placeholder={selectedAppLabel ?? "Select app"}
popupFooter={popupFooter}
/>
)}
{isAppMode && hasAppSelected && (
<Tooltip title="Disconnect app">
<Button
type="text"
size="small"
icon={<X size={12} />}
onClick={handleDisconnect}
aria-label="Disconnect app"
/>
</Tooltip>
)}
{/* Testset is always connectable, with or without an upstream
* app. The earlier `hasAppSelected` gate matched the
* runDisabled gate we removed in T7 — same regression, same
* fix: standalone evaluator runs need a testset just as much
* as chained ones (the evaluator's prompt template variables
* still come from testcase row fields). */}
<TestsetDropdown />
</div>
</div>
)
Expand Down
Loading
Loading