feat(workspace): add 'Show hidden folders' toggle to the folder browser#1364
Draft
xingyaoww wants to merge 1 commit into
Draft
feat(workspace): add 'Show hidden folders' toggle to the folder browser#1364xingyaoww wants to merge 1 commit into
xingyaoww wants to merge 1 commit into
Conversation
The folder browser cannot show hidden (dot) directories because the agent-server filters them out server-side. Pair the new agent-server 'include_hidden' query param with a 'Show hidden folders' checkbox in the folder browser: when enabled, the sidebar favorites and the main listing request hidden directories so users can browse into and add a hidden directory (e.g. ~/.config) as a workspace. useSearchSubdirs/useHomeDirectory gain an includeHidden arg. The pinned typed FileClient cannot forward include_hidden yet, so the hidden path goes through the typed HttpClient as a temporary bridge; older agent-servers ignore the unknown param and keep filtering, so this is backward-compatible. Co-authored-by: openhands <openhands@all-hands.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
✅ Mock-LLM E2E Tests54/54 passed Commit:
Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
Contributor
✅ Mock-LLM Docker E2E Test Results54/54 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 show or add a hidden directory (e.g.
~/.config,~/.ssh, a hidden repo) as a workspace, because the agent-server's file-browser endpoints (/api/file/search_subdirs,/api/file/home) filter out dot-entries server-side. This is the GUI half of "Option B" — a server-driven "Show hidden folders" toggle (the companion to the frontend-only path-input fix in #1363).Summary
useSearchSubdirs/useHomeDirectorygain anincludeHiddenarg (defaultfalse) that forwardsinclude_hidden=trueto the agent-server.HOME$SHOW_HIDDEN_FOLDERS(all 15 languages).Issue Number
N/A (reported via chat). Depends on the agent-server change below.
Dependencies (must ship first)
This PR's toggle only has an effect once the agent-server understands
include_hidden:include_hiddenquery param to/api/file/search_subdirsand/api/file/home.Older agent-servers simply ignore the unknown query param and keep filtering hidden entries, so merging this ahead of a deployment is safe (the toggle is a no-op until the server supports it). Marking this PR draft until the agent-server change is released/deployed.
Implementation note
The pinned typed
FileClientcannot forwardinclude_hiddenyet, so the hidden-folder path goes through the typedHttpClientas a documented, temporary bridge (with a scopedeslint-disableand a comment). Follow-up: once@openhands/typescript-client'sFileClient.searchSubdirectories/getHomeacceptinclude_hidden, bump the pin and drop theHttpClientbridge.How to Test
npm ci && npm run dev..config) now appear in the listing and sidebar.Automated:
npm run typecheck✅npm run build✅npm run check-translation-completeness✅npx vitest run __tests__/hooks/query/use-search-subdirs.test.tsx __tests__/components/features/home/workspace-selection-form.test.tsx✅ (17 passed). Newuse-search-subdirstests assert the default path uses the typedFileClient(noinclude_hidden) and the toggle path callsHttpClientwithinclude_hidden: truefor bothsearch_subdirsandhome.No mock-LLM E2E was added for the toggle because the E2E stack's released agent-server does not yet support
include_hidden; E2E coverage should land alongside the agent-server bump.Video/Screenshots
Not captured (requires the unreleased agent-server change to demonstrate the filtering effect). Covered by the unit tests above.
Type
Notes
Sibling PR: #1363 (Option A — frontend-only path input, no backend dependency).
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.0a9802a322fc980eb55048a3e47febf13bb1bae7a67Pull (multi-arch manifest)
# Multi-arch manifest — Docker automatically pulls the correct architecture docker pull ghcr.io/openhands/agent-canvas:sha-802a322Run
All tags pushed for this build
About Multi-Architecture Support
sha-802a322) is a multi-arch manifest supporting both amd64 and arm64sha-802a322-amd64) are also available if needed