Skip to content

[DEV UI] Wrong metadata after adding example to multiple datasets #4846

@hugomurillomtz

Description

@hugomurillomtz

Describe the bug
When adding an example to two or more datasets, the metadata in the datasets table is wrong. The right number of examples that the datasets contain is not accurate, and netiher is the last edited date.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the traces table.
  2. Click on any trace record.
  3. Click Add to dataseet
  4. Select two or more datasets to add the example to.
  5. Click View in the snackbar.
  6. See the wrong information in the datasets that you added the example to (they are the first in the table). Pay close attention to the examples and last edited columns. The information is not accurate.

Expected behavior
It should show the right metadata: number or examples on the dataset, the right last edited date for all, etc.

Screenshots
https://github.com/user-attachments/assets/c68a5ace-bea2-44af-887c-bf2ef4e33a53

Additional context
The problem seems to be the switchMap in the updateEvalDataset method as that operator cancels the previous request. mergeMap seems to be more appropiate in this situation.

Metadata

Metadata

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions