Skip to content

[Feat]: improve cascade entity selector UI#4630

Open
ashrafchowdury wants to merge 9 commits into
mainfrom
feat/improve-cascade-entity-selector-ui
Open

[Feat]: improve cascade entity selector UI#4630
ashrafchowdury wants to merge 9 commits into
mainfrom
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 12, 2026 11:36am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bee23245-2862-4f1f-8ef4-813055aa6111

📥 Commits

Reviewing files that changed from the base of the PR and between 238fd8e and 047b5f8.

📒 Files selected for processing (2)
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/shared/AutoSelectHandler.tsx
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/PopoverCascaderVariant.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/shared/AutoSelectHandler.tsx
  • web/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/PopoverCascaderVariant.tsx

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Multi-evaluator & multi-revision selection with bulk select/deselect and "Clear All"
    • Isolated playground mode for evaluator creation with scoped session and "stay" post-create option
    • Optional persistence of app selection when connecting evaluators
  • Improvements

    • Enhanced evaluator picker: parent/child grouping, selected-child chips, workflow metadata (versions/dates)
    • Configurable popover placement and child panel sizing
    • Selection UI: prefix/footer/suffix nodes and improved auto-select behavior

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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 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

Preview URL https://gateway-production-0ea3.up.railway.app/w
Project agenta-oss-pr-4630
Image tag pr-4630-db7b23c
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-06-12T09:50:00.996Z

@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

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 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

3 participants