chore(frontend): filter out agent workflows from legacy flows#4876
Draft
ardaerzin wants to merge 2 commits into
Draft
chore(frontend): filter out agent workflows from legacy flows#4876ardaerzin wants to merge 2 commits into
ardaerzin wants to merge 2 commits into
Conversation
Agent workflows are not valid subjects for the legacy evaluation and playground-connect flows, so they should not be selectable there. Add a shared isAgentWorkflow predicate (flags.is_agent or the builtin agent URI) in @agenta/entities/workflow and apply it at four pickers: - new-evaluation app picker + counts (filterInvokableWorkflows) - playground add-variant browse (SelectVariant) - playground variant-swap browse (PlaygroundVariantConfigHeader) - evaluator-playground app connect (useEvaluatorRunControls) Use filterWorkflows rather than the adapter flags filter, which would wrongly drop workflows whose is_agent key is undefined.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
big-agentsintroduces the agent workflow type (flags.is_agent/ URIagenta:builtin:agent:v0). Agent workflows have their own playground and aren't runnable as legacy evaluation subjects, so they should not be selectable in the older flows. This PR hides them from those pickers.What changed
A shared pure predicate
isAgentWorkflow(entity)is added to@agenta/entities/workflow(detects viaflags.is_agentor the builtin agent URI) and applied at four selection points:filterInvokableWorkflowsinappWorkflowStore.ts. This narrowing only runs whenworkflowInvokableOnlyAtom=true, which only the new-evaluation flow sets — the app-management page leaves itfalse, so agents are still listed/managed there.SelectVariantdefault browse adapter.PlaygroundVariantConfigHeaderapp-only adapter.useEvaluatorRunControlsapp adapter.The agent's own playground picker is intentionally left untouched.
Why
filterWorkflowsand not the adapterflagsoptionThe adapter's
flagsfilter matchesflags[key] === valexactly, sois_agent: falsewould wrongly drop every workflow whoseis_agentkey isundefined. AfilterWorkflows: (w) => !isAgentWorkflow(w)predicate avoids that.Testing
@agenta/entities,@agenta/entity-ui,@agenta/playgroundbuild clean (tsc).SelectVarianterrors against the base via stash).