perf(app): fix composer lag via buffered blob draft storage (#40207)

This commit is contained in:
Luke Parker 2026-08-03 19:49:08 +10:00 committed by GitHub
commit 6ff0adef22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 503 additions and 82 deletions

View file

@ -9,6 +9,7 @@ import {
type Locale,
type Platform,
PlatformProvider,
createDraftStore,
ServerConnection,
useCommand,
useWslServers,
@ -226,6 +227,13 @@ const createPlatform = (windowState: DesktopWindowState): Platform => {
},
storage,
draftStore: createDraftStore({
get: window.api.draftGet,
set: window.api.draftSet,
remove: window.api.draftDelete,
putBlob: (blob) => blob.arrayBuffer().then(window.api.draftBlobPut),
getBlob: (id) => window.api.draftBlobGet(id).then((data) => data && new Blob([data])),
}),
updater: {
state: updaterState,