Skip to content

Nl/add workflows to p99#74

Open
NatLeung96 wants to merge 37 commits into
mainfrom
nl/add-workflows-to-p99
Open

Nl/add workflows to p99#74
NatLeung96 wants to merge 37 commits into
mainfrom
nl/add-workflows-to-p99

Conversation

@NatLeung96

Copy link
Copy Markdown
Collaborator

This PR should allow a P99 ptychography workflow to be submitted from the P99 UI.

A new dashboard has been created, with bluesky and workflows moved to separate pages.

I also re-factored the directories which is why the number of files changed is quite high.

PS: I tried using the latest version of sci-react-ui but I kept getting an import error when running the tests.
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object

@NatLeung96
NatLeung96 requested a review from douglaswinter June 16, 2026 10:35
Comment thread apps/visr/.prettierrc

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.

Did you mean to update Visr's config?

@NatLeung96 NatLeung96 Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, I did not. I'm actually embarrassed that I never noticed that.

Comment thread apps/p99/helm/values.yaml Outdated
import { useQuery } from "@tanstack/react-query";
import type { AxiosError } from "axios";

export const UserAuthProvider = ({ children }: { children: ReactNode }) => {

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.

It should feel wrong copying source code from one app into another. The natural way to share code is to refactor that functionality into a package that both apps can use. If you must do it here, please open issues to clean up said code as we want to tackle this type of divergence early.

@NatLeung96 NatLeung96 Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I was expecting some flak for that. I was curious to know if you had additional thoughts on this approach. It does make sense if all the apps have a unified approach because they will need authentication. I'll submit an issue for a UserAuth package.

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.

Modern convention is for tests to live next to the source code rather than in a dedicated folder

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ok. I like having the tests in a dedicated folder as it's less clutter in the component folders, but I will respect the convention.

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.

Just so you are aware, since you are following the pattern that visr set: this is not the direction we are following. See instead how i15-1 uses app-shell (improvements are waiting to be merged, see branch dw/appshellimprovements).

@NatLeung96 NatLeung96 Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I did see the changes made to the i15-1 app (Very nice!). The aim right now is to just meet the MVP for CSXID, app-shell can be the next issue. I'm expecting this interface to change a lot which is also why I'm reluctant to add more tests for the newer components at this stage. I've now added app-shell.

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.

Unless you are testing behaviour again realistic network interactions (more like integration tests), I would recommend vitest stubs/mocks in unit tests over MSW.

@NatLeung96
NatLeung96 requested a review from douglaswinter June 17, 2026 13:55
@NatLeung96
NatLeung96 force-pushed the nl/add-workflows-to-p99 branch from 70dc96e to 36cf998 Compare July 6, 2026 07:58
@NatLeung96 NatLeung96 linked an issue Jul 6, 2026 that may be closed by this pull request
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.

p99: update the UI to use app-shell Implement/Adapt the workflow submission component from existing VISR.

2 participants