Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { useLocation, useNavigate, useParams } from "@tanstack/react-router";
import { useAppSettings } from "../appSettings";
import { isElectron } from "../env";
import { APP_STAGE_LABEL, APP_VERSION } from "../branding";
import { isMacPlatform, newCommandId, newProjectId } from "../lib/utils";
import { isLinuxPlatform, isMacPlatform, newCommandId, newProjectId } from "../lib/utils";
import { useStore } from "../store";
import { shortcutLabelForCommand } from "../keybindings";
import { derivePendingApprovals, derivePendingUserInputs } from "../session-logic";
Expand Down Expand Up @@ -305,7 +305,8 @@ export default function Sidebar() {
const clearSelection = useThreadSelectionStore((s) => s.clearSelection);
const removeFromSelection = useThreadSelectionStore((s) => s.removeFromSelection);
const setSelectionAnchor = useThreadSelectionStore((s) => s.setAnchor);
const shouldBrowseForProjectImmediately = isElectron;
const isLinuxDesktop = isElectron && isLinuxPlatform(navigator.platform);
const shouldBrowseForProjectImmediately = isElectron && !isLinuxDesktop;
const shouldShowProjectPathEntry = addingProject && !shouldBrowseForProjectImmediately;
const projectCwdById = useMemo(
() => new Map(projects.map((project) => [project.id, project.cwd] as const)),
Expand Down
4 changes: 4 additions & 0 deletions apps/web/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export function isWindowsPlatform(platform: string): boolean {
return /^win(dows)?/i.test(platform);
}

export function isLinuxPlatform(platform: string): boolean {
return /linux/i.test(platform);
}

export function randomUUID(): string {
if (typeof crypto.randomUUID === "function") {
return crypto.randomUUID();
Expand Down