From a9f619be7f8649c37da4ce2e8ec019430ad90a35 Mon Sep 17 00:00:00 2001 From: Sepehr Ramezani Date: Sun, 29 Mar 2026 10:51:54 +0200 Subject: [PATCH] fix(admin): remove revalidatePath to prevent combobox reset after save revalidatePath was causing the server component to re-render and potentially remount the client component, resetting all useState values. Since the client component already updates its local state optimistically after save, revalidatePath is unnecessary here. Also uninstalls agentation. Co-Authored-By: Claude Opus 4.5 --- keep-notes/app/actions/admin-settings.ts | 2 -- keep-notes/package-lock.json | 20 -------------------- keep-notes/package.json | 1 - 3 files changed, 23 deletions(-) diff --git a/keep-notes/app/actions/admin-settings.ts b/keep-notes/app/actions/admin-settings.ts index d3281ae..5a311e2 100644 --- a/keep-notes/app/actions/admin-settings.ts +++ b/keep-notes/app/actions/admin-settings.ts @@ -1,6 +1,5 @@ 'use server' -import { revalidatePath } from 'next/cache' import prisma from '@/lib/prisma' import { auth } from '@/auth' import { sendEmail } from '@/lib/mail' @@ -57,7 +56,6 @@ export async function updateSystemConfig(data: Record) { ) await prisma.$transaction(operations) - revalidatePath('/admin/settings') return { success: true } } catch (error) { console.error('Failed to update settings:', error) diff --git a/keep-notes/package-lock.json b/keep-notes/package-lock.json index 9967762..7a144d7 100644 --- a/keep-notes/package-lock.json +++ b/keep-notes/package-lock.json @@ -71,7 +71,6 @@ "@types/react": "^19", "@types/react-dom": "^19", "@vitest/coverage-v8": "^4.0.18", - "agentation": "^3.0.2", "prisma": "^5.22.0", "tailwindcss": "^4.0.0", "tsx": "^4.21.0", @@ -6520,25 +6519,6 @@ "acorn": "^8.14.0" } }, - "node_modules/agentation": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/agentation/-/agentation-3.0.2.tgz", - "integrity": "sha512-iGzBxFVTuZEIKzLY6AExSLAQH6i6SwxV4pAu7v7m3X6bInZ7qlZXAwrEqyc4+EfP4gM7z2RXBF6SF4DeH0f2lA==", - "dev": true, - "license": "PolyForm-Shield-1.0.0", - "peerDependencies": { - "react": ">=18.0.0", - "react-dom": ">=18.0.0" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } - } - }, "node_modules/ai": { "version": "6.0.141", "resolved": "https://registry.npmjs.org/ai/-/ai-6.0.141.tgz", diff --git a/keep-notes/package.json b/keep-notes/package.json index b4e851c..06a599b 100644 --- a/keep-notes/package.json +++ b/keep-notes/package.json @@ -81,7 +81,6 @@ "@types/react": "^19", "@types/react-dom": "^19", "@vitest/coverage-v8": "^4.0.18", - "agentation": "^3.0.2", "prisma": "^5.22.0", "tailwindcss": "^4.0.0", "tsx": "^4.21.0",