-
[OPIK-5942] [FE] fix: carry dataset type through "Open in Playground" navigation (#6294)
发布于
2026-04-16 08:25:57 +00:00 - [OPIK-5942] [FE] fix: carry dataset type through "Open in Playground" navigation
The "Open in Playground" flow loaded the dataset reference but never
synced the dataset type into the Playground store, so whatever type was
previously selected persisted. As a result, navigating from a test
suite page with a regular dataset preloaded (or vice versa) kept the
stale type and created the wrong experiment kind.Thread dataset type through both useLoadPlayground hooks (v1 and v2)
and call setDatasetType on every invocation. Update all dataset-aware
callers (UseDatasetDropdown, UseTestSuiteDropdown, TestSuiteItemsPage
toast, DatasetItemsPage save toast) to pass the correct type.
Prompt-only callers are unchanged — the hook defaults to null, which
clears any stale type.Implements OPIK-5942.
- fix(playground): pass correct dataset type from shared v2 dataset dropdown
UseDatasetDropdown is rendered from DatasetItemsPageHeader, which is
used for both regular dataset and test suite pages (v2/pages/DatasetItemsPage
and v2/pages/TestSuiteItemsPage both re-export the same shared page).
The dropdown hardcoded DATASET_TYPE.DATASET, so opening Playground from
a v2 test suite page wrongly set the type to DATASET and also gave the
impression the fix was incomplete when starting from Datasets.Thread isTestSuite through UseDatasetDropdown and pass
isTestSuite ? TEST_SUITE : DATASET, matching the working pattern used
by the v1 UseTestSuiteDropdown.- fix: make isTestSuite prop required in UseDatasetDropdown
下载附件