authorgravatar for eggfriedricew.g.o@gmail.comeggfriedrice <eggfriedricew.g.o@gmail.com> 2026-03-19 17:26:06+00:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-03-19 10:26:06-07:00
logfb18b2de16195623427ec11b0c06e3245e7a8903
tree958fe3a83939e501f924143d7fad7a4b189d420c
parent0de5742b04887439d827bb51d10c2e3e849f67ea
signature Signed by PGP key B5690EEEBB952194

fix(web): show text input for adding projects on Linux desktop (#1075)


2 files changed, 7 insertions(+), 2 deletions(-)

apps/web/src/components/Sidebar.tsx+3-2
......@@ -39,7 +39,7 @@ import { useLocation, useNavigate, useParams } from "@tanstack/react-router";
3939import { useAppSettings } from "../appSettings";
4040import { isElectron } from "../env";
4141import { APP_STAGE_LABEL, APP_VERSION } from "../branding";
42import { isMacPlatform, newCommandId, newProjectId } from "../lib/utils";
42import { isLinuxPlatform, isMacPlatform, newCommandId, newProjectId } from "../lib/utils";
4343import { useStore } from "../store";
4444import { shortcutLabelForCommand } from "../keybindings";
4545import { derivePendingApprovals, derivePendingUserInputs } from "../session-logic";
......@@ -305,7 +305,8 @@ export default function Sidebar() {
305305 const clearSelection = useThreadSelectionStore((s) => s.clearSelection);
306306 const removeFromSelection = useThreadSelectionStore((s) => s.removeFromSelection);
307307 const setSelectionAnchor = useThreadSelectionStore((s) => s.setAnchor);
308 const shouldBrowseForProjectImmediately = isElectron;
308 const isLinuxDesktop = isElectron && isLinuxPlatform(navigator.platform);
309 const shouldBrowseForProjectImmediately = isElectron && !isLinuxDesktop;
309310 const shouldShowProjectPathEntry = addingProject && !shouldBrowseForProjectImmediately;
310311 const projectCwdById = useMemo(
311312 () => new Map(projects.map((project) => [project.id, project.cwd] as const)),
apps/web/src/lib/utils.ts+4
......@@ -16,6 +16,10 @@ export function isWindowsPlatform(platform: string): boolean {
1616 return /^win(dows)?/i.test(platform);
1717}
1818
19export function isLinuxPlatform(platform: string): boolean {
20 return /linux/i.test(platform);
21}
22
1923export function randomUUID(): string {
2024 if (typeof crypto.randomUUID === "function") {
2125 return crypto.randomUUID();