mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-26 00:03:59 +00:00
fix: synchronize raw app file operations through one effect
This commit is contained in:
@@ -1010,7 +1010,6 @@
|
||||
files = {}
|
||||
}
|
||||
delete files[path]
|
||||
setFilesInIframe(files)
|
||||
},
|
||||
listBackendRunnables: () => {
|
||||
return Object.entries(runnables).map(([key, runnable]) => ({
|
||||
@@ -2162,14 +2161,6 @@
|
||||
summary = entry.summary
|
||||
data = structuredClone($state.snapshot(entry.data))
|
||||
|
||||
// If the open document survives into the new files, use the combined message
|
||||
if (iframeDocument && isOpenableDocument(iframeDocument)) {
|
||||
// Use combined setFilesAndSelect message to avoid race condition
|
||||
setFilesAndSelectInIframe(entry.files, iframeDocument)
|
||||
} else {
|
||||
// Otherwise just set files normally
|
||||
setFilesInIframe(entry.files)
|
||||
}
|
||||
populateRunnables()
|
||||
} catch (error) {
|
||||
console.error('Failed to apply entry:', error)
|
||||
@@ -2367,13 +2358,7 @@
|
||||
class="h-full overflow-y-auto relative"
|
||||
>
|
||||
<RawAppSidebar
|
||||
bind:files={
|
||||
() => files,
|
||||
(newFiles) => {
|
||||
files = newFiles
|
||||
setFilesInIframe(newFiles ?? {})
|
||||
}
|
||||
}
|
||||
bind:files
|
||||
onSelectPath={handleSelectPath}
|
||||
onSelectRunnable={(key) => select({ kind: 'runnable', key })}
|
||||
onDeleteRunnable={deleteRunnable}
|
||||
|
||||
Reference in New Issue
Block a user