-
[OPIK-6845] [FE] Decouple dataset & metrics selection in playground (#7309)
发布于
2026-07-03 11:23:36 +00:00 - [OPIK-6845] [FE] Decouple dataset & metrics selection in playground
Replace the Run experiment modal with an inline header control: an entry
menu (Dataset / Test suite) that opens coupled, independent dataset and
metrics dropdowns with live selection and an X to clear. Test suites show
only a right-aligned selector (no metrics).- New RunExperimentControl; remove RunExperimentDialog + selectDefaultType
- DatasetVersionSelectBox: segment variant, inline latest-version + tags,
reduced height, "New dataset/test suite", SVG empty state, autofocus search - MetricSelector: count-chip trigger, metrics empty state, in-place rule
dialog; extract tri-state selection logic (+ unit tests) - Shared: SearchInput ref + disableDebounce; FiltersButton size prop;
TooltipWrapper hoverOnly (no focus-open); TOOLTIP_DELAY_DURATION constant - OnlineEvaluationPage: resolve deep-linked editRule/cloneRule by id
- Run button shows "Run" until an experiment has run; first prompt color #6bdf93
- Revision: metrics default-to-all, in-place metric edit, dataset column hints
- Default metrics to all selected: restore null=all tri-state and materialize
to concrete ids once rules load so the run path scores with every metric - Auto-select a metric created from the playground metrics dropdown
- Restore dataset column-name hints in the metric dialog (create + in-place edit)
- Edit metrics in-place in the playground; remove the online-evaluation
deep-link and its by-id fallback - Don't pre-select metrics before a dataset is chosen
- Guard empty dataset name when building the experiment name prefix
- Revision 2: make metrics popover non-modal
The metrics popover auto-opens after selecting a dataset and, being modal,
its overlay blocked the adjacent Re-run button (broke playground-smoke E2E and
was poor UX). Make it non-modal so clicking Re-run works in one click. Also
move the lodash/toLower import into the external import group.- Revision 3: fix metrics counter jitter and stale search on dialog open
- Add tabular-nums to the "N of M selected" counter so toggling doesn't shift
text (proportional digits made 0/1 different widths) - Route openCreateDialog/openEditDialog closes through openChangeHandler so the
search filter resets when the create/edit dialog opens
下载附件