FN-5892: dedupe planning sessions and persist history deletion
Prevent duplicate planning-history rows and keep deletions visible only after the backend confirms persistence. - dedupe Planning Mode history by session id across initial loads, live updates, archive toggles, and draft creation - make deleteAiSession surface backend/content-type errors instead of silently succeeding on failed deletes - keep failed history deletions visible, refresh the list, and show an error toast when persistence fails - add dashboard tests covering session deduplication, delete API failures, and persistence-aware Planning Mode deletion behavior - document the history dedupe/delete semantics and add a patch changeset for @runfusion/fusion Files changed: .changeset/fn-5892-planning-history-fix.md | 5 + docs/dashboard-guide.md | 2 +- packages/dashboard/app/api/__tests__/deleteAiSession.test.ts | 54 +++++ packages/dashboard/app/api/legacy.ts | 41 +++- packages/dashboard/app/components/PlanningModeModal.tsx | 70 ++++--- packages/dashboard/app/components/__tests__/PlanningModeModal.autosize.test.tsx | 11 + packages/dashboard/app/components/__tests__/PlanningModeModal.dedupeSessionsById.test.ts | 44 ++++ packages/dashboard/app/components/__tests__/PlanningModeModal.initial.test.tsx | 11 + packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx | 226 ++++++++++++++++++++- packages/dashboard/app/components/__tests__/PlanningModeModal.test-helpers.ts | 1 + 10 files changed, 439 insertions(+), 26 deletions(-) Fusion-Task-Id: FN-5892 Fusion-Task-Lineage: 7453bc34-6d57-4d67-ac92-8fb50084fbee
This commit is contained in:
5
.changeset/fn-5892-planning-history-fix.md
Normal file
5
.changeset/fn-5892-planning-history-fix.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
Fix Planning Mode session history so duplicate AI-session rows are collapsed by session id and deleting a history entry only succeeds when the server-side delete persists.
|
||||
Reference in New Issue
Block a user