Refactor of visual programming page to fully match the CB's program schema. Includes overhaul of UI elements for plan creation. #38
Reference in New Issue
Block a user
Delete Branch "refactor/nodes-match-functionality"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This merge revolves around the need to match the updated CB's definition of a program, also granting more functionality and access to the creation of programs.
In order to check this merge, first do the following:
dev. Make sure it's up to date with the requirements.feat/semantic-beliefs. This branch contains the most up-to-date definition of a program, to my knowledge. Make sure to have the UV correctly synced.npm i.Check the following list:
demo.npx jest (--maxWorkers 1)shows all tests pass. The newly added pages and added functionality should have a coverage of around 87% (all green).npx eslint --fixshows no linting errors.Now for the functionality. This involves also testing edge cases and any weird interactions:
Open the visual programming page and use the new
conditional norm, by adding a belief to a norm. This should:Object foundandEmotion recognizedbeliefs are NOT part of the current CB schema. We still test whether it works in the UI, but will disable them for the demo (probably).Open the visual programming page and use the
Plan Editing, which is used in both theGoalNode, as well as theTriggerNode.(Note that steps aren't automatically added whenever a plan is saved, so make sure to press
add stepbefore saving the plan.)edit planeverywhere, and without a plan, it showscreate planeverywhere.text. Clicking deletes the step from the current plan. This makes sense in this context.strikethroughOpen the visual programming page and use the
Goalnode.LLM Actionwith the title as step when creating a new plan.Will follow plan '<planname>' until goal is metif a goal is set.Try this plan oncewith a checkbox, this checkbox should ONLY be changeable whenever there is aLLM Actionin the current plan. This change should also be reflected in the output of the program.Open the visual programming page and use the
Triggernode.Finally, check the readability, documentation and structure of the code itself:
Additional comments:
This is a large merge, please use more people to be certain.
This does not include the functionality of creating a
Goalwithin aPlan. This require more thinking and discussing about its recursive implementation.This does not include inferred beliefs.
ref: N25B-408
changed the description
assigned to @9828273
changed the description
changed the description
marked the checklist item Show whether there is a condition attached in the UI. as completed
marked the checklist item Correctly show an unique UUID in the ID field when the program is run, in the console. as completed
marked the checklist item Correctly give only ONE condition whenever the program is run, when attached, in the console. as completed
marked the checklist item Correctly give the unique ID and either keyword/description/object/emotion as field alongside, in the console. as completed
marked the checklist item The outputted program is correctly parsed into the CB (VERY IMPORTANT). Note that the
Object foundandEmotion recognizedbeliefs are NOT part of the current CB schema. We still test whether it works in the UI, but will disable them for the demo (probably). as completedmarked the checklist item Creating/ Editing a plan is logical; having a plan shows
edit planeverywhere, and without a plan, it showscreate planeverywhere. as completedmarked the checklist item The dialog (the square html element used to create a plan) is clear, it makes sense how it would work without great insight. as completed
marked the checklist item The outputted program is correctly parsed into the CB (VERY IMPORTANT). Note that the
Object foundandEmotion recognizedbeliefs are NOT part of the current CB schema. We still test whether it works in the UI, but will disable them for the demo (probably). as incompletemarked the checklist item Selecting the different action types show the correct placeholder and value editor. The speech and llm actions are both strings, whereas the gesture value editor is a different element containing both a searchable single path, and scroll-able/ select-able tag. as completed
marked the checklist item Pressing 'Add Step' with a value selected/ typed shows this new step on the right hand side. It should mention the type of action and its value. as completed
marked the checklist item Hovering over the steps on the right shows
text. Clicking deletes the step from the current plan. This makes sense in this context. as completedstrikethroughmarked the checklist item Pressing cancel closes the editing of the plan without editing any plan/values. as completed
marked the checklist item Pressing confirm closes the editing of the plan and saves the edited plan as current plan. as completed
marked the checklist item Pressing reset closes the editing of the plan and completely resets the current plan- meaning there's no set plan. as completed
marked the checklist item All the buttons and functionalities make sense. as completed
marked the checklist item All the buttons, text, and elements both support light and dark mode (please i spent too much time on this). as completed
marked the checklist item The gesture value editor page is an extra element; make sure it makes sense and doesn't feel iffy. as completed
marked the checklist item In case the name of the goal is defined (e.g. "greet the user"), creating a plan should automatically suggest adding a
LLM Actionwith the title as step when creating a new plan. as completedmarked the checklist item The goal node should say
Will follow plan '<planname>' until goal is metif a goal is set. as completedmarked the checklist item There should be a line saying
Try this plan oncewith a checkbox, this checkbox should ONLY be changeable whenever there is aLLM Actionin the current plan. This change should also be reflected in the output of the program. as completedmarked the checklist item The trigger node should say whether the condition is set or not. as completed
marked the checklist item The trigger node should say if/ what plan is currently set. as completed
Scrolling in de suggested gesture box does not work when using the mouse scroll wheel. Instead, it zooms the visprog page itself in the background.
In a similar vein, dragging my mouse over any part of the plan creation dialog moves the visprog in the background. I came across this when attempting to reorder the steps in a plan, which might be useful to be able to do.
Gestures expect a different format in the backend, with a field
typeand a fieldname(see CB code).Not for this ticket, but good to note: subgoals are not implemented in this merge request, even though backend supports it. Might be for a future ticket, if time permits, as this would greatly enhance conversational flow (not having to run through entire plans for a single point of failure).
left review comments
added 1 commit
111400bd- fix: fixed scrolling behavior inside editor when plan editor window is openedCompare with previous version
requested review from @j.gerla
requested review from @k.marinus and removed review request for @j.gerla
added 1 commit
216b136a- chore: change goal text, correct output for gestures, allow step specific...Compare with previous version
resolved all threads
marked the checklist item The added code makes sense. as completed
marked the checklist item The added code is in the correct file (structure), meaning that there shouldn't be smaller files containing sub-parts of components. as completed
marked the checklist item The added code is correctly documented and commented. as completed
marked the checklist item The added code is readable (this is an important one, since I struggled making it as readable as possible in large HTML elements.) as completed
marked the checklist item The pipeline succeeds. as completed
marked the checklist item
npx jest (--maxWorkers 1)shows all tests pass. The newly added pages and added functionality should have a coverage of around 87% (all green). as completedGoal names are not sent correctly. I would expect them to use the text field, but instead, their name is something like "Goal Node".
marked the checklist item
npx eslint --fixshows no linting errors. as completedapproved this merge request
is approved as long as cb and ri integration is confirmed to be ok, as my install has some minor issues so I don't trust it for verifying correct integration with cb and ri
It is not yet, working with Bjorn to fix it currently
added 1 commit
508fa48b- fix: fix the goal node's "can_fail" to have the correct property.Compare with previous version
added 1 commit
f4745c73- refactor: update the goal node to have a description for plans that need to be...Compare with previous version
added 1 commit
46c2e0ed- chore: remove belief default textCompare with previous version
added 1 commit
08374ac2- chore: fix the tests with 2 linesCompare with previous version
added 1 commit
0b74763e- chore: diffewrent semantic placeholderCompare with previous version
added 9 commits
demo381cb0c8- Merge branch 'demo' into refactor/nodes-match-functionalityCompare with previous version
added 1 commit
c13fb7d3- refactor: change the belief nodes to include a description partCompare with previous version
resolved all threads
added 6 commits
demoe6b0d756- Merge branch 'demo' into refactor/nodes-match-functionalityd2d4dc12- fix: small fixes for mergeCompare with previous version
added 3 commits
demo442df423- Merge branch 'demo' into refactor/nodes-match-functionalityCompare with previous version
added 1 commit
4e07b957- chore: fix specific (new) handlesCompare with previous version
marked the checklist item This branch is up to date with
demo. as completedadded 1 commit
35ab95bd- chore: correct reducingCompare with previous version
marked the checklist item The outputted program is correctly parsed into the CB (VERY IMPORTANT). Note that the
Object foundandEmotion recognizedbeliefs are NOT part of the current CB schema. We still test whether it works in the UI, but will disable them for the demo (probably). as completedresolved all threads
approved this merge request
mentioned in commit
5385bd72b1