The best way to control Claude Code, Codex and more from any computer or phone
fix(web): keep sidebar update control readable when narrow
(cherry picked from commit f0b4502be23f4961668eff044386e4b59bf78533)
screen committed
Nov 19, 2026 at 19:25 UTC
40c1e861eec7ff9936b582a2ffb6225265041fd1
2 files changed
+26
-18
apps/web/src/components/sidebar/SidebarUpdateCapsule.tsx
+25
-17
@@ -90,6 +90,10 @@ export function SidebarUpdateCapsule({
90
const updateServer = useServerUpdate();
91
const failed = machines.some(({ status }) => status === "failed");
92
const settled = !hasActiveMachine && run.localVersion === null;
93
+ const restartSeconds =
94
+ run.phase === "countdown" && run.restartAt !== null
95
+ ? Math.max(0, Math.ceil((run.restartAt - now) / 1000))
96
+ : null;
97
98
const actionLabel =
99
view.action === "later" ? gt("Later") : view.action === "retry" ? gt("Retry") : gt("Dismiss");
@@ -103,7 +107,7 @@ export function SidebarUpdateCapsule({
107
<Popover>
108
<div
109
className={cn(
106
- "relative flex h-8 flex-1 items-center rounded-full bg-sidebar-control-surface text-sidebar-foreground",
110
+ "relative ml-auto flex h-8 w-8 shrink-0 items-center rounded-full bg-sidebar-control-surface text-sidebar-foreground @min-[12rem]/sidebar-update:w-full",
111
view.tone === "slow" && "ring-1 ring-warning/40 ring-inset",
112
view.tone === "failed" && "ring-1 ring-destructive/40 ring-inset",
113
)}
@@ -119,9 +123,7 @@ export function SidebarUpdateCapsule({
123
/>
124
}
125
/>
122
- {/* w-0 keeps the label out of the capsule's minimum width, so a shared footer row
123
- can squeeze the label but never push the action past the sidebar edge. */}
124
- <span className="pointer-events-none relative w-0 min-w-0 flex-1 truncate pl-3 text-xs">
126
+ <span className="pointer-events-none relative hidden min-w-0 flex-1 truncate pl-3 text-xs @min-[12rem]/sidebar-update:block">
127
<span className={cn(view.tone === "failed" && "text-destructive")}>{view.label}</span>
128
{view.slow ? (
129
<span className="text-warning tabular-nums"> {view.slow.elapsed}</span>
@@ -130,16 +132,22 @@ export function SidebarUpdateCapsule({
132
{view.action !== null ? (
133
<button
134
type="button"
133
- className="relative shrink-0 cursor-pointer pr-3 pl-1.5 text-xs underline decoration-muted-foreground/60 underline-offset-3 hover:decoration-current"
135
+ className="relative hidden shrink-0 cursor-pointer pr-3 pl-1.5 text-xs underline decoration-muted-foreground/60 underline-offset-3 hover:decoration-current @min-[12rem]/sidebar-update:block"
136
onClick={runAction}
137
>
138
{actionLabel}
139
</button>
138
- ) : (
139
- <span className="pointer-events-none relative grid size-8 shrink-0 place-items-center">
140
- {icon}
141
- </span>
142
- )}
140
+ ) : null}
141
+ <span
142
+ className={cn(
143
+ "pointer-events-none relative grid size-8 shrink-0 place-items-center",
144
+ view.action !== null && "@min-[12rem]/sidebar-update:hidden",
145
+ restartSeconds !== null &&
146
+ "rounded-full text-xs font-medium tabular-nums ring-1 ring-current/22 ring-inset",
147
+ )}
148
+ >
149
+ {restartSeconds !== null ? `${restartSeconds}s` : icon}
150
+ </span>
151
</div>
152
<PopoverPopup side="top" align="end" padding="compact" width="sm">
153
<div className="flex flex-col gap-1 text-xs">
@@ -183,16 +191,16 @@ export function SidebarUpdateCapsule({
191
) : null}
192
</div>
193
))}
186
- {settled && failed ? (
194
+ {view.action !== null ? (
195
<div className="mt-1 flex justify-end gap-1">
188
- {view.action === "retry" ? (
189
- <Button size="xs" variant="outline" onClick={runAction}>
190
- <T>Retry</T>
196
+ <Button size="xs" variant="outline" onClick={runAction}>
197
+ {actionLabel}
198
+ </Button>
199
+ {settled && failed && view.action !== "dismiss" ? (
200
+ <Button size="xs" variant="ghost" onClick={dismissSettledUpdateRunMachines}>
201
+ <T>Dismiss</T>
202
</Button>
203
) : null}
193
- <Button size="xs" variant="ghost" onClick={dismissSettledUpdateRunMachines}>
194
- <T>Dismiss</T>
195
- </Button>
204
</div>
205
) : null}
206
</div>
apps/web/src/components/sidebar/SidebarUpdatePill.tsx
+1
-1
@@ -441,7 +441,7 @@ function SidebarUpdateControl() {
441
? { status: "downloading", percent: state.downloadPercent }
442
: { status: "waiting" };
443
return (
444
- <SidebarMenuItem className="ml-auto flex flex-1">
444
+ <SidebarMenuItem className="@container/sidebar-update ml-auto flex min-w-8 flex-1">
445
<SidebarUpdateCapsule
446
run={run}
447
local={local}