Skip to content

fix(Sample): refresh metadata view after adding or editing metadata keys#2288

Open
abdimo101 wants to merge 1 commit intomasterfrom
fix-sample-metadata-auto-update
Open

fix(Sample): refresh metadata view after adding or editing metadata keys#2288
abdimo101 wants to merge 1 commit intomasterfrom
fix-sample-metadata-auto-update

Conversation

@abdimo101
Copy link
Member

@abdimo101 abdimo101 commented Mar 25, 2026

Description

This PR makes sure changes made in Samples Metadata Edit are shown in Metadata View without reloading the page.

Motivation

Background on use case, changes needed

Fixes:

Please provide a list of the fixes implemented in this PR

  • Items added

Changes:

Please provide a list of the changes implemented by this PR

  • changes made

Tests included

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)

Documentation

  • swagger documentation updated [required]
  • official documentation updated [nice-to-have]

official documentation info

If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included

Backend version

  • Does it require a specific version of the backend
  • which version of the backend is required:

Summary by Sourcery

Ensure the sample metadata table view updates immediately when metadata is modified without requiring a page reload.

Bug Fixes:

  • Fix metadata view to refresh its displayed table data when the metadata input changes.

Tests:

  • Add an end-to-end test verifying that newly added metadata keys and values appear in the metadata view immediately after saving.

@abdimo101 abdimo101 requested a review from a team as a code owner March 25, 2026 14:39
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The new Cypress test relies on random sampleId generation, which can make failures harder to reproduce; consider using a deterministic ID or including the generated ID in test logging to ease debugging.
  • The metadata tab selection in the test uses visible labels ('Edit'/'View'), which can be brittle against copy changes; consider selecting tabs via more stable attributes such as data-cy or specific roles/indices.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new Cypress test relies on random `sampleId` generation, which can make failures harder to reproduce; consider using a deterministic ID or including the generated ID in test logging to ease debugging.
- The metadata tab selection in the test uses visible labels ('Edit'/'View'), which can be brittle against copy changes; consider selecting tabs via more stable attributes such as `data-cy` or specific roles/indices.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@abdimo101 abdimo101 requested a review from Junjiequan March 25, 2026 14:49
Copy link
Member

@Junjiequan Junjiequan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants