[Feat]: improve cascade entity selector UI#4630
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds 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). ChangesUnified evaluator & selection changes
Estimated code review effort Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
…child selection features
…ncluding suffix node support and improved evaluator name resolution.
…dling and metadata display
bc6454d to
1d1d109
Compare
Railway Preview Environment
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
web/packages/agenta-playground/src/state/atoms/playground.ts (1)
59-64:playgroundStoreAtomseeding 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) seedsplaygroundStoreAtomwith the createdscopedStoreviastore.set(playgroundStoreAtom, store).- No other
store.set(playgroundStoreAtom, ...)call sites were found, andweb/packages/agenta-playground/srcitself doesn’t create custom stores—soplaygroundController’sget(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 winClarify the
versionCountsemantics 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 ?? nullwithout validating that v0 is actually excluded. If v0 exists and the latest revision is v5, thenversionCountwill be 5 but there are actually 6 revisions (0, 1, 2, 3, 4, 5).Consider either:
- Renaming to
latestVersionto 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
📒 Files selected for processing (39)
web/oss/src/components/Evaluators/components/ConfigureEvaluator/atoms.tsweb/oss/src/components/Evaluators/components/EvaluatorTemplateDropdown.tsxweb/oss/src/components/Playground/Components/MainLayout/index.tsxweb/oss/src/components/Playground/Components/PlaygroundHeader/index.tsxweb/oss/src/components/WorkflowRevisionDrawerWrapper/index.tsxweb/oss/src/state/evaluator/evaluatorDrawerStore.tsweb/packages/agenta-annotation-ui/src/components/CreateQueueDrawer/EntityEvaluatorSelector.tsxweb/packages/agenta-annotation-ui/src/components/CreateQueueDrawer/index.tsxweb/packages/agenta-entities/src/shared/molecule/types.tsweb/packages/agenta-entities/src/workflow/index.tsweb/packages/agenta-entities/src/workflow/relations.tsweb/packages/agenta-entities/src/workflow/state/evaluatorUtils.tsweb/packages/agenta-entities/src/workflow/state/index.tsweb/packages/agenta-entities/src/workflow/state/store.tsweb/packages/agenta-entity-ui/src/selection/adapters/createAdapter.tsweb/packages/agenta-entity-ui/src/selection/adapters/createAdapterFromRelations.tsweb/packages/agenta-entity-ui/src/selection/adapters/createLevelFromRelation.tsweb/packages/agenta-entity-ui/src/selection/adapters/evaluatorLabelUtils.tsweb/packages/agenta-entity-ui/src/selection/adapters/types.tsweb/packages/agenta-entity-ui/src/selection/adapters/useEnrichedEvaluatorAdapter.tsweb/packages/agenta-entity-ui/src/selection/adapters/workflowRevisionRelationAdapter.tsweb/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/shared/AutoSelectHandler.tsxweb/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/types.tsweb/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/ListPopoverVariant.tsxweb/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/PopoverCascaderVariant.tsxweb/packages/agenta-entity-ui/src/selection/hooks/modes/useListPopoverMode.tsweb/packages/agenta-entity-ui/src/selection/hooks/utilities/useLevelData.tsweb/packages/agenta-entity-ui/src/selection/types.tsweb/packages/agenta-playground-ui/src/components/ExecutionItems/assets/ExecutionRow/shared.tsxweb/packages/agenta-playground-ui/src/components/WorkflowRevisionDrawer/index.tsweb/packages/agenta-playground-ui/src/components/WorkflowRevisionDrawer/store.tsweb/packages/agenta-playground/src/state/atoms/playground.tsweb/packages/agenta-playground/src/state/controllers/playgroundController.tsweb/packages/agenta-playground/src/state/execution/executionItems.tsweb/packages/agenta-playground/src/state/execution/executionRunner.tsweb/packages/agenta-playground/src/state/execution/selectors.tsweb/packages/agenta-playground/src/state/execution/webWorkerIntegration.tsweb/packages/agenta-playground/src/state/index.tsweb/packages/agenta-ui/src/components/selection/ListItem.tsx
|
Hi @ashrafchowdury , Thanks for the PR. Just a quick comment. The UX implementation of the design is wrong: |
… and improved UI interactions
…nd improve parent checkbox state handling in PopoverCascaderVariant
There was a problem hiding this comment.
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
📒 Files selected for processing (11)
web/oss/src/components/Playground/Components/PlaygroundHeader/index.tsxweb/packages/agenta-annotation-ui/src/components/CreateQueueDrawer/EntityEvaluatorSelector.tsxweb/packages/agenta-entities/src/workflow/state/evaluatorUtils.tsweb/packages/agenta-entity-ui/src/selection/adapters/evaluatorWorkflowMetaDescription.tsweb/packages/agenta-entity-ui/src/selection/adapters/useEnrichedEvaluatorAdapter.tsweb/packages/agenta-entity-ui/src/selection/adapters/workflowRevisionRelationAdapter.tsweb/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/shared/AutoSelectHandler.tsxweb/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/types.tsweb/packages/agenta-entity-ui/src/selection/components/UnifiedEntityPicker/variants/PopoverCascaderVariant.tsxweb/packages/agenta-entity-ui/src/selection/hooks/modes/autoSelectLatestChild.tsweb/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
|
@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 |

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