InvokeAI/invokeai/frontend/web
psychedelicious 6e869e6038 fix(ui): migrate redux state that has models
With the change to model identifiers from v3 to v4, if a user had persisted redux state with the old format, we could get unexpected runtime errors when rehydrating state if we try to access model attributes that no longer exist.

For example, the CLIP Skip component does this:

```ts
CLIP_SKIP_MAP[model.base].maxClip
```

In v3, models had a `base_type` attribute, but it is renamed to `base` in v4. This code therefore causes a runtime error:
- `model.base` is `undefined`
- `CLIP_SKIP_MAP[undefined]` is also undefined
- `undefined.maxClip` is a runtime error!

Resolved by adding a migration for the redux slices that have model identifiers. The migration simply resets the slice or the part of the slice that is affected, when it's simple to do a partial reset.

Closes #6000
2024-03-22 07:55:13 +11:00
..
.storybook fix(ui): update all components and logic to use enriched ModelIdentifierField 2024-03-10 11:03:38 +11:00
patches feat(ui): patch reselect to use lruMemoize only 2024-01-06 00:03:07 +11:00
public fix(ui): typo 2024-03-20 16:26:14 +11:00
scripts feat(ui): add script to clean translations 2024-03-14 11:38:29 +11:00
src fix(ui): migrate redux state that has models 2024-03-22 07:55:13 +11:00
static/docs feat(ui): update assets 2024-01-12 08:02:59 +11:00
__init__.py Run python black 2023-07-28 09:46:44 -04:00
.eslintignore fix(ui): fix workflow editor model selector, excise ONNX 2024-01-03 13:18:50 +11:00
.eslintrc.js build(ui): restore i18n eslint rule 2024-03-01 10:42:33 +11:00
.gitignore tests(ui): enable vitest type testing 2024-03-01 10:42:33 +11:00
.prettierignore fix(ui): fix workflow editor model selector, excise ONNX 2024-01-03 13:18:50 +11:00
.prettierrc.js chore(ui): use new prettier config 2024-01-28 19:57:53 +11:00
index.html feat(ui): update assets 2024-01-12 08:02:59 +11:00
knip.ts chore(ui): typegen, update knip config 2024-03-01 10:42:33 +11:00
package.json pkg(ui): do not fix knip in lint:fix script 2024-03-05 23:50:19 +11:00
pnpm-lock.yaml chore(ui): bump deps 2024-03-01 10:42:33 +11:00
README.md docs: move frontend docs to mkdocs 2024-03-13 22:43:20 +11:00
tsconfig.json chore(ui): lint 2024-03-01 10:42:33 +11:00
tsconfig.node.json fix(ui): fix package build 2024-03-01 10:42:33 +11:00
vite.config.mts build(ui): do not fail build on eslint error in dev mode 2024-03-01 10:42:33 +11:00