@devries-cameron20 / t3code-1 / commits / 1549046fd2
Fork 0

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

fix(web): thread undo notice sits above the bottom shelves instead of pushing the list (#25270)

maria committed Oct 26, 2026 at 05:26 UTC 1549046fd2c4060a2f6637b34121a8a00844e039
5 files changed +47 -14
apps/web/src/components/LegacySidebar.tsx
+1 -1
@@ -3674,7 +3674,7 @@ export default function LegacySidebar({ routeReveal }: { routeReveal: SidebarRou
3674 attachProjectListAutoAnimateRef={attachProjectListAutoAnimateRef}
3675 projectsLength={projectsLength}
3676 />
3677 - <SidebarChromeFooter />
3677 + <SidebarChromeFooter showUndoNotice />
3678 </RevealActiveRowContext>
3679 );
3680 }
apps/web/src/components/Sidebar.tsx
+8 -1
@@ -3124,6 +3124,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
3124 className="mt-auto"
3125 label="Working"
3126 count={workingThreads.length}
3127 + hostsUndoNotice
3128 toggle={{
3129 expanded: workingShelfExpanded,
3130 onToggle: toggleWorkingShelf,
@@ -3139,6 +3140,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
3140 className={cn(workingThreads.length === 0 && "mt-auto")}
3141 label="Snoozed"
3142 count={snoozedThreads.length}
3143 + hostsUndoNotice={workingThreads.length === 0}
3144 toggle={{
3145 expanded: snoozedShelfExpanded,
3146 onToggle: toggleSnoozedShelf,
@@ -3156,6 +3158,9 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
3158 )}
3159 label="Settled"
3160 count={settledCount}
3161 + hostsUndoNotice={
3162 + workingThreads.length + snoozedThreads.length === 0
3163 + }
3164 dragging={from !== null}
3165 isDropTarget={dragTargetSection === "settled"}
3166 toggle={{
@@ -3247,7 +3252,9 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
3252 ) : null}
3253 </SidebarGroup>
3254 </SidebarContent>
3250 - <SidebarChromeFooter />
3255 + <SidebarChromeFooter
3256 + showUndoNotice={isSearchingThreads || sidebarListItemsFresh.length === 0}
3257 + />
3258 </>
3259 );
3260 }
apps/web/src/components/sidebar/SidebarChrome.tsx
+6 -2
@@ -228,10 +228,14 @@ const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {
228 );
229 });
230
231 -export const SidebarChromeFooter = memo(function SidebarChromeFooter() {
231 +export const SidebarChromeFooter = memo(function SidebarChromeFooter({
232 + showUndoNotice = false,
233 +}: {
234 + showUndoNotice?: boolean;
235 +}) {
236 return (
237 <SidebarFooter>
234 - <SidebarThreadUndoNotice />
238 + {showUndoNotice ? <SidebarThreadUndoNotice /> : null}
239 <SidebarProviderUpdatePill />
240 <SidebarUpdateArchitectureWarning />
241 <SidebarUtilityMenu />
apps/web/src/components/sidebar/SidebarListMarkers.tsx
+7 -1
@@ -10,6 +10,7 @@ import {
10 type SidebarListMarker,
11 } from "../Sidebar.logic";
12 import { SIDEBAR_SORTABLE_DRAG_DISABLED } from "./SidebarThreadRow";
13 +import { SidebarThreadUndoNotice } from "./SidebarThreadUndoNotice";
14
15 function SortableSidebarMarker(props: {
16 marker: SidebarListMarker;
@@ -109,6 +110,8 @@ export function SidebarSectionHeader(props: {
110 dragging?: boolean;
111 isDropTarget?: boolean;
112 toggle: { expanded: boolean; onToggle: () => void };
113 + /** The first shelf at the bottom of the list hosts the undo notice just above itself. */
114 + hostsUndoNotice?: boolean;
115 }) {
116 const shelf =
117 props.marker === "working-header"
@@ -123,8 +126,11 @@ export function SidebarSectionHeader(props: {
126 <SortableSidebarMarker
127 marker={props.marker}
128 data-testid={`sidebar-${props.marker}`}
126 - className={cn("mx-0.5 h-8", props.className)}
129 + className={cn("relative mx-0.5 h-8", props.className)}
130 >
131 + {props.hostsUndoNotice ? (
132 + <SidebarThreadUndoNotice className="absolute inset-x-0 bottom-full bg-sidebar surface-grain" />
133 + ) : null}
134 <CollapsibleSectionHeader
135 onClick={props.toggle.onToggle}
136 expanded={props.toggle.expanded}
apps/web/src/components/sidebar/SidebarThreadUndoNotice.tsx
+25 -9
@@ -1,4 +1,5 @@
1 import { useAtomValue } from "@effect/atom-react";
2 +import { useState } from "react";
3
4 import {
5 threadUndoLabel,
@@ -6,22 +7,37 @@ import {
7 undoLatestThreadAction,
8 useThreadUndoNotice,
9 } from "../../hooks/showThreadUndoNotice";
10 +import { cn } from "../../lib/utils";
11 import { primaryServerKeybindingsAtom } from "../../state/server";
10 -import { Alert, AlertDescription } from "../ui/alert";
12 import { InlineButton } from "../ui/button";
13
13 -export function SidebarThreadUndoNotice() {
14 +export function SidebarThreadUndoNotice({ className }: { className?: string }) {
15 const notice = useThreadUndoNotice((state) => state.notice);
16 const keybindings = useAtomValue(primaryServerKeybindingsAtom);
17 + const summary = notice ? threadUndoNoticeSummary(notice) : null;
18
17 - if (!notice) return null;
19 + // Keeps the last text on screen while it fades out, then unmounts on transitionend.
20 + const [shownSummary, setShownSummary] = useState(summary);
21 + if (summary && summary !== shownSummary) setShownSummary(summary);
22 + const text = summary ?? shownSummary;
23 + if (!text) return null;
24
25 return (
20 - <Alert role="group" variant="sidebar">
21 - <AlertDescription>
22 - {threadUndoNoticeSummary(notice)},{" "}
23 - <InlineButton onClick={undoLatestThreadAction}>{threadUndoLabel(keybindings)}</InlineButton>
24 - </AlertDescription>
25 - </Alert>
26 + <div
27 + role="group"
28 + aria-hidden={!summary}
29 + inert={!summary}
30 + onTransitionEnd={(event) => {
31 + if (!summary && event.target === event.currentTarget) setShownSummary(null);
32 + }}
33 + className={cn(
34 + "flex gap-1 px-2 text-2xs leading-6 text-sidebar-muted-foreground transition-opacity duration-200 ease-out starting:opacity-0",
35 + !summary && "opacity-0",
36 + className,
37 + )}
38 + >
39 + <span className="min-w-0 truncate">{text},</span>
40 + <InlineButton onClick={undoLatestThreadAction}>{threadUndoLabel(keybindings)}</InlineButton>
41 + </div>
42 );
43 }