Skip to content

[ux] Add metadata changes to sample history#5617

Merged
StephenHulme merged 13 commits intodevelopfrom
sh51/add-metadata-changes-to-sample-events
Mar 30, 2026
Merged

[ux] Add metadata changes to sample history#5617
StephenHulme merged 13 commits intodevelopfrom
sh51/add-metadata-changes-to-sample-events

Conversation

@StephenHulme
Copy link
Copy Markdown
Contributor

@StephenHulme StephenHulme commented Mar 17, 2026

Allows tracking changes made to sample metadata

Changes proposed in this pull request

  • Add new SampleMetadataEvent created with updated_sample_metadata!
    • Changes are stored as a json dictionary in the events table
  • Make rendering of history pages and events more consistent across models
  • Show timestamps in event rendering
  • Render a SampleMetadataEvent using a dedicated diff partition
  • Refactor SamplesController#update

Before:
Screenshot 2026-03-18 at 11 21 44

After:
Screenshot 2026-03-18 at 11 23 04

Edit:
Screenshot 2026-03-18 at 11 24 41

Event created:
Screenshot 2026-03-18 at 11 25 10

Sample manifest updated:
Screenshot 2026-03-18 at 11 39 20

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

@StephenHulme StephenHulme changed the base branch from develop to sh51/accessioning-changes March 17, 2026 16:03
@StephenHulme StephenHulme added the UX Improves user experience label Mar 17, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 88.63636% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.25%. Comparing base (7dacd95) to head (d5a46e1).
⚠️ Report is 14 commits behind head on develop.

Files with missing lines Patch % Lines
app/controllers/samples_controller.rb 75.00% 4 Missing ⚠️
app/helpers/histories_helper.rb 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5617      +/-   ##
===========================================
+ Coverage    87.22%   87.25%   +0.02%     
===========================================
  Files         1461     1463       +2     
  Lines        33022    33056      +34     
  Branches      3475     3481       +6     
===========================================
+ Hits         28805    28842      +37     
+ Misses        4196     4193       -3     
  Partials        21       21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@StephenHulme StephenHulme self-assigned this Mar 18, 2026
Base automatically changed from sh51/accessioning-changes to develop March 18, 2026 15:39
Copy link
Copy Markdown
Contributor

@BenTopping BenTopping left a comment

Choose a reason for hiding this comment

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

Looks good to me, nice quality of life improvement 👍
N.B haven't pulled down and tested altered views.

Comment thread app/views/receptacles/history.html.erb
@StephenHulme StephenHulme merged commit fcef57d into develop Mar 30, 2026
28 checks passed
@StephenHulme StephenHulme deleted the sh51/add-metadata-changes-to-sample-events branch March 30, 2026 10:15
StephenHulme added a commit that referenced this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UX Improves user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants