From 77afc805e1bd254942e3519c69a6726304ed6edb Mon Sep 17 00:00:00 2001 From: JzoNg Date: Tue, 28 Apr 2026 14:42:51 +0800 Subject: [PATCH] fix(web): snippet draft sync --- .../header/nav/__tests__/index.spec.tsx | 13 +++++- web/app/components/header/nav/index.tsx | 2 + .../__tests__/use-nodes-sync-draft.spec.ts | 41 +++++++++++++++++++ .../snippets/hooks/use-nodes-sync-draft.ts | 32 +++++++++++---- web/app/components/workflow/types.ts | 2 +- 5 files changed, 80 insertions(+), 10 deletions(-) diff --git a/web/app/components/header/nav/__tests__/index.spec.tsx b/web/app/components/header/nav/__tests__/index.spec.tsx index 3dce8375b3..90d4cc4f73 100644 --- a/web/app/components/header/nav/__tests__/index.spec.tsx +++ b/web/app/components/header/nav/__tests__/index.spec.tsx @@ -201,6 +201,14 @@ describe('Nav Component', () => { expect(mockSetAppDetail).not.toHaveBeenCalled() }) + it('should not call setAppDetail from snippets segment', () => { + vi.mocked(useSelectedLayoutSegment).mockReturnValue('snippets') + render(