@devries-cameron20 / t3code-1 / commits / abcff3e49a
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): the undo notice no longer pushes the update button out of the sidebar (#27695)

Co-authored-by: Nicholas Wasmiller <derped@mnpl.fyi> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Nicholas Wasmiller committed Nov 1, 2026 at 16:48 UTC abcff3e49add133ed66a876ee10f7c17a0fc4d71
3 files changed +19 -6
apps/web/src/components/sidebar/SidebarThreadUndoNotice.tsx
+14 -3
@@ -1,4 +1,5 @@
1 import { useAtomValue } from "@effect/atom-react";
2 +import { Undo2Icon } from "lucide-react";
3 import { useState } from "react";
4
5 import {
@@ -29,8 +30,11 @@ export function SidebarThreadUndoNotice() {
30 if (!text) return null;
31
32 return (
32 - // No min-w-0: the undo button sets this item's minimum, so a shared row squeezes its neighbour.
33 - <SidebarMenuItem className="flex flex-1" aria-hidden={!summary} inert={!summary}>
33 + <SidebarMenuItem
34 + className="@container flex min-w-0 flex-1"
35 + aria-hidden={!summary}
36 + inert={!summary}
37 + >
38 <div
39 onTransitionEnd={(event) => {
40 if (!summary && event.target === event.currentTarget) setShownSummary(null);
@@ -43,7 +47,14 @@ export function SidebarThreadUndoNotice() {
47 !summary && "opacity-0",
48 )}
49 >
46 - <InlineButton onClick={undoLatestThreadAction}>{threadUndoLabel(keybindings)}</InlineButton>
50 + <InlineButton className="min-w-0 shrink" onClick={undoLatestThreadAction}>
51 + {/* The icon's negative margin cancels its width, so beside the label it sits in
52 + clipped space; once the label is too wide it wraps away and the icon shows. */}
53 + <span className="flex h-6 min-w-0 flex-wrap justify-end overflow-hidden">
54 + <Undo2Icon className="-ml-4 h-6 w-4 @max-[1rem]:invisible" />
55 + <span>{threadUndoLabel(keybindings)}</span>
56 + </span>
57 + </InlineButton>
58 <span>{text},</span>
59 </div>
60 </SidebarMenuItem>
apps/web/src/components/sidebar/SidebarUpdateCapsule.tsx
+4 -2
@@ -88,7 +88,7 @@ export function SidebarUpdateCapsule({
88 <Popover>
89 <div
90 className={cn(
91 - "relative flex h-8 min-w-0 flex-1 items-center rounded-full bg-sidebar-control-surface text-sidebar-foreground",
91 + "relative flex h-8 flex-1 items-center rounded-full bg-sidebar-control-surface text-sidebar-foreground",
92 view.tone === "slow" && "ring-1 ring-warning/40 ring-inset",
93 view.tone === "failed" && "ring-1 ring-destructive/40 ring-inset",
94 )}
@@ -104,7 +104,9 @@ export function SidebarUpdateCapsule({
104 />
105 }
106 />
107 - <span className="pointer-events-none relative min-w-0 flex-1 truncate pl-3 text-xs">
107 + {/* w-0 keeps the label out of the capsule's minimum width, so a shared footer row
108 + can squeeze the label but never push the action past the sidebar edge. */}
109 + <span className="pointer-events-none relative w-0 min-w-0 flex-1 truncate pl-3 text-xs">
110 <span className={cn(view.tone === "failed" && "text-destructive")}>{view.label}</span>
111 {view.slow ? (
112 <span className="text-warning tabular-nums"> {view.slow.elapsed}</span>
apps/web/src/components/sidebar/SidebarUpdatePill.tsx
+1 -1
@@ -422,7 +422,7 @@ function SidebarUpdateControl() {
422 ? { status: "downloading", percent: state.downloadPercent }
423 : { status: "waiting" };
424 return (
425 - <SidebarMenuItem className="ml-auto flex min-w-0 flex-1">
425 + <SidebarMenuItem className="ml-auto flex flex-1">
426 <SidebarUpdateCapsule
427 run={run}
428 local={local}