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: changing the thinking setting also drops a hand Expand (#13625)

Michael Han781a1a09f03e
diff --git a/studio/frontend/src/components/assistant-ui/reasoning.tsx b/studio/frontend/src/components/assistant-ui/reasoning.tsx
index 8602c9a68bc..59ea39ea6c7 100644
--- a/studio/frontend/src/components/assistant-ui/reasoning.tsx
+++ b/studio/frontend/src/components/assistant-ui/reasoning.tsx
@@ -832,6 +832,7 @@ const ReasoningGroupBlock = ({
if (lastVisibility !== visibility) {
setLastVisibility(visibility);
setOverride(null);
+ setTailExpanded(false);
}
// Whatever the setting says, until this block is toggled by hand.
diff --git a/studio/frontend/tests/reasoning-live-tail.test.ts b/studio/frontend/tests/reasoning-live-tail.test.ts
index 13ee55e4525..71940064b96 100644
--- a/studio/frontend/tests/reasoning-live-tail.test.ts
+++ b/studio/frontend/tests/reasoning-live-tail.test.ts
@@ -52,6 +52,13 @@ test("the box clips at the top instead of scrolling, and Expand toggles without
assert.match(reasoning, /setOverride\(null\);\s*setTailExpanded\(false\);/);
});
+test("changing the setting drops a hand Expand along with the hand open", () => {
+ assert.match(
+ reasoning,
+ /if \(lastVisibility !== visibility\) \{\s*setLastVisibility\(visibility\);\s*setOverride\(null\);\s*setTailExpanded\(false\);\s*\}/,
+ );
+});
+
test("focus landing in the clipped lines lifts the cap instead of staying invisible", () => {
const tail = reasoning.slice(
reasoning.indexOf("function ReasoningTail("),