Skip to content

Commit 787018e

Browse files
AlexZ005claude
andcommitted
54-int: Add files check is pure (no read-only toast while a menu renders; state_unsafe_mutation in session-volume)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 4f713ca commit 787018e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/components/editors/Explorer.svelte‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5854,7 +5854,9 @@
58545854
function canAddFilesAt(key: string | null) {
58555855
if (key == null) return true;
58565856
const vol = volumeOf(key);
5857-
if (vol) return !sessionReadOnly(vol.volumeId);
5857+
// a PURE check: this runs inside menus and the empty-state template, where sessionReadOnly's
5858+
// toast is a state write (state_unsafe_mutation) -- the drop path keeps the toasting refusal
5859+
if (vol) return !isSessionVolumeId(vol.volumeId);
58585860
return activeLibraryFolderOf(key) !== null;
58595861
}
58605862
const addFilesItem = (target: string | null) => ({

0 commit comments

Comments
 (0)