feat: added reset experiment (in UI)

ref:N25B-400
This commit is contained in:
Pim Hutting
2026-01-16 14:25:26 +01:00
parent c4e3ab27b2
commit d8cae9f838
3 changed files with 40 additions and 18 deletions

View File

@@ -144,9 +144,9 @@ function VisualProgrammingUI() {
</ReactFlowProvider>
);
}
// currently outputs the prepared program to the console
function runProgramm() {
export function runProgramm() {
const phases = graphReducer();
const program = {phases}
console.log(JSON.stringify(program, null, 2));
@@ -170,7 +170,7 @@ function runProgramm() {
/**
* Reduces the graph into its phases' information and recursively calls their reducing function
*/
function graphReducer() {
export function graphReducer() {
const { nodes } = useFlowStore.getState();
return orderPhaseNodeArray(nodes.filter((n) => n.type == 'phase') as PhaseNode [])
.map((n) => {