feat: added correct showing of goals with the description and can_fail

ref: N25B-434
This commit is contained in:
Björn Otgaar
2026-01-08 12:31:46 +01:00
parent e6f29a0f6b
commit c7ed3c8ef2
4 changed files with 41 additions and 11 deletions

View File

@@ -23,6 +23,7 @@ export default function PlanEditorDialog({
const [newActionType, setNewActionType] = useState<ActionTypes>("speech");
const [newActionGestureType, setNewActionGestureType] = useState<boolean>(true);
const [newActionValue, setNewActionValue] = useState("");
const [hasInteractedWithPlan, setHasInteractedWithPlan] = useState<boolean>(false)
const { setScrollable } = useFlowStore();
const nodes = useFlowStore().nodes;
@@ -56,6 +57,7 @@ export default function PlanEditorDialog({
const buildAction = (): Action => {
const id = crypto.randomUUID();
setHasInteractedWithPlan(true)
switch (newActionType) {
case "speech":
return { id, text: newActionValue, type: "speech" };
@@ -103,7 +105,7 @@ export default function PlanEditorDialog({
<div className={styles.planEditorLeft}>
{/* Left Side (Action Adder) */}
<h4>Add Action</h4>
{(!plan && description && draftPlan.steps.length === 0) && (<div className={styles.stepSuggestion}>
{(!plan && description && draftPlan.steps.length === 0 && !hasInteractedWithPlan) && (<div className={styles.stepSuggestion}>
<label> Filled in as a suggestion! </label>
<label> Feel free to change! </label>
</div>)}