desktop: directory picker submits home directory instead of typed path when adding a project
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- electron, typescript
Hướng nghiên cứu
Báo cáo xác định DirectoryPickerDialog là điểm vào phía client. Hãy đọc trình xử lý gửi và cách ô nhập tìm kiếm, gợi ý đang hoạt động và lựa chọn hiện tại được theo dõi; sau đó tái hiện luồng Windows bằng cách nhập đường dẫn tuyệt đối và chọn thư mục mà không chọn gợi ý nào. Hoàn tất khi yêu cầu sử dụng đường dẫn đã nhập hoặc thao tác gửi bị chặn cho đến khi đường dẫn được xác nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
In the "Open project" (Add project) directory picker, typing an absolute path (e.g. F:\Video-Edit) and clicking Select folder without first clicking the matching suggestion row submits the server's default location (C:\Users\<user>) instead of the typed path. The app then switches to the drive-root project C:/ (project id global), so "Add project" always lands on C:.
Environment
- opencode version: 2.2.0 (OpenCode Desktop, bundled
opencode-cli.exe, Electron 44.9.1 / Chrome 152) - OS: Windows 11 (Windows_NT 10.0.26200, win32 x64)
- Terminal: Unavailable — reproduced in the desktop app (v2 web UI served by the background service), not a terminal
- Shell: cmd.exe (system default)
- Install/channel: desktop, channel
latest - Active plugins: none found in
~/.config/opencode/opencode.jsonc(only MCP servers configured)
Reproduction
- Open the v2 web UI served by the desktop's background service (e.g. via an
opencode pairlink) and go to Home. - Click Add project. The in-app "Open project" dialog opens; the footer/selection line shows the home directory (
C:\Users\<user>). - Type an absolute path on another drive, e.g.
F:\Video-Edit, into the search input. Suggestions appear (F:\Video-Edit/, its subfolders, ...). Do not click a suggestion. - Click Select folder.
- Watch the network tab: the app sends
GET /api/location?location[directory]=C%3A%5CUsers%5C%3Cuser%3E(HTTP 200) — the typed path is ignored. - Home switches to the project
C:(worktreeC:/, idglobal).
Verified working alternative: click the suggestion row F:\Video-Edit/ first (the footer line changes to F:\Video-Edit), then click Select folder — the request is then GET /api/location?location[directory]=F:\Video-Edit.
Note: pressing ArrowDown only sets the highlighted (active) suggestion; with an active-but-not-chosen suggestion, Select folder still submitted the home directory in my test.
Expected Behavior
Select folder should submit the typed path (or the active suggestion), i.e. resolve F:\Video-Edit — or refuse to submit while the input contains an unconfirmed path.
Actual Behavior
The dialog submits the server default location directory. The server resolves it to the drive-root project and the client switches selection to it:
- Sent:
GET /api/location?location[directory]=C:\Users\<user>→ 200 - Response:
{"directory":"C:\\Users\\<user>","project":{"id":"global","directory":"C:\\","canonical":"C:\\"}} - Home selection becomes the
C:/project.
For comparison, the server itself resolves paths correctly — the bug is client-side state handling in DirectoryPickerDialog (submit uses the current selection, defaulting to the home root, instead of the input text / active suggestion):
GET /api/location?location[directory]=F:\Video-Edit
→ {"directory":"F:\\Video-Edit","project":{"id":"d72c10…","directory":"F:\\Video-Edit","canonical":"F:\\Video-Edit"}}
Additional Context
- Frequency: 100% reproducible via the in-app (server-kind) picker on Windows.
- Workaround: click the suggestion row first so the footer shows the intended path, then Select folder; or resolve the directory via the API/CLI directly.
- Related annoyance: the
global(C:/) project keeps reappearing in Home because default-location bootstraps (GET /api/locationwith no directory) touch it on every relevant page load. - The desktop-native flow (Electron
openDirectorypicker) was not separately verified in this session; this report covers the in-app DirectoryPickerDialog served at the v2 web UI.
- Ngôn ngữ chính
- TypeScript
- Star
- 221k
- Fork
- 29.6k
- Merge trung bình
- 4 giờ 53 phút
- Pull request đã merge (30 ngày)
- 506
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
anomalyco/opencode#59557 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
anomalyco/opencode#59302 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Local copy writes the clipboard natively and via OSC 52 at once, racing the terminal (macOS)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
anomalyco/opencode#59052 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
auth list hides subpath identity and shows duplicate rows for distinct auth recordsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#59040 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
reproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
anomalyco/opencode#58981 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
[Bug]: Payment providers removed from config are never disabled in payment_providerCó thể đã có người làm @medusa-os-bot đã nhận hôm nay. Đang mởtype: bug
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 82/100
medusajs/medusa#17544 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
software-mansion/argent#1651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
lane:reliability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày