The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 02:00 UTC
fix(web): mic button always sits next to send (#33133)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Nov 8, 2026 at 16:22 UTC
d5290e9167ccbd8d2c7043eab8e311fd21a14464
2 files changed
+77
-51
apps/web/src/components/chat/ComposerFooterControls.tsx
+3
-2
@@ -300,7 +300,6 @@ export const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryA
300
) : props.reserveContextWindowMeter ? (
301
<ContextWindowMeterPlaceholder />
302
) : null}
303
- {props.children}
303
<ComposerPrimaryActions
304
compact={props.compact}
305
canOperateThread={props.canOperateThread}
@@ -329,7 +328,9 @@ export const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryA
328
compactBeforeSendTokens={props.compactBeforeSendTokens}
329
keepFullHistory={props.keepFullHistory}
330
onToggleKeepFullHistory={props.onToggleKeepFullHistory}
332
- />
331
+ >
332
+ {props.children}
333
+ </ComposerPrimaryActions>
334
</>
335
);
336
});
apps/web/src/components/chat/ComposerPrimaryActions.tsx
+74
-49
@@ -1,4 +1,4 @@
1
-import { memo, type MouseEventHandler, type PointerEventHandler } from "react";
1
+import { memo, type MouseEventHandler, type PointerEventHandler, type ReactNode } from "react";
2
import { CheckIcon, ChevronDownIcon, ChevronLeftIcon, Minimize2Icon, PlayIcon } from "lucide-react";
3
import { CornerUpRight, ListPlus } from "lucide";
4
import { MorphIcon } from "~/components/MorphIcon";
@@ -26,6 +26,8 @@ interface PendingActionState {
26
}
27
28
interface ComposerPrimaryActionsProps {
29
+ /** Footer controls (dictation) that always sit right before the primary button. */
30
+ children?: ReactNode;
31
compact: boolean;
32
canOperateThread: boolean;
33
pendingAction: PendingActionState | null;
@@ -82,6 +84,7 @@ const preventPointerFocus: PointerEventHandler<HTMLElement> = (event) => {
84
};
85
86
export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
87
+ children,
88
compact,
89
canOperateThread,
90
pendingAction,
@@ -182,6 +185,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
185
</Button>
186
)
187
) : null}
188
+ {children}
189
<button
190
type="submit"
191
className={cn(messageActionPillClassName, "h-8 sm:h-7", compact ? "px-3" : "px-4")}
@@ -211,63 +215,76 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
215
if (showPlanFollowUpPrompt && (promptHasText || !canResume)) {
216
if (promptHasText) {
217
return (
214
- <button
215
- type="submit"
216
- className={cn(messageActionPillClassName, "h-9 sm:h-8", compact ? "px-3" : "px-4")}
217
- {...pointerFocusProps}
218
- disabled={isSendBusy || isSendDisabled || isEnvironmentUnavailable}
219
- >
220
- {isSendBusy ? "Sending..." : "Refine"}
221
- </button>
218
+ <>
219
+ {children}
220
+ <button
221
+ type="submit"
222
+ className={cn(messageActionPillClassName, "h-9 sm:h-8", compact ? "px-3" : "px-4")}
223
+ {...pointerFocusProps}
224
+ disabled={isSendBusy || isSendDisabled || isEnvironmentUnavailable}
225
+ >
226
+ {isSendBusy ? "Sending..." : "Refine"}
227
+ </button>
228
+ </>
229
);
230
}
231
232
return (
226
- <div data-chat-composer-implement-actions="true" className="flex items-center justify-end">
227
- <button
228
- type="submit"
229
- className={cn(messageActionPillClassName, "h-9 rounded-r-none px-4 sm:h-8")}
230
- {...pointerFocusProps}
231
- disabled={isSendBusy || isSendDisabled || isEnvironmentUnavailable}
232
- >
233
- {isSendBusy ? "Sending..." : "Implement"}
234
- </button>
235
- <Menu>
236
- <MenuTrigger
237
- render={
238
- <button
239
- type="button"
240
- className={cn(
241
- messageActionPillClassName,
242
- "h-9 rounded-l-none border-l border-message-action-foreground/20 px-2 sm:h-8",
243
- )}
244
- aria-label="Implementation actions"
245
- onMouseDown={
246
- preserveComposerFocusOnPointerDown ? (event) => event.preventDefault() : undefined
247
- }
248
- disabled={isSendBusy || isSendDisabled || isEnvironmentUnavailable}
249
- />
250
- }
233
+ <>
234
+ {children}
235
+ <div data-chat-composer-implement-actions="true" className="flex items-center justify-end">
236
+ <button
237
+ type="submit"
238
+ className={cn(messageActionPillClassName, "h-9 rounded-r-none px-4 sm:h-8")}
239
+ {...pointerFocusProps}
240
+ disabled={isSendBusy || isSendDisabled || isEnvironmentUnavailable}
241
>
252
- <ChevronDownIcon className="size-3.5" />
253
- </MenuTrigger>
254
- <MenuPopup align="end" side="top" {...composerFloatingLayerProps}>
255
- <MenuItem
256
- disabled={isSendBusy || isSendDisabled || isEnvironmentUnavailable}
257
- onClick={() => {
258
- if (canOperateThread) onImplementPlanInNewThread();
259
- }}
242
+ {isSendBusy ? "Sending..." : "Implement"}
243
+ </button>
244
+ <Menu>
245
+ <MenuTrigger
246
+ render={
247
+ <button
248
+ type="button"
249
+ className={cn(
250
+ messageActionPillClassName,
251
+ "h-9 rounded-l-none border-l border-message-action-foreground/20 px-2 sm:h-8",
252
+ )}
253
+ aria-label="Implementation actions"
254
+ onMouseDown={
255
+ preserveComposerFocusOnPointerDown
256
+ ? (event) => event.preventDefault()
257
+ : undefined
258
+ }
259
+ disabled={isSendBusy || isSendDisabled || isEnvironmentUnavailable}
260
+ />
261
+ }
262
>
261
- Implement in a new thread
262
- </MenuItem>
263
- </MenuPopup>
264
- </Menu>
265
- </div>
263
+ <ChevronDownIcon className="size-3.5" />
264
+ </MenuTrigger>
265
+ <MenuPopup align="end" side="top" {...composerFloatingLayerProps}>
266
+ <MenuItem
267
+ disabled={isSendBusy || isSendDisabled || isEnvironmentUnavailable}
268
+ onClick={() => {
269
+ if (canOperateThread) onImplementPlanInNewThread();
270
+ }}
271
+ >
272
+ Implement in a new thread
273
+ </MenuItem>
274
+ </MenuPopup>
275
+ </Menu>
276
+ </div>
277
+ </>
278
);
279
}
280
281
if (canInterrupt && !hasSendableContent && !isEditingQueuedMessage) {
270
- return renderStopGenerationButton(false);
282
+ return (
283
+ <>
284
+ {children}
285
+ {renderStopGenerationButton(false)}
286
+ </>
287
+ );
288
}
289
290
const showResume = canResume && !hasSendableContent && !isEditingQueuedMessage;
@@ -359,7 +376,14 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
376
<TooltipPopup>{submitTooltip}</TooltipPopup>
377
</Tooltip>
378
);
362
- if (compactTokens === null) return submit;
379
+ if (compactTokens === null) {
380
+ return (
381
+ <>
382
+ {children}
383
+ {submit}
384
+ </>
385
+ );
386
+ }
387
388
return (
389
<div data-chat-composer-compact-send="true" className="flex items-center gap-2">
@@ -392,6 +416,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({
416
<div>{keepFullHistory ? "Click to compact first" : "Click to keep full history"}</div>
417
</TooltipPopup>
418
</Tooltip>
419
+ {children}
420
{submit}
421
</div>
422
);