diff --git a/frontend/src/lib/stores.ts b/frontend/src/lib/stores.ts index f6d86cf..4cc5f0b 100644 --- a/frontend/src/lib/stores.ts +++ b/frontend/src/lib/stores.ts @@ -349,6 +349,17 @@ export async function saveProfile(name: string) { async function applyProfileVolumes(profile: PatchbayProfile) { if (!profile.volumes && !profile.mutes) return; const currentNodes = get_store_value(nodes); + + // Optimistically update store so sliders reflect new values immediately + nodes.update(ns => ns.map(n => { + const vol = profile.volumes?.[n.name]; + const mute = profile.mutes?.[n.name]; + if (vol !== undefined || mute !== undefined) { + return { ...n, ...(vol !== undefined ? { volume: vol } : {}), ...(mute !== undefined ? { mute } : {}) }; + } + return n; + })); + for (const n of currentNodes) { if (profile.volumes?.[n.name] !== undefined) { await setNodeVolume(n.id, profile.volumes[n.name]);