From 33b2475e67c1bc80a681e81c4b93c1545ae9835b Mon Sep 17 00:00:00 2001 From: Moheeb Zara Date: Tue, 4 Aug 2026 19:10:52 -0700 Subject: [PATCH] fix: revalidate /customize (not /settings) after customize-panel mutations The invites/onboarding/areas/roles/tiers admin panels moved to /customize, but their actions still revalidated the old /settings route, so the /customize Router Cache went stale after a write. Point them at /customize (keeping the other cross-page revalidations). Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/actions/areas.ts | 6 +++--- lib/actions/invites.ts | 6 +++--- lib/actions/onboarding.ts | 6 +++--- lib/actions/roles.ts | 12 ++++++------ lib/actions/tiers.ts | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/actions/areas.ts b/lib/actions/areas.ts index 0cdc6cf..56d6d0c 100644 --- a/lib/actions/areas.ts +++ b/lib/actions/areas.ts @@ -41,7 +41,7 @@ export async function createArea(formData: { if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') revalidatePath('/tasks') revalidatePath('/projects') revalidatePath('/ops') @@ -75,7 +75,7 @@ export async function updateArea(formData: { if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') revalidatePath('/tasks') revalidatePath('/projects') revalidatePath('/ops') @@ -103,7 +103,7 @@ export async function deleteArea(areaId: string) { if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') revalidatePath('/tasks') revalidatePath('/projects') revalidatePath('/ops') diff --git a/lib/actions/invites.ts b/lib/actions/invites.ts index 3c59720..643606a 100644 --- a/lib/actions/invites.ts +++ b/lib/actions/invites.ts @@ -81,7 +81,7 @@ export async function createInvite(input: { .single() if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { id: data.id, code: data.code } } @@ -143,7 +143,7 @@ export async function updateInvite(inviteId: string, updates: { .eq('space_id', member.space_id) if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } @@ -163,6 +163,6 @@ export async function deleteInvite(inviteId: string) { .eq('space_id', member.space_id) if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } diff --git a/lib/actions/onboarding.ts b/lib/actions/onboarding.ts index c8b3388..66fa861 100644 --- a/lib/actions/onboarding.ts +++ b/lib/actions/onboarding.ts @@ -56,7 +56,7 @@ export async function createOnboardingStep(input: { .single() if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { id: data.id } } @@ -93,7 +93,7 @@ export async function updateOnboardingStep(stepId: string, updates: { .eq('space_id', member.space_id) if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } @@ -115,7 +115,7 @@ export async function deleteOnboardingStep(stepId: string) { if (error) return { error: error.message } if (count === 0) return { error: 'Built-in steps cannot be deleted. Disable it instead.' } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } diff --git a/lib/actions/roles.ts b/lib/actions/roles.ts index 95b3aea..9a18537 100644 --- a/lib/actions/roles.ts +++ b/lib/actions/roles.ts @@ -39,7 +39,7 @@ export async function upsertRoleLabel(input: { }, { onConflict: 'space_id,role' }) if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } @@ -72,7 +72,7 @@ export async function createCustomRole(input: { .single() if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { id: data.id } } @@ -105,7 +105,7 @@ export async function updateCustomRole(roleId: string, updates: { .eq('space_id', member.space_id) if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } @@ -125,7 +125,7 @@ export async function deleteCustomRole(roleId: string) { .eq('space_id', member.space_id) if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } @@ -164,7 +164,7 @@ export async function assignCustomRole(memberId: string, customRoleId: string) { if (error) return { error: error.message } revalidatePath('/members') - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } @@ -185,6 +185,6 @@ export async function unassignCustomRole(memberId: string, customRoleId: string) if (error) return { error: error.message } revalidatePath('/members') - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } diff --git a/lib/actions/tiers.ts b/lib/actions/tiers.ts index e2f333d..2184479 100644 --- a/lib/actions/tiers.ts +++ b/lib/actions/tiers.ts @@ -39,7 +39,7 @@ export async function createTier(input: { .single() if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { id: data.id } } @@ -76,7 +76,7 @@ export async function updateTier(tierId: string, updates: { .eq('space_id', member.space_id) if (error) return { error: error.message } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } } @@ -98,6 +98,6 @@ export async function deleteTier(tierId: string) { if (error) return { error: error.message } if (count === 0) return { error: 'Cannot delete a built-in tier. Archive it instead.' } - revalidatePath('/settings') + revalidatePath('/customize') return { success: true as const } }