Skip to content

fix(chat): support folder selection and visible workspace roots - #657

Open
Is14w wants to merge 3 commits into
Stack-Cairn:mainfrom
Is14w:fix/composer-folder-picker
Open

fix(chat): support folder selection and visible workspace roots#657
Is14w wants to merge 3 commits into
Stack-Cairn:mainfrom
Is14w:fix/composer-folder-picker

Conversation

@Is14w

@Is14w Is14w commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Linked issue

Closes #654

Summary

  • Split the Composer attachment action into explicit Files and Folder choices. Desktop uses the native folder picker; WebUI accepts browser directory selection and imports the resulting directory tree.
  • Mount selected or dropped external directories as workspace roots and show their aliases under the active project root in the right-side File Tree.
  • Keep external roots read-only in the File Tree and avoid unsupported primary-workspace-only actions, while preserving their real paths for copy, reveal, and desktop open operations.
  • Refresh File Tree roots after folder mount or manual refresh, and prevent delayed roots from a previous project appearing after a workspace switch.

Change scope

  • Modules: agent-ui, agent-gui, agent-gateway/web, architecture docs
  • Key paths:
    • crates/agent-ui/src/pages/chat/ChatComposerBar.tsx
    • crates/agent-ui/src/components/project-tools/file-tree/*
    • crates/agent-gui/src/pages/ChatPage.tsx
    • crates/agent-gui/src/pages/chat/hooks/useUploadZoneDrop.ts
    • crates/agent-gateway/web/src/app/{GatewayApp.tsx,GatewayAppView.tsx}
    • crates/agent-gateway/web/src/app/hooks/{useDirectoryDropActions.ts,usePendingUploads.ts}
    • crates/agent-gateway/web/src/lib/directoryDrop.ts
    • docs/architecture/{gui.md,webui.md}

Screenshots / preview

Draft pending a manual desktop capture before review:

  1. Open a conversation with a workspace, choose + -> Folder, and select a directory outside the workspace.
  2. Open the right-side File Tree and expand the selected folder's alias beneath the project root.
  3. Show that the external root is browseable but has no write or mention actions.
image image

Verification

  • pnpm --dir crates/agent-ui typecheck
  • node --test crates/agent-gateway/test/webui/directory-import.test.mjs (5 passed)
  • node --test crates/agent-gui/test/chat/execution-mode-model-picker.test.mjs crates/agent-gui/test/settings/right-dock-model.test.mjs (39 passed)
  • node --test crates/agent-gui/test/workspace-file-tree-row.test.mjs (2 passed)
  • pnpm --dir crates/agent-gui build
  • pnpm --dir crates/agent-gateway/web build
  • git diff --check upstream/main...HEAD

Earlier full-suite verification before this documentation-only follow-up:

  • pnpm --dir crates/agent-gateway/web test (633 passed)
  • pnpm --dir crates/agent-gui test:frontend (2,613 passed; 5 pre-existing failures: four Windows CRLF-sensitive source-text assertions and one Rust/TypeScript builtin-provider preset synchronization assertion, none in paths modified by this PR.)

Pre-submit checklist

  • A requirement issue is linked (or this is a trivial fix that needs no issue, as explained in the summary).
  • Synced with the target branch; no merge conflicts.
  • The change is focused, with no unrelated modifications.
  • No secrets, tokens, or personal data included.
  • Docs are updated for changes affecting user behavior, deployment, or configuration.

@Is14w
Is14w marked this pull request as ready for review August 28, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Composer 'Files & folders' flow does not fully support folders

1 participant