[Bug]: "Add project starts in" saved on the All environments scope copies one machine's path to every machine
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
Hướng nghiên cứu
Start with settingsScope.ts, SettingsPanels.tsx, and scopedSettings.ts to trace how the All environments scope saves addProjectBaseDirectory; then read CommandPalette.tsx and AddProjectToMachineDialog.tsx to see how the picker uses it. The report offers several possible fixes, so first determine which behavior to implement. Done means a path from one machine cannot send the other machine's picker to a nonexistent directory; cover the chosen behavior with focused tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Connect a macOS desktop app to a remote Linux environment, so Settings has two environments.
- Open Settings → New projects and leave the scope selector on its default, All environments.
- Set Add project starts in to a Mac folder, e.g.
/Users/me/code/. - Open Add Project and choose the Linux environment.
Expected behavior
The Linux environment's picker opens in a folder that exists on Linux. That could be its own value or ~/. A path that only exists on another machine shouldn't reach the Linux server.
Actual behavior
The Linux picker opens at /Users/me/code/, which doesn't exist there. You have to clear the field back to / and browse down to your projects every time.
The Linux server's own ~/.t3/userdata/settings.json now contains "addProjectBaseDirectory": "/Users/me/code/". Fixing it for one machine takes knowing to switch the settings scope to that environment first. Nothing on the default scope suggests this setting is per-machine.
Impact
Minor bug or occasional failure
Version or commit
macOS desktop 0.1.10-nightly.20261112.4564, remote Linux environment on the same version. Code references are from main @ ee90bdc.
Environment
macOS desktop app plus a remote Ubuntu server environment.
Diagnosis
This is a follow-up to #11756, which was closed after per-environment scope selection was added in #10589. Per-environment values work, but the default scope still writes one filesystem path to every machine:
- With no machine selected, the settings scope resolves to
kind: "all"with every environment id (settingsScope.ts#L144-L149). - The field commits with
updateSettings({ addProjectBaseDirectory: next })(SettingsPanels.tsx#L1751), andplanScopedSettingsPatchsends it to every connected environment in that scope (scopedSettings.ts#L220-L232). - The picker uses the stored value as-is and only falls back to
~/when it's empty, not when the directory is missing on that machine (CommandPalette.tsx#L671-L679).AddProjectToMachineDialog.tsx#L115does the same.
Possible fixes, any of which would help:
- Treat machine-specific path settings (
addProjectBaseDirectory, and likelynewProjectsRoot) as per-environment only. On the All environments scope, show the field read-only or ask which environment to set. - Before saving a path to an environment, check it exists there, or warn when it doesn't.
- In the Add Project picker, fall back to
~/when the configured directory doesn't exist on the target environment.
Workaround
In Settings, switch the scope selector to the remote environment and set Add project starts in there.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 4 giờ 16 phút
- Pull request đã merge (30 ngày)
- 352
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- 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 pingdotgg/t3code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
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
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
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 67/100
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 82/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
idea-scout idea:453
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
jeanibarz/agent-notebook#453 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
level/task
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
wazuh/wazuh-dashboard-plugins#9642 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 91/100
unicef/adt-studio#1112 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
feature request good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
TabularisDB/tabularis#1513 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100