InvokeAI/tests
skunkworxdark b2d79dc86c
feat:(model-manager) add sorting capabilities for models (#9024)
* feat(model-manager): add comprehensive sorting capabilities for models

dded the ability to sort models in the Model Manager by various attributes
including Name, Base, Type, Format, Size, Date Added, and Date Modified.
Supports both ascending and descending order.

- Backend: Added `order_by` and `direction` query parameters to the
  ``/api/v1/models`/` listing endpoint. Implemented case-insensitive
  sorting in the SQLite model records service.
- Frontend: Introduced `<ModelSortControl />` UI, updated Redux slices
  to manage sort state, removed client-side entity adapter sorting to
  respect server-side ordering, and added i18n localization keys.
- Tests: Added test coverage for SQL-based sorting on size and name.

* feat(model-manager): add comprehensive sorting capabilities for models

dded the ability to sort models in the Model Manager by various attributes
including Name, Base, Type, Format, Size, Date Added, and Date Modified.
Supports both ascending and descending order.

- Backend: Added `order_by` and `direction` query parameters to the
  ``/api/v1/models`/` listing endpoint. Implemented case-insensitive
  sorting in the SQLite model records service.
- Frontend: Introduced `<ModelSortControl />` UI, updated Redux slices
  to manage sort state, removed client-side entity adapter sorting to
  respect server-side ordering, and added i18n localization keys.
- Tests: Added test coverage for SQL-based sorting on size and name.

* ruff fix

* typegen fix

* typegen fix - this time without my custom nodes.

* another typegen fix

* refactor(ui): consolidate model filter and sort controls into a unified menu

-  Replaced separate `ModelSortControl` and `ModelTypeFilter` components with a single, unified "Filtering" dropdown menu.
- Organised filtering options into categorised submenus in the following order: Direction, Sort By, and Model Type.
- Enhanced submenu labels to display the currently active selection inline for quick reference.
- Improved visual alignment within menus by using hidden checkmarks on unselected items, ensuring consistent indentation across all options.
- Resolved styling and linting issues (unused variables, JSX bind warnings) within the new component.

* Lint fix

* Addresses PR feedback to use translation strings directly within `ORDER_BY_OPTIONS`.

Previously, sort keys and their translated labels were maintained in separate constructs (`ORDER_BY_OPTIONS` array and `ORDER_BY_LABELS` map). This refactor converts `ORDER_BY_OPTIONS` into an array of objects containing both the `key` and its corresponding `i18nKey`, creating a single source of truth.

This change:
- Simplifies the `SortBySubMenu` component by removing the redundant `ORDER_BY_LABELS` lookup map.
- Improves maintainability by ensuring developers only need to update one place when adding or modifying sort options.
- Reduces the risk of mismatched keys and labels.

---------

Co-authored-by: Jonathan <34005131+JPPhoto@users.noreply.github.com>
Co-authored-by: Alexander Eichhorn <alex@eichhorn.dev>
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
2026-04-20 20:08:09 -04:00
..
app feat:(model-manager) add sorting capabilities for models (#9024) 2026-04-20 20:08:09 -04:00
backend Handle mixed-dtype mismatches in autocast linear and conv wrappers (#9006) 2026-04-20 20:31:35 +00:00
fixtures test: clean up & fix tests 2024-03-01 10:42:33 +11:00
inpainting Rename default schedulers across the app 2023-05-12 03:44:20 +12:00
model_identification Feat[model support]: Qwen Image — full pipeline with edit, generate LoRA, GGUF, quantization, and UI (#9000) 2026-04-12 14:39:13 +02:00
test_model_manager prevent vae: '' from crashing model 2023-08-10 17:33:04 -04:00
__init__.py parent 9eed1919c2 2023-02-24 18:57:02 -08:00
conftest.py External models (Gemini Nano Banana & OpenAI GPT Image) (#8633) (#8884) 2026-04-20 17:13:26 +00:00
dangerously_run_function_in_subprocess.py tests: add util to run a function in separate process 2025-03-06 07:49:35 +11:00
dev_prompts.txt Added linux to the workflows (#463) 2022-09-16 17:46:57 -04:00
legacy_tests.sh Add back old dream.py as legacy_api.py 2022-10-12 20:35:56 -04:00
test_asyncio_shutdown.py Fix: Shut down the server with one keyboard interrupt (#94) (#8936) 2026-03-05 22:01:40 -05:00
test_config.py External models (Gemini Nano Banana & OpenAI GPT Image) (#8633) (#8884) 2026-04-20 17:13:26 +00:00
test_dangerously_run_function_in_subprocess.py tests: add util to run a function in separate process 2025-03-06 07:49:35 +11:00
test_docs_json_export.py Docs Overhaul (#8896) 2026-04-16 22:03:05 -04:00
test_docs.py update config docstring 2024-08-08 15:20:43 -04:00
test_graph_execution_state.py graph.py refactoring and If node optimization (#9030) 2026-04-09 21:38:40 -04:00
test_imports.py Set ordering 2025-03-25 19:21:14 +11:00
test_invocation_cache_memory.py tests: add invocation cache tests 2024-03-06 08:14:12 -05:00
test_item_storage_memory.py chore(item-storage): improve types 2024-02-03 07:34:06 -05:00
test_model_hash.py feat(mm): rename "blake3" to "blake3_multi" 2024-03-22 08:26:36 +11:00
test_model_search.py tidy(mm): ModelSearch cleanup 2024-03-10 12:09:47 +11:00
test_node_graph.py Add chaining to Collect node (#8933) 2026-03-24 01:39:52 +00:00
test_nodes.py Add chaining to Collect node (#8933) 2026-03-24 01:39:52 +00:00
test_object_serializer_disk.py tests: update tests/test_object_serializer_disk.py 2025-04-04 18:42:13 +11:00
test_path.py chore: ruff 2024-03-01 10:42:33 +11:00
test_profiler.py feat: add profiler util (#5601) 2024-01-31 10:51:57 +00:00
test_session_queue.py tidy(app): document & clean up batch prep logic 2025-02-26 21:04:23 +11:00
test_sqlite_migrator.py feat(multiuser mode): Support multiple isolated users on same backend (#8822) 2026-02-26 23:47:25 -05:00
validate_pr_prompt.txt fixes to env parsing, textual inversion & help text 2023-05-18 10:48:23 -04:00