fix(FN-001): fix stale goal and unable to type in Plan Mission With AI modal (#36)
Split the combined useEffect that handled both auto-start and persisted-goal restoration into two separate effects: - Goal restoration: depends only on [isOpen], runs once on modal open - Auto-start: keeps handleStartInterview dep for initialGoalProp flow Previously the single effect depended on handleStartInterview, which recreates on every missionGoal change. Every keystroke re-triggered the effect, which read the stale persisted value from localStorage and overwrote user input — making the textarea uneditable and showing stale data from the last planned mission. Co-authored-by: AI <ai@runfusion.ai> Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
5
.changeset/fix-mission-interview-stale-goal-cant-type.md
Normal file
5
.changeset/fix-mission-interview-stale-goal-cant-type.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
Fix Plan Mission With AI modal: stale goal text and unable to type in textarea. The persisted-goal restoration effect depended on `handleStartInterview`, which recreates on every keystroke via `missionGoal` — causing the effect to re-fire and overwrite user input with stale localStorage data on each character typed.
|
||||
Reference in New Issue
Block a user