feat(workspace): allow entering hidden paths in the folder browser#1363
Open
xingyaoww wants to merge 1 commit into
Open
feat(workspace): allow entering hidden paths in the folder browser#1363xingyaoww wants to merge 1 commit into
xingyaoww wants to merge 1 commit into
Conversation
The folder browser only lists non-hidden directories because the agent-server's /api/file/search_subdirs endpoint filters out dot-entries. This left no way to add a hidden directory (e.g. ~/.config) as a workspace. Replace the read-only current-path display with an editable path input plus a 'Go' button so users can type or paste any absolute path. A leading '~' is expanded against the backend-reported home directory. Navigating sets currentPath, which drives both the listing and the 'Add this directory' action, so a typed hidden path becomes addable even though it never appears in the listing. Co-authored-by: openhands <openhands@all-hands.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
✅ Mock-LLM E2E Tests55/55 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
6 tasks
Contributor
✅ Mock-LLM Docker E2E Test Results55/55 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HUMAN:
AGENT:
Why
Agent-canvas cannot add a hidden directory (e.g.
~/.some-directory,~/.config) as a workspace. The folder browser only ever shows non-hidden directories because the agent-server'sGET /api/file/search_subdirsendpoint filters out any entry whose name starts with.(seesoftware-agent-sdk/openhands-agent-server/openhands/agent_server/file_router.py). Since the previous UI only let you click through the listed folders, there was no way to reach a dot-directory at all.Summary
FolderBrowserModalwith an editable path input + "Go" button so users can type or paste any absolute path — including hidden directories the listing never surfaces.~is expanded against the backend-reported home directory (the agent-server requires absolute paths).currentPath, which already drives both the listing query and the "Add this directory" action, so a typed hidden path becomes addable without any backend change.HOME$GO_UP,HOME$PATH_INPUT_LABEL,HOME$PATH_INPUT_PLACEHOLDER,HOME$GO_TO_PATH.This is the frontend-only fix (Option A). A follow-up PR adds a backend
include_hiddentoggle (Option B).Issue Number
N/A (reported via chat with a screenshot of the "Add workspaces" browser).
How to Test
npm cinpm run devand open the app.~/.config(or an absolute path like/Users/<you>/.ssh), and press Enter / click Go.Automated:
npm run typecheck✅npm run build✅npm run check-translation-completeness✅npx vitest run __tests__/components/features/home/workspace-selection-form.test.tsx✅ (14 passed, incl. new "lets the user type a hidden path and add it as a workspace")tests/e2e/mock-llm/home/mock-llm-folder-workspace.spec.tscreates a.hidden-workspacedir, navigates to it via the path input, and verifies it is added.Video/Screenshots
Not captured in this environment (the running dev stack serves a different checkout). Behaviour is covered by the new unit test and the new mock-LLM E2E step described above.
Type
Notes
folder-browser-current-pathtest id is preserved (now an<input>); unit + E2E assertions were updated fromtoHaveText/toHaveTextContenttotoHaveValueaccordingly.This PR was created by an AI agent (OpenHands) on behalf of the user.
🐳 Docker images for this PR
• GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas
ghcr.io/openhands/agent-canvasghcr.io/openhands/agent-server:1.28.1-pythonopenhands-automation==1.0.0a980446329d6a738e86387ec5193fa7141fc9e5dc6Pull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-8044632Run
All tags pushed for this build
About Multi-Architecture Support
sha-8044632) is a multi-arch manifest supporting both amd64 and arm64sha-8044632-amd64) are also available if needed