InvokeAI/invokeai/frontend/web
psychedelicious 91ef24e15c fix(nodes,ui): fix missed/canvas temp images in gallery
Resolves two bugs introduced in #5106:

1. Linear UI images sometimes didn't make it to the gallery.

This was a race condition. The VAE decode nodes were handled by the socketInvocationComplete listener. At that moment, the image was marked as intermediate. Immediately after this node was handled, a LinearUIOutputInvocation, introduced in #5106, was handled by socketInvocationComplete. This node internally sets changed the image to not intermediate.

During the handling of that socketInvocationComplete, RTK Query would sometimes use its cache instead of retrieving the image DTO again. The result is that the UI never got the message that the image was not intermediate, so it wasn't added to the gallery.

This is resolved by refactoring the socketInvocationComplete listener. We now skip the gallery processing for linear UI events, except for the LinearUIOutputInvocation. Images now always make it to the gallery, and network requests to get image DTOs are substantially reduced.

2. Canvas temp images always went into the gallery

The LinearUIOutputInvocation was always setting its image's is_intermediate to false. This included all canvas images and resulted in all canvas temp images going to gallery.

This is resolved by making LinearUIOutputInvocation set is_intermediate based on `self.is_intermediate`. The behaviour now more or less mirroring the behaviour of is_intermediate on other image-outputting nodes, except it doesn't save the image again - only changes it.

One extra minor change - LinearUIOutputInvocation only changes is_intermediate if it differs from the image's current setting. Very minor optimisation.
2023-11-17 07:32:04 +11:00
..
.husky fix(ui): post-onnx fixes 2023-08-01 07:59:01 -04:00
.yarn/releases all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
config export theme nad move chakra to peer dep 2023-08-01 08:54:03 +10:00
dist revert frontend dist files to main 2023-11-10 17:57:18 -05:00
docs dummy commit to make github actions run 2023-06-04 22:55:35 +10:00
public/locales translationBot(ui): update translation (Chinese (Simplified)) 2023-11-16 18:23:41 +11:00
scripts fix(ui): simplify typegen script 2023-08-23 23:06:42 +10:00
src fix(nodes,ui): fix missed/canvas temp images in gallery 2023-11-17 07:32:04 +11:00
static/docs feat(api): serve app via route & add cache-control: no-store 2023-10-19 08:52:02 +11:00
tests Partial migration of UI to nodes API (#3195) 2023-04-22 13:10:20 +10:00
__init__.py Run python black 2023-07-28 09:46:44 -04:00
.eslintignore feat: workflow saving and loading 2023-08-24 21:42:32 +10:00
.eslintrc.js feat(ui): add eslint rule react/jsx-no-bind 2023-11-13 10:01:14 +11:00
.gitignore build(ui): add yalc to gitignore 2023-05-11 11:55:51 +10:00
.prettierignore fix(ui): prettier ignores translation files 2023-10-12 21:37:45 +11:00
.prettierrc.js feat(ui): migrate theming to chakra ui 2023-03-06 20:03:39 +11:00
.yarnrc all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
.yarnrc.yml all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
favicon.ico all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
index.html Prevent caching to ensure updated UI is shown 2023-10-04 22:32:00 +11:00
package.json chore(ui): update all deps 2023-11-10 09:50:00 +11:00
tsconfig.json feat: add multi-select to gallery 2023-08-03 11:46:59 +10:00
tsconfig.node.json feat(ui): improved node parsing 2023-06-26 11:53:54 +10:00
vite.config.ts build(ui): treeshake lodash via lodash-es 2023-04-28 21:56:43 +10:00
yarn.lock chore(ui): manually update vite to fix security issue in hoisted dep 2023-11-10 06:58:22 -08:00