Skip to content

Conversation

omkar-ethz
Copy link
Member

@omkar-ethz omkar-ethz commented Oct 17, 2025

Description

As the new backend did not implemet history[] in /v3/datasets, history was turned off / commented out in #2041. Uncommented and fixed type errors (some errors are automatically fixed by using the v4.24.5 of scicat-sdk-ts-angular which includes ObsoleteDatasetOutputDto with history field), as support for legacy history was added in SciCatProject/scicat-backend-next#2282

Motivation

Fixes:

Changes:

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: v4.24.5

Screenshot

history

Summary by Sourcery

Enable dataset history in the lifecycle tab by updating the SDK version, adding a custom type for history properties, reactivating the parseHistoryItems method, and updating the corresponding unit test.

New Features:

  • Restore and display dataset history entries in the lifecycle tab

Enhancements:

  • Upgrade scicat-sdk-ts-angular to v4.25.0 to include history in ObsoleteDatasetOutputDto
  • Add HistoryWithProperties type to support dynamic history fields in parsing logic

Tests:

  • Un-comment and adapt the unit test for parseHistoryItems in DatasetLifecycleComponent

@omkar-ethz omkar-ethz requested a review from a team October 17, 2025 11:16
@omkar-ethz omkar-ethz marked this pull request as ready for review October 17, 2025 11:23
@omkar-ethz omkar-ethz requested a review from abdimo101 October 17, 2025 11:23
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 there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `src/app/datasets/dataset-lifecycle/dataset-lifecycle.component.ts:69` </location>
<code_context>
    const dataset = this.dataset;

</code_context>

<issue_to_address>
**suggestion (code-quality):** Prefer object destructuring when accessing and using properties. ([`use-object-destructuring`](https://docs.sourcery.ai/Reference/Rules-and-In-Line-Suggestions/TypeScript/Default-Rules/use-object-destructuring))

```suggestion
    const {dataset} = this;
```

<br/><details><summary>Explanation</summary>Object destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.

From the [Airbnb Javascript Style Guide](https://airbnb.io/javascript/#destructuring--object)
</details>
</issue_to_address>

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.

Copy link
Member

@minottic minottic left a comment

Choose a reason for hiding this comment

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

LGTM, couple of questions

@omkar-ethz omkar-ethz merged commit 55e8676 into master Oct 20, 2025
7 checks passed
@omkar-ethz omkar-ethz deleted the history-table branch October 20, 2025 07:48
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.

3 participants