Skip to content

Refactor query statuses - #587

Merged
UsamaEquinorAFK merged 4 commits into
mainfrom
fixpending
Nov 26, 2025
Merged

Refactor query statuses#587
UsamaEquinorAFK merged 4 commits into
mainfrom
fixpending

Conversation

@UsamaEquinorAFK

Copy link
Copy Markdown
Contributor

No description provided.

@@ -1,25 +1,20 @@
import { SimulationStatus } from "@/hooks/useSimulationQueriesResult";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we were considering having this in some dto instead.. It doesn't feel good importing from a hook.. will do later


if (result.data) {
(data[result.data.experiment.name] ??= []).push(result.data.result);
statuses.push({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

having this separation does mean that technically the status will be populated in two different objects, as SimulationResults already has a status. This part is coming all the way from the backend, so we leave it as is.

The reason for separating them was to avoid having SimulationsResults with empty concentrations, and not having to repack things on the outside.

I kinda think it's a bit off to have the SimulationsResults have the status as part of it. Kinda; why make a SimulationResults object before there are any results?

@lars-petter-hauge

Copy link
Copy Markdown
Collaborator

just need some test fixing :)

@UsamaEquinorAFK
UsamaEquinorAFK merged commit acac5c8 into main Nov 26, 2025
7 checks passed
@UsamaEquinorAFK
UsamaEquinorAFK deleted the fixpending branch November 26, 2025 13:51
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