gsxdsm
dab1569ac3
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
2026-06-02 12:42:04 -07:00
..
2026-04-25 09:09:31 -07:00
2026-05-31 20:50:09 -07:00
2026-05-31 21:08:41 -07:00
2026-05-31 23:24:53 -07:00
2026-06-01 01:42:19 -07:00
2026-06-01 13:20:55 -07:00
2026-06-01 13:03:20 -07:00
2026-06-01 13:33:56 -07:00
2026-06-01 14:07:46 -07:00
2026-06-01 16:55:56 -07:00
2026-06-01 17:15:11 -07:00
2026-06-01 17:52:12 -07:00
2026-06-01 01:30:34 -07:00
2026-06-01 01:37:25 -07:00
2026-06-01 04:47:19 -07:00
2026-06-01 05:15:14 -07:00
2026-06-01 03:23:10 -07:00
2026-06-01 05:39:01 -07:00
2026-06-01 07:53:56 -07:00
2026-06-01 09:05:18 -07:00
2026-06-01 08:13:36 -07:00
2026-06-01 19:40:28 -07:00
2026-06-01 16:24:21 -07:00
2026-06-01 20:19:37 -07:00
2026-06-01 18:52:28 -07:00
2026-06-01 23:39:20 -07:00
2026-06-01 23:01:26 -07:00
2026-06-01 23:37:03 -07:00
2026-06-02 00:07:07 -07:00
2026-06-01 23:55:20 -07:00
2026-06-02 07:46:38 -07:00
2026-06-02 09:02:48 -07:00
2026-06-02 10:07:08 -07:00
2026-06-02 10:29:34 -07:00
2026-06-02 12:42:04 -07:00
2026-06-01 08:23:02 -07:00
2026-06-01 21:55:10 -07:00
2026-06-02 09:20:31 -07:00