Skip to content

i15-1: display basic feedback from blueapi#44

Open
noemifrisina wants to merge 46 commits into
mainfrom
1539-i15_1-blueapi_feedback
Open

i15-1: display basic feedback from blueapi#44
noemifrisina wants to merge 46 commits into
mainfrom
1539-i15_1-blueapi_feedback

Conversation

@noemifrisina

Copy link
Copy Markdown
Collaborator

@jacob720
jacob720 marked this pull request as ready for review June 10, 2026 09:11

@DominicOram DominicOram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, some comments in code, additionally:

  • I can quite easily trigger multiple plans at once by just hitting the button twice. This is probably because of the fact we have to do two calls to BlueAPI to run the plan and we only disable the button on the second call. This should be fixed when BlueAPI moves away from the two calls in DiamondLightSource/blueapi#1326 but can we have an issue that acknowledges this?
  • We should move Abort and WorkerState into blueapi-query as they seem common. Also update the docs in there so that people know it's available

Comment thread apps/i15-1/src/routes/Robot.tsx
Comment thread packages/blueapi-ui/src/RunPlanButton.tsx Outdated
return new Promise((res) => setTimeout(res, ms));
};

const runTask = async (task_id: string) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should: Can we have some tests on the logic in this?

await startTask.mutateAsync(task_id).then(async (response) => {
if (response) {
let status = workerState.data;
while (status !== "IDLE" && status !== "ABORTING") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could: Can we pull these into constants somewhere?

};
setLoading(true);
await submitAndRunTask(taskRequest);
await submitAndRunTask(taskRequest).catch((error) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should: Can we have a test on this

@DominicOram DominicOram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, some more comments in code, I think there may have been a bad merge? Also, I still stand by wanting unit tests on some of the logic...

Comment thread apps/i15-1/src/routes/Robot.tsx Outdated
const theme = useTheme();
return (
<Box sx={{ ml: 5 }}>
<Stack direction={"column"} spacing={2}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Must: I think this is a duplicate of the existing card. Maybe a bad merge?

Comment thread apps/i15-1/src/routes/Robot.tsx Outdated
import { ReadOnlyPv } from "@atlas/pvws-config";
import { StatusCard } from "../components/StatusCard";
import { BlueapiWorkerState } from "../components/BlueapiWorkerState";
// import { AbortPlanButton } from "../components/AbortPlanButton";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Must: This is no longer used? I think we want it here, right?

@noemifrisina

Copy link
Copy Markdown
Collaborator Author

Added a few tests but after looking at some documentation, it seems that in order to be able to test the logic I would need to get those functions out of the component (can't test functions nested inside). Tbh, I would rather do that in a separate PR and get this functionality merged...

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