Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: list the Images workflows in the phone sidebar again (#11936)

oobabooga35ee14e9e357
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx
index 8229edffe21..4310f5e7747 100644
--- a/studio/frontend/src/components/app-sidebar.tsx
+++ b/studio/frontend/src/components/app-sidebar.tsx
@@ -2356,9 +2356,11 @@ export function AppSidebar() {
const inlineNavIds = sidebarNav
.filter((item) => navRowPinned(item))
.map((item) => item.id);
+ // The mobile sheet shows labels regardless of the desktop pin state.
+ const sidebarRowsLabelled = isMobile || sidebarState !== "collapsed";
// Mirrors ImagesWorkflowList's own test: it decides which row owns the highlight.
const imagesWorkflowsListed =
- sidebarState !== "collapsed" &&
+ sidebarRowsLabelled &&
!(navRows.images.active && imagesPageMode === "train");
const showSidebarBrand = true;
@@ -4275,7 +4277,7 @@ export function AppSidebar() {
overlay={
id === "images" &&
!row.active &&
- sidebarState !== "collapsed" ? (
+ sidebarRowsLabelled ? (
<ImagesNavDisclosure />
) : undefined
}
@@ -4284,7 +4286,7 @@ export function AppSidebar() {
{id === "images" ? (
<ImagesWorkflowList
active={row.active}
- collapsed={sidebarState === "collapsed"}
+ collapsed={!sidebarRowsLabelled}
onPick={(workflowId) => {
useImageWorkflowStore
.getState()
diff --git a/studio/frontend/tests/images-workflows-mobile-sheet.test.ts b/studio/frontend/tests/images-workflows-mobile-sheet.test.ts
new file mode 100644
index 00000000000..4006c7d07d7
--- /dev/null
+++ b/studio/frontend/tests/images-workflows-mobile-sheet.test.ts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+import assert from "node:assert/strict";
+import test from "node:test";
+
+import { readSrcAsync } from "./helpers/kit.ts";
+
+// The desktop collapse state must not hide workflows in the mobile sheet.
+test("the Images workflow list treats the mobile sheet as expanded", async () => {
+ const source = await readSrcAsync("components/app-sidebar.tsx");
+
+ assert.match(
+ source,
+ /const sidebarRowsLabelled = isMobile \|\| sidebarState !== "collapsed";/,
+ );
+ assert.match(
+ source,
+ /<ImagesWorkflowList\s+active=\{row\.active\}\s+collapsed=\{!sidebarRowsLabelled\}/,
+ );
+ assert.match(
+ source,
+ /const imagesWorkflowsListed =\s+sidebarRowsLabelled &&/,
+ );
+
+ const imagesRow = source.slice(
+ source.indexOf('id === "images" && "group/images-item"'),
+ source.indexOf("<ImagesWorkflowList"),
+ );
+ assert.ok(
+ imagesRow.includes("<ImagesNavDisclosure />"),
+ "could not find the Images row overlay",
+ );
+ assert.ok(
+ !imagesRow.includes("sidebarState"),
+ "the Images row overlay still reads the desktop pin state",
+ );
+});