generated from nhcarrigan/template
fix: restore permission modal reactivity by replacing array mutation with new array creation
Previously, pendingPermissions was mutated in-place via .push(), causing Svelte's reactivity chain to potentially receive the same array reference and skip re-rendering the PermissionModal. Switching to spread syntax guarantees a new reference on every update. Also removed $state() from PermissionModal's local variables to match the Svelte 4 reactive pattern used by other working components (Terminal), avoiding rune-mode signal equality short-circuits.
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
import { conversationsStore } from "$lib/stores/conversations";
|
||||
import { configStore } from "$lib/stores/config";
|
||||
|
||||
let permissions: PermissionRequest[] = $state([]);
|
||||
let permissions: PermissionRequest[] = [];
|
||||
let selectedPermissions = new SvelteSet<string>();
|
||||
let grantedToolsList: string[] = $state([]);
|
||||
let workingDirectory = $state("");
|
||||
let grantedToolsList: string[] = [];
|
||||
let workingDirectory = "";
|
||||
|
||||
conversationsStore.pendingPermissions.subscribe((perms) => {
|
||||
permissions = perms;
|
||||
|
||||
Reference in New Issue
Block a user