Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(agentic-ide): the folder step speaks plainly — what happened, and what to do next

Harald6c6164b003a6
diff --git a/jarvis/agentic_ide/folders.py b/jarvis/agentic_ide/folders.py
index 5bc9badba3..4d14ae4e15 100644
--- a/jarvis/agentic_ide/folders.py
+++ b/jarvis/agentic_ide/folders.py
@@ -249,9 +249,12 @@ def list_dir(
target = Path(path).expanduser()
try:
if not target.is_dir():
- return [], f"Not a folder: {target}"
+ return [], (
+ f"There is no folder called {target}. "
+ "Check the spelling, or pick a folder from the list."
+ )
except OSError as exc:
- return [], f"Cannot read {target}: {exc}"
+ return [], f"Could not open {target}: {exc}"
entries: list[FolderEntry] = []
try:
@@ -280,7 +283,7 @@ def list_dir(
)
)
except PermissionError:
- return [], f"No permission to read {target}"
+ return [], f"Jarvis is not allowed to look inside {target}. Pick another folder."
except OSError as exc:
return [], f"Cannot read {target}: {exc}"
diff --git a/jarvis/agentic_ide/session.py b/jarvis/agentic_ide/session.py
index 1b542c229f..28ea4430e0 100644
--- a/jarvis/agentic_ide/session.py
+++ b/jarvis/agentic_ide/session.py
@@ -1792,7 +1792,9 @@ class Registry:
# stat can block for seconds, which would stall every other
# request the server is serving.
if not await asyncio.to_thread(root.is_dir):
- raise SessionError(f"Not a folder: {root}")
+ raise SessionError(
+ f"There is no folder called {root} — choose the folder again."
+ )
except OSError as exc:
raise SessionError(f"Cannot open {root}: {exc}") from exc
diff --git a/jarvis/ui/web/agentic_ide_routes.py b/jarvis/ui/web/agentic_ide_routes.py
index b27da287a4..60c38b3f65 100644
--- a/jarvis/ui/web/agentic_ide_routes.py
+++ b/jarvis/ui/web/agentic_ide_routes.py
@@ -1646,7 +1646,7 @@ async def resolve_folder(req: ResolveRequest) -> ResolveResponse:
wanted = (req.name or "").strip()
if not wanted:
return ResolveResponse(
- detail="That drop carried no folder path — browse to the folder or paste its path."
+ detail="That was not a folder. Drop a folder here, or pick one from the list."
)
hits = await asyncio.to_thread(search_folders, wanted, limit=12)
@@ -1663,7 +1663,12 @@ async def resolve_folder(req: ResolveRequest) -> ResolveResponse:
if len(items) == 1:
return ResolveResponse(resolved=items[0].path, candidates=items)
if not items:
- return ResolveResponse(detail=f'No folder called "{wanted}" was found on this machine.')
+ return ResolveResponse(
+ detail=(
+ f'No folder called "{wanted}" was found on this computer. '
+ "Pick one from the list."
+ )
+ )
return ResolveResponse(
candidates=items,
detail=f'Several folders are called "{wanted}" — pick the right one.',
diff --git a/jarvis/ui/web/frontend/src/components/agentic/FolderPicker.test.tsx b/jarvis/ui/web/frontend/src/components/agentic/FolderPicker.test.tsx
index 89f1033435..ba157e61e3 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/FolderPicker.test.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/FolderPicker.test.tsx
@@ -272,7 +272,7 @@ describe("FolderPicker", () => {
dataTransfer: dataTransfer({}),
});
- expect(await screen.findByText(/carried no folder/i)).toBeTruthy();
+ expect(await screen.findByText(/was not a folder/i)).toBeTruthy();
expect(api.resolveDroppedFolder).not.toHaveBeenCalled();
});
});
@@ -315,7 +315,7 @@ describe("the system folder window", () => {
fireEvent.click(await screen.findByTestId("native-browse"));
- expect(await screen.findByText(/folder window is open/i)).toBeTruthy();
+ expect(await screen.findByText(/folder window has opened/i)).toBeTruthy();
release({ path: "/home/ruben/webshop" });
});
@@ -404,7 +404,7 @@ describe("typing a path", () => {
});
it("reads what was typed the way a shell would", () => {
- // The field says "like cd" — so people type the cd. It is not part of the
+ // The field used to say "like cd" — so people typed the cd. It is not part of the
// path, and neither are the quotes around a path pasted from a terminal.
expect(normalizeTypedPath("cd haral\\.personal-jarvis")).toBe(
"haral\\.personal-jarvis",
@@ -480,7 +480,8 @@ describe("typing a path", () => {
path: "/home/ruben/nope",
parent: "/home/ruben",
entries: [],
- error: "Not a folder: /home/ruben/nope",
+ error:
+ "There is no folder called /home/ruben/nope. Check the spelling, or pick a folder from the list.",
device_name: "Rubens MacBook",
}
: { ...LISTING, path: "/home/ruben", parent: "/home" },
@@ -493,7 +494,7 @@ describe("typing a path", () => {
fireEvent.change(input, { target: { value: "nope" } });
fireEvent.keyDown(input, { key: "Enter" });
- expect(await screen.findByText(/Not a folder/)).toBeTruthy();
+ expect(await screen.findByText(/no folder called/)).toBeTruthy();
expect(onSelect).not.toHaveBeenCalled();
});
});
diff --git a/jarvis/ui/web/frontend/src/components/agentic/FolderPicker.tsx b/jarvis/ui/web/frontend/src/components/agentic/FolderPicker.tsx
index 35ae957ba3..434592fcaa 100644
--- a/jarvis/ui/web/frontend/src/components/agentic/FolderPicker.tsx
+++ b/jarvis/ui/web/frontend/src/components/agentic/FolderPicker.tsx
@@ -302,11 +302,11 @@ export function FolderPicker({
const payload = extractDropPayload(event.dataTransfer);
if (!payload.path && !payload.name) {
setDropNote(
- "That drop carried no folder — browse to it or paste its path.",
+ "That was not a folder. Drop a folder here, or pick one from the list.",
);
return;
}
- setDropNote("Resolving the dropped folder…");
+ setDropNote("Finding the folder you dropped…");
// The desktop shell knows the real path of what was dropped and says so a
// moment after the drop; with only a name, that beats searching for it.
// The wait itself is armed here, synchronously, so no announcement is
@@ -327,7 +327,7 @@ export function FolderPicker({
void load(res.resolved);
} else {
setDropChoices(res.candidates);
- setDropNote(res.detail || "Could not resolve that folder.");
+ setDropNote(res.detail || "Could not find that folder.");
}
})
.catch((e) => setDropNote((e as Error).message));
@@ -359,7 +359,7 @@ export function FolderPicker({
<div className="pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-surface bg-background/85 ring-2 ring-inset ring-primary/60">
<span className="flex items-center gap-2 text-sm font-medium text-primary">
<FolderOpen className="h-4 w-4" />
- Drop a folder to open it here
+ Let go to use this folder
</span>
</div>
)}
@@ -397,14 +397,14 @@ export function FolderPicker({
onClick={browseNatively}
disabled={nativeOpen}
data-testid="native-browse"
- title="Open the folder window this computer normally uses"
+ title="Choose the folder in a normal folder window"
>
{nativeOpen ? (
<Loader2 className="h-3.5 w-3.5 animate-spin" />
) : (
<FolderOpen className="h-3.5 w-3.5" />
)}
- {nativeOpen ? "Waiting…" : "Browse"}
+ {nativeOpen ? "Window open…" : "Browse"}
</Button>
)}
<IconButton
@@ -455,8 +455,8 @@ export function FolderPicker({
that hung. Saying so costs one line and saves the confusion. */}
{nativeOpen && (
<p className="px-3 pb-2 text-xs text-primary" role="status">
- A folder window is open — pick a folder there. If you cannot see it,
- check behind this window or on your taskbar.
+ A folder window has opened. Choose your folder there. If you cannot
+ see it, it is behind this window or in the taskbar.
</p>
)}
@@ -668,9 +668,9 @@ export function joinPath(base: string, name: string): string {
/**
* What was typed, read the way a shell would read it.
*
- * The field says "like cd", so people type `cd projects` — the command word is
- * not part of the path and is dropped (with cmd's `/d`), and so are quotes
- * around a path pasted from a terminal.
+ * The field used to say "like cd", and people typed `cd projects` — the command
+ * word is not part of the path and is dropped (with cmd's `/d`), and so are
+ * quotes around a path pasted from a terminal.
*/
export function normalizeTypedPath(raw: string): string {
let value = raw.trim();
@@ -821,7 +821,7 @@ function PathInput({
// first, and an immediate close would remove the element under the
// pointer before the click lands on it.
onBlur={() => window.setTimeout(() => setOpen(false), 150)}
- placeholder="…or type a path — Tab completes, like cd"
+ placeholder="…or type a folder name here — Tab completes it"
aria-label="Folder path"
data-testid="folder-path-input"
className="w-full pr-8 font-mono text-xs"
diff --git a/tests/unit/agentic_ide/test_session.py b/tests/unit/agentic_ide/test_session.py
index 0613c5e403..263dcca107 100644
--- a/tests/unit/agentic_ide/test_session.py
+++ b/tests/unit/agentic_ide/test_session.py
@@ -129,7 +129,7 @@ async def test_custom_names_are_kept_and_deduplicated(
async def test_start_rejects_a_missing_folder(registry: Registry, tmp_path: Path) -> None:
- with pytest.raises(SessionError, match="Not a folder"):
+ with pytest.raises(SessionError, match="no folder called"):
await registry.start(str(tmp_path / "nope"), [{"agent": "claude"}])
diff --git a/tests/unit/web/test_agentic_ide_folders_route.py b/tests/unit/web/test_agentic_ide_folders_route.py
index da9e0310a3..d3340dff46 100644
--- a/tests/unit/web/test_agentic_ide_folders_route.py
+++ b/tests/unit/web/test_agentic_ide_folders_route.py
@@ -31,5 +31,6 @@ async def test_a_typed_tilde_becomes_the_home_folder() -> None:
async def test_a_path_that_is_not_a_folder_is_reported_not_listed(tmp_path: Path) -> None:
res = await routes.get_folders(path=str(tmp_path / "cd haral"))
- assert res.error and "Not a folder" in res.error
+ # Plain words, and what to do next — this line is shown to the person as is.
+ assert res.error and "no folder called" in res.error and "pick a folder" in res.error
assert res.entries == []