Skip to content

Commit dc4ee0b

Browse files
committed
Remove dead code and fix sidebar split/tab navigation conflict
- Remove unused `nowTick` state variable from ChatView - Remove unused `terminalFocusRequestId` state variable from ChatView - Delete unused `WorkspaceRouteSync` component - Remove redundant router.navigate() calls from sidebar split/tab context menu handlers that conflicted with route-level openThreadSurface("focus-or-tab")
1 parent d3d096c commit dc4ee0b

File tree

3 files changed

+0
-145
lines changed

3 files changed

+0
-145
lines changed

apps/web/src/components/ChatView.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,6 @@ export default function ChatView(props: ChatViewProps) {
498498
// When set, the thread-change reset effect will open the sidebar instead of closing it.
499499
// Used by "Implement in a new thread" to carry the sidebar-open intent across navigation.
500500
const planSidebarOpenOnNextThreadRef = useRef(false);
501-
const [terminalFocusRequestId, setTerminalFocusRequestId] = useState(0);
502-
const [nowTick, setNowTick] = useState(() => Date.now());
503501
const [pullRequestDialogState, setPullRequestDialogState] =
504502
useState<PullRequestDialogState | null>(null);
505503
const [attachmentPreviewHandoffByMessageId, setAttachmentPreviewHandoffByMessageId] = useState<

apps/web/src/components/Sidebar.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,28 +1654,16 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
16541654

16551655
if (clicked === "open-new-tab") {
16561656
openThreadInNewTab(serverThreadSurfaceInput(threadRef));
1657-
void router.navigate({
1658-
to: "/$environmentId/$threadId",
1659-
params: buildThreadRouteParams(threadRef),
1660-
});
16611657
return;
16621658
}
16631659

16641660
if (clicked === "open-split-right") {
16651661
openThreadInSplit(serverThreadSurfaceInput(threadRef), "x");
1666-
void router.navigate({
1667-
to: "/$environmentId/$threadId",
1668-
params: buildThreadRouteParams(threadRef),
1669-
});
16701662
return;
16711663
}
16721664

16731665
if (clicked === "open-split-down") {
16741666
openThreadInSplit(serverThreadSurfaceInput(threadRef), "y");
1675-
void router.navigate({
1676-
to: "/$environmentId/$threadId",
1677-
params: buildThreadRouteParams(threadRef),
1678-
});
16791667
return;
16801668
}
16811669

@@ -1729,7 +1717,6 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec
17291717
openThreadInNewTab,
17301718
openThreadInSplit,
17311719
project.cwd,
1732-
router,
17331720
],
17341721
);
17351722

apps/web/src/components/workspace/WorkspaceRouteSync.tsx

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)