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 24, 17:45 UTC
Preserve back navigation when opening settings (#5930)
Co-authored-by: codex <codex@users.noreply.github.com>
Julius Marminge committed
Aug 10, 2026 at 03:55 UTC
5da45337f7178db711624c3e7c4d69059b2b286a
1 file changed
+10
apps/web/src/components/AppSidebarLayout.tsx
+10
@@ -20,6 +20,7 @@ import ThreadSidebar from "./Sidebar";
20
import { SettingsSidebarNav } from "./settings/SettingsSidebarNav";
21
import { SidebarChromeHeader } from "./sidebar/SidebarChrome";
22
import { useSidebarStageBackdropVariant } from "./SidebarStageBackdrop";
23
+import { useProjects } from "../state/entities";
24
import {
25
resolveInitialThreadSidebarWidth,
26
resolveThreadSidebarMaximumWidth,
@@ -118,6 +119,14 @@ function SidebarControl() {
119
);
120
}
121
122
+// Settings swaps the thread sidebar out of the tree. Keep the lightweight
123
+// project projection subscribed so returning to a draft never renders the
124
+// zero-project state while the environment snapshot reconnects.
125
+function ProjectProjectionRetention() {
126
+ useProjects();
127
+ return null;
128
+}
129
+
130
export function AppSidebarLayout({ children }: { children: ReactNode }) {
131
const navigate = useNavigate();
132
const legacySidebarEnabled = useLegacySidebarEnabled();
@@ -184,6 +193,7 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) {
193
194
return (
195
<SidebarProvider className="h-dvh! min-h-0!" defaultOpen style={sidebarProviderStyle}>
196
+ <ProjectProjectionRetention />
197
<Sidebar
198
side="left"
199
collapsible="offcanvas"