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.

Revert "Studio: keep the composer expand button in the top corner when a file is attached (#13198)" (#13394)

Michael Han160cb41fe1bf
diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsx
index bfa1a463bc5..5411be5b0d6 100644
--- a/studio/frontend/src/components/assistant-ui/thread.tsx
+++ b/studio/frontend/src/components/assistant-ui/thread.tsx
@@ -5532,14 +5532,13 @@ const Composer: FC<{
{(showWritingToggle || isWritingExpanded) && (
<TooltipIconButton
type="button"
- tooltip={isWritingExpanded ? "Collapse" : "Expand"}
- aria-label={
+ tooltip={
isWritingExpanded ? "Collapse composer" : "Expand composer"
}
aria-expanded={isWritingExpanded}
aria-controls={inputId}
disabled={disabled}
- className="unsloth-composer-expand absolute size-8 rounded-md bg-transparent text-muted-foreground hover:bg-transparent hover:text-muted-foreground dark:hover:bg-transparent aria-expanded:bg-transparent aria-expanded:text-muted-foreground"
+ className="unsloth-composer-expand absolute -right-1 top-0 size-8 rounded-md bg-transparent text-muted-foreground hover:bg-transparent hover:text-muted-foreground dark:hover:bg-transparent aria-expanded:bg-transparent aria-expanded:text-muted-foreground"
onMouseDown={(event) => event.preventDefault()}
onClick={toggleWritingExpanded}
>
@@ -5621,11 +5620,6 @@ const Composer: FC<{
data-writing-expanded={
isWritingExpanded && !isDictating ? "true" : undefined
}
- data-writing-toggle={
- (showWritingToggle || isWritingExpanded) && !isDictating
- ? "true"
- : undefined
- }
aria-disabled={disabled}
onSubmit={handleSubmit}
>
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 1a25efa48a0..b5906a74f4d 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -3538,21 +3538,6 @@ html[data-chat-font] .aui-root {
padding-right: calc(2.25rem * var(--ui-space-scale, 1));
}
- /* At the editor's top right; with attachment cards above, at the surface's instead. */
- .unsloth-composer-expand {
- top: 0;
- right: calc(var(--spacing) * -1);
- }
-
- .unsloth-composer-surface:has(.aui-composer-attachment-cards > *) .unsloth-composer-editor {
- position: static;
- }
-
- .unsloth-composer-surface:has(.aui-composer-attachment-cards > *) .unsloth-composer-expand {
- top: calc(var(--spacing) * 2.5);
- right: calc(var(--spacing) * 2.5);
- }
-
/* max(): at 480px tall the clamp is 192px, under the twelve-row compact
height, so expanding would clip. svh, since dvh tracks Safari's bar. */
/* Either composer root: the thread's form or compare's wrapper. */
@@ -3612,11 +3597,6 @@ html[data-chat-font] .aui-root {
--composer-tight-gap: calc(0.125rem * var(--ui-space-scale, 1));
}
- /* The line's gutter is gone here, so the pinned toggle sits that much closer to the edge. */
- .unsloth-composer-surface:has(.aui-composer-attachment-cards > *) .unsloth-composer-expand {
- right: calc(var(--spacing) * 1.5);
- }
-
.unsloth-composer-left,
.unsloth-composer-line .aui-composer-action-wrapper {
gap: var(--composer-tight-gap);
@@ -5166,18 +5146,6 @@ html.force-reduced-motion .sidebar-section-drop-line {
clip-path: inset(-0.625rem 0 0 0 round 28px 28px 0 0);
}
-/* Keep attachment cards clear of the expand toggle in the top right corner. */
-.aui-composer-root[data-writing-toggle="true"] .unsloth-composer-surface .aui-composer-attachment-cards {
- padding-right: calc(var(--spacing) * 9);
-}
-
-/* A scrolling strip paints cards through its padding, so end the scrollport before the toggle. */
-.aui-composer-root[data-writing-toggle="true"] .unsloth-composer-surface .aui-composer-attachment-cards[data-layout="strip"] {
- width: calc(100% - var(--spacing) * 9 + 0.625rem);
- padding-right: 1rem;
- clip-path: inset(-0.625rem 0 0 0 round 28px 0 0 0);
-}
-
/* Avoid iOS Safari focus zoom. Important in the base layer, because an important
declaration in an earlier layer beats important utilities such as text-ui-13!. */
@layer base {