Skip to content

Commit b4ee718

Browse files
committed
refactor(web): trim open-folder comments
Cut the flow narration above the open-folder effect and in the initial-path memo down to the two constraints the code cannot state itself: the picker needs the desktop bridge and one unambiguous environment, and the desktop is what expands a leading tilde.
1 parent 656da45 commit b4ee718

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

‎apps/web/src/components/CommandPalette.tsx‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,10 +2144,8 @@ function OpenCommandPaletteDialog(props: {
21442144
return undefined;
21452145
}
21462146

2147-
// The `project.openFolder` hotkey opens the picker before a browse view
2148-
// exists, so there is no query to derive a directory from. Start at the
2149-
// environment's configured add-project directory instead; the desktop
2150-
// expands a leading `~` against the target's home, including over WSL.
2147+
// The desktop expands the leading `~` against the target's home, including
2148+
// over WSL.
21512149
if (!isBrowsing) {
21522150
return getAddProjectInitialQueryForEnvironment(browseEnvironmentId);
21532151
}
@@ -2358,11 +2356,8 @@ function OpenCommandPaletteDialog(props: {
23582356
primaryEnvironmentId,
23592357
]);
23602358

2361-
// `project.openFolder` routes here: jump straight to the native folder
2362-
// picker against the environment browsing would target, opening the
2363-
// add-project browse view behind it so cancelling lands somewhere useful.
2364-
// Falls back to the regular add-project flow when the picker can't run (web
2365-
// client, WSL instance not yet resolved) or environment selection is needed.
2359+
// The native picker needs the desktop bridge and one unambiguous
2360+
// environment; without both, `project.openFolder` can only open the flow.
23662361
useLayoutEffect(() => {
23672362
if (openIntent?.kind !== "open-folder") {
23682363
return;

0 commit comments

Comments
 (0)