Skip to content

[Feat]: improve cascade entity selector UI#4630

Merged
bekossy merged 12 commits into
release/v0.103.5from
feat/improve-cascade-entity-selector-ui
Jun 15, 2026
Merged

[Feat]: improve cascade entity selector UI#4630
bekossy merged 12 commits into
release/v0.103.5from
feat/improve-cascade-entity-selector-ui

Conversation

@ashrafchowdury

Copy link
Copy Markdown
Contributor

Summary

Improved the cascade entity selector UI and aligned it with the design, introduced a few new functionalities and improved behaviour.

This improvement is only enabled on the playground evaluator selector ui

closes #4594

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jun 15, 2026 1:39pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c930bb2-d196-4efe-b5bf-fefe5df5b5c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds evaluator metadata atoms and name-resolution, extends selection adapter/types with suffix-node and fetched flags, implements multi-select popover cascader (chips, select-all, clear), adds auto-select resolver and disabled-child support, enables isolated drawer playground sessions with a scoped Jotai store, replaces default-store usage with playgroundStoreAtom, and adds small UX plumbing (persistSelection flag, popover placement, hook-based atom setter).

Changes

Unified evaluator & selection changes

Layer / File(s) Summary
All changes (combined checkpoint)
web/packages/agenta-entities/*, web/packages/agenta-entity-ui/*, web/packages/agenta-playground*, web/oss/src/components/*, web/packages/agenta-annotation-ui/*, web/packages/agenta-ui/*
Adds evaluator workflow metadata atoms and name-by-revision lookup, propagates isFetched in query states, extends selection adapter/types with getSuffixNode and isFetched, implements evaluator type-tag and metadata formatting, introduces pure auto-select resolver and hook updates (disabled-child support and explicit clear), implements popover-cascader multi-select UI (parent checkboxes, selected-child chips, select-all, clear-all, grouped headers, childPanelWidth, delayed create-new), exposes drawer store types/atoms for isolated-playground and initial-app selection, adds playground-scoped playgroundStoreAtom and replaces ad-hoc default-store usage, and small UX tweaks (persistSelection gating, Popover placement prop, useSetAtom wiring).

Estimated code review effort
🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • Agenta-AI/agenta#4553: Overlaps connectAppToEvaluatorAtom persist/run-on mode persistence behavior.
  • Agenta-AI/agenta#4474: Related changes to persisted app-selection/localStorage behavior in evaluator connection.
  • Agenta-AI/agenta#4274: Related drawer lifecycle and commit/callback refactors overlapping with isolated playground handling.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR claims to close #4594 (Implement new designs for evaluation creation modal) and aims to improve cascade entity selector UI aligned with Figma designs. However, feedback from mmabrouk indicates the UX implementation does not match expected behavior (row click should select latest version, version panel should be collapsed by default, expand only on chevron hover). The PR changes are extensive but alignment with the specific design requirements is unclear without detailed verification against the Figma design. Verify that the implementation matches the expected UX behaviors described in the issue feedback: immediate selection on row click, collapsed right panel by default, and expansion only on chevron hover. Compare current implementation against the provided Figma design link.
Out of Scope Changes check ❓ Inconclusive The PR includes extensive changes across multiple modules (evaluators, playground, entity-ui, adapters, selectors) that extend beyond a simple UI improvement. Changes include new atom structures, isolation/scoping mechanisms, metadata enrichment, and multi-select functionality. While these may support the UI improvement objective, it is unclear whether all structural changes are necessary and directly tied to the design requirements in #4594. Clarify the necessity of structural changes (e.g., isolated playground atoms, metadata enrichment atoms) in relation to the design requirements. Confirm that changes to evaluator drawer store, playground state management, and entity picker types are directly required by issue #4594 or if they represent scope creep.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title '[Feat]: improve cascade entity selector UI' is directly related to the main changeset, which updates the cascade/popover-cascader entity selector component and supporting infrastructure throughout the codebase.
Description check ✅ Passed The description is related to the changeset; it mentions improving the cascade entity selector UI with new functionalities and aligning it with design, which matches the actual code changes across multiple selector/evaluator UI components.
Docstring Coverage ✅ Passed Docstring coverage is 75.86% which is sufficient. The required threshold is 60.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/improve-cascade-entity-selector-ui

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ashrafchowdury ashrafchowdury force-pushed the feat/improve-cascade-entity-selector-ui branch from bc6454d to 1d1d109 Compare June 11, 2026 15:58
@ashrafchowdury ashrafchowdury marked this pull request as ready for review June 11, 2026 15:59
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request Frontend UI labels Jun 11, 2026
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Image tag pr-4630-d79c365
Status Failed
Railway logs Open logs
Logs View workflow run
Updated at 2026-06-15T13:47:10.010Z

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
web/packages/agenta-playground/src/state/atoms/playground.ts (1)

59-64: playgroundStoreAtom seeding is already handled for the isolated playground store

  • The only scoped/Jotai createStore() path for the playground session (web/oss/src/components/WorkflowRevisionDrawerWrapper/index.tsx) seeds playgroundStoreAtom with the created scopedStore via store.set(playgroundStoreAtom, store).
  • No other store.set(playgroundStoreAtom, ...) call sites were found, and web/packages/agenta-playground/src itself doesn’t create custom stores—so playgroundController’s get(playgroundStoreAtom) reads from the correct scoped store in the isolated session.
  • Optional: factor the seeding logic into a shared helper to prevent future isolated-session implementations from accidentally skipping it.
web/packages/agenta-entities/src/workflow/state/evaluatorUtils.ts (1)

258-267: ⚡ Quick win

Clarify the versionCount semantics in the interface docstring.

The comment states "Revisions are sequential and v0 is excluded from pickers, so the latest version number equals the revision count," but the implementation simply stores revision?.version ?? null without validating that v0 is actually excluded. If v0 exists and the latest revision is v5, then versionCount will be 5 but there are actually 6 revisions (0, 1, 2, 3, 4, 5).

Consider either:

  • Renaming to latestVersion to reflect what's actually stored, or
  • Updating the docstring to clarify that this is the latest version number, not necessarily the count of revisions, or
  • Adding explicit logic to calculate the true count by excluding v0 if the claim is important.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f244592-f31b-4029-9736-97e9d8f0c8f5

📥 Commits

Reviewing files that changed from the base of the PR and between bbc9d12 and 1d1d109.

📒 Files selected for processing (39)
  • web/oss/src/components/Evaluators/components/ConfigureEvaluator/atoms.ts
  • web/oss/src/components/Evaluators/components/EvaluatorTemplateDropdown.tsx
  • web/oss/src/components/Playground/Components/MainLayout/index.tsx
  • web/oss/src/components/Playground/Components/PlaygroundHeader/index.tsx
  • web/oss/src/components/WorkflowRevisionDrawerWrapper/index.tsx
  • web/oss/src/state/evaluator/evaluatorDrawerStore.ts
  • web/packages/agenta-annotation-ui/src/components/CreateQueueDrawer/EntityEvaluatorSelector.tsx
  • web/packages/agenta-annotation-ui/src/components/CreateQueueDrawer/index.tsx
  • web/packages/agenta-entities/src/shared/molecule/types.ts
  • web/packages/agenta-entities/src/workflow/index.ts
  • web/packages/agenta-entities/src/workflow/relations.ts
  • web/packages/agenta-entities/src/workflow/state/evaluatorUtils.ts
  • web/packages/agenta-entities/src/workflow/state/index.ts
  • web/packages/agenta-entities/src/workflow/state/store.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/createAdapter.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/createAdapterFromRelations.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/createLevelFromRelation.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/evaluatorLabelUtils.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/types.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/useEnrichedEvaluatorAdapter.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/workflowRevisionRelationAdapter.ts
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/shared/AutoSelectHandler.tsx
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/types.ts
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/ListPopoverVariant.tsx
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/PopoverCascaderVariant.tsx
  • web/packages/agenta-entity-ui/src/selection/hooks/modes/useListPopoverMode.ts
  • web/packages/agenta-entity-ui/src/selection/hooks/utilities/useLevelData.ts
  • web/packages/agenta-entity-ui/src/selection/types.ts
  • web/packages/agenta-playground-ui/src/components/ExecutionItems/assets/ExecutionRow/shared.tsx
  • web/packages/agenta-playground-ui/src/components/WorkflowRevisionDrawer/index.ts
  • web/packages/agenta-playground-ui/src/components/WorkflowRevisionDrawer/store.ts
  • web/packages/agenta-playground/src/state/atoms/playground.ts
  • web/packages/agenta-playground/src/state/controllers/playgroundController.ts
  • web/packages/agenta-playground/src/state/execution/executionItems.ts
  • web/packages/agenta-playground/src/state/execution/executionRunner.ts
  • web/packages/agenta-playground/src/state/execution/selectors.ts
  • web/packages/agenta-playground/src/state/execution/webWorkerIntegration.ts
  • web/packages/agenta-playground/src/state/index.ts
  • web/packages/agenta-ui/src/components/selection/ListItem.tsx

Comment thread web/packages/agenta-entity-ui/src/selection/hooks/modes/useListPopoverMode.ts Outdated
@mmabrouk

Copy link
Copy Markdown
Member

Hi @ashrafchowdury ,

Thanks for the PR. Just a quick comment. The UX implementation of the design is wrong:
1/ If I click on an evaluator it is selected (its latest version)
2/ per default the right bar with version is not expanded
3/only after I hover on the > in the right of the evaluator does the right side of the dropdown shows allowing you to select one or multiple versions

another bug i noticed
CleanShot 2026-06-11 at 18 55 20@2x

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4834fd64-060b-4496-b91a-1b3cced8715a

📥 Commits

Reviewing files that changed from the base of the PR and between 1d1d109 and 238fd8e.

📒 Files selected for processing (11)
  • web/oss/src/components/Playground/Components/PlaygroundHeader/index.tsx
  • web/packages/agenta-annotation-ui/src/components/CreateQueueDrawer/EntityEvaluatorSelector.tsx
  • web/packages/agenta-entities/src/workflow/state/evaluatorUtils.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/evaluatorWorkflowMetaDescription.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/useEnrichedEvaluatorAdapter.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/workflowRevisionRelationAdapter.ts
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/shared/AutoSelectHandler.tsx
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/types.ts
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/PopoverCascaderVariant.tsx
  • web/packages/agenta-entity-ui/src/selection/hooks/modes/autoSelectLatestChild.ts
  • web/packages/agenta-entity-ui/src/selection/hooks/modes/useListPopoverMode.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • web/packages/agenta-entity-ui/src/selection/adapters/workflowRevisionRelationAdapter.ts
  • web/packages/agenta-entities/src/workflow/state/evaluatorUtils.ts
  • web/packages/agenta-entity-ui/src/selection/hooks/modes/useListPopoverMode.ts
  • web/packages/agenta-entity-ui/src/selection/adapters/useEnrichedEvaluatorAdapter.ts
  • web/oss/src/components/Playground/Components/PlaygroundHeader/index.tsx
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/PopoverCascaderVariant.tsx

@mmabrouk

Copy link
Copy Markdown
Member

@ashrafchowdury this is still not the right behavior. Clicking on the row should select the evaluator last version as simple as that. Right now you need to click on the checkbox

@bekossy bekossy changed the base branch from main to release/v0.103.5 June 15, 2026 08:27
@ashrafchowdury ashrafchowdury marked this pull request as draft June 15, 2026 09:44
@ashrafchowdury ashrafchowdury marked this pull request as ready for review June 15, 2026 09:54
@ashrafchowdury ashrafchowdury force-pushed the feat/improve-cascade-entity-selector-ui branch from 0224577 to e280a3e Compare June 15, 2026 11:04
…ove-cascade-entity-selector-ui

# Conflicts:
#	web/packages/agenta-entities/src/workflow/index.ts
#	web/packages/agenta-entities/src/workflow/state/evaluatorUtils.ts
#	web/packages/agenta-entities/src/workflow/state/index.ts
@bekossy bekossy marked this pull request as draft June 15, 2026 13:37
@bekossy bekossy marked this pull request as ready for review June 15, 2026 13:38
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 15, 2026
@bekossy bekossy merged commit 3254cbb into release/v0.103.5 Jun 15, 2026
34 of 41 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 182a137ed1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

)
if (!rootNode || alreadyConnected) return

const workflowName = workflow?.name?.trim() || workflow?.slug?.trim() || "Evaluator"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the evaluator artifact name for new-node labels

When creating an evaluator from the playground, workflow here is the newly committed revision (WorkflowCommitResult.workflow is paired with newRevisionId), so deriving the connected node label/metadata from workflow.name can show the variant/default revision name instead of the evaluator artifact name; web/AGENTS.md explicitly says revision .name is dead for display. For UI/SDK-created revisions this can leave the new evaluator connected as default / vN or Evaluator / vN, so resolve the parent artifact name instead.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Frontend lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files. UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement new designs for evaluation creation modal

4 participants