Skip to content

The agent that grows with you

fix(desktop): keep contributed composer actions grouped with the send cluster

Yagna Vudathuf287c7713bde
diff --git a/apps/desktop/src/app/chat/composer/controls.test.tsx b/apps/desktop/src/app/chat/composer/controls.test.tsx
index 5b8ff62b247..c0d82a718f5 100644
--- a/apps/desktop/src/app/chat/composer/controls.test.tsx
+++ b/apps/desktop/src/app/chat/composer/controls.test.tsx
@@ -140,6 +140,18 @@ describe('narrow tiles', () => {
})
})
+// The controls row groups contributed actions with the send cluster in one
+// right-aligned sub-group — the row owns the ml-auto margin. If the cluster kept
+// its own auto margin, it would pin itself right and orphan a contributed
+// action at the row start when the row stacks (#116332).
+describe('contributed-actions grouping', () => {
+ it('leaves right-alignment to the controls row instead of pushing itself with ml-auto', () => {
+ const { container } = renderControls()
+
+ expect(container.firstElementChild?.classList.contains('ml-auto')).toBe(false)
+ })
+})
+
describe('ComposerControls shortcut tooltips', () => {
it('shows Enter for Send', async () => {
renderControls()
diff --git a/apps/desktop/src/app/chat/composer/controls.tsx b/apps/desktop/src/app/chat/composer/controls.tsx
index e83f26d37bf..1a70a448ebb 100644
--- a/apps/desktop/src/app/chat/composer/controls.tsx
+++ b/apps/desktop/src/app/chat/composer/controls.tsx
@@ -113,7 +113,7 @@ export function ComposerControls({
)
return (
- <div className="ml-auto flex min-w-0 shrink items-center gap-(--composer-control-gap)">
+ <div className="flex min-w-0 shrink items-center gap-(--composer-control-gap)">
{minimal ? null : (
<>
{hideModelPill ? null : (
diff --git a/apps/desktop/src/app/chat/composer/index.tsx b/apps/desktop/src/app/chat/composer/index.tsx
index ef8aec92d04..fc2dd4739d5 100644
--- a/apps/desktop/src/app/chat/composer/index.tsx
+++ b/apps/desktop/src/app/chat/composer/index.tsx
@@ -1496,8 +1496,14 @@ export function ChatBar({
</div>
<div className="min-w-0 [grid-area:input]">{input}</div>
<div className="flex min-w-0 items-center justify-end gap-(--composer-control-gap) [grid-area:controls]">
- <ContribSlot area={COMPOSER_AREAS.actions} />
- {controls}
+ {/* Contributed actions travel with the send cluster in one
+ right-aligned sub-group: the group owns the ml-auto, so a
+ contributed action never orphans at the row start when the
+ row stacks. */}
+ <div className="ml-auto flex min-w-0 items-center gap-(--composer-control-gap)">
+ <ContribSlot area={COMPOSER_AREAS.actions} />
+ {controls}
+ </div>
</div>
</div>
<ContribSlot area={COMPOSER_AREAS.bottom} />