From 200b998485715fe7c9331bad4db1a389cda274e3 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Santos Souza de Miranda Date: Wed, 21 Jan 2026 12:54:57 -0300 Subject: [PATCH] chore: mark US-023 as complete and update progress log Co-Authored-By: Claude Opus 4.5 --- prd.json | 2 +- progress.txt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/prd.json b/prd.json index 08a1af4..6e66a93 100644 --- a/prd.json +++ b/prd.json @@ -408,7 +408,7 @@ "Verify in browser using dev-browser skill" ], "priority": 23, - "passes": false, + "passes": true, "notes": "" }, { diff --git a/progress.txt b/progress.txt index f430ba4..7cd62e4 100644 --- a/progress.txt +++ b/progress.txt @@ -351,3 +351,14 @@ - Each option needs a unique id (string) and label (string) per the ChoiceOption type - updateOptionLabel callback pattern: find option by id, map over options array to update matching one --- + +## 2026-01-21 - US-023 +- What was implemented: Add choice node from toolbar functionality +- Files changed: + - src/app/editor/[projectId]/FlowchartEditor.tsx - implemented handleAddChoice to create new choice nodes at viewport center +- **Learnings for future iterations:** + - handleAddChoice follows same pattern as handleAddDialogue: get viewport center, create node with nanoid, add to state + - Choice nodes must be initialized with 2 options (each with unique id via nanoid and empty label) + - Node data structure for choice: { prompt: '', options: [{ id, label }, { id, label }] } + - React Flow nodes are draggable by default after being added to state +---