[Bug]: Markdown checklist in file preview can't be checked for files outside the workspace
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 62/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
- Lĩnh vực
- frontend
Hướng nghiên cứu
Start in apps/web/src/components/files/FilePreviewPanel.tsx and trace how readOnly is set for host paths and how onTaskListChange reaches RenderedMarkdownSurface. Then review the checkbox fallback in apps/web/src/components/ChatMarkdown.tsx and the path helper in packages/shared/src/path.ts. Done when host-path checkboxes either work when write scope allows it or clearly show why they are disabled; cover the behavior with a focused test.
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
- Create a Markdown file outside the thread's workspace, e.g.
~/Desktop/notes.md:- [ ] Buy milk - [ ] Call the bank - Open it in the Files panel, for example by clicking a link to
~/Desktop/notes.mdin a chat message. - Switch to the rendered Markdown view.
- Click the checkbox next to "Buy milk".
Expected behavior
The checkbox toggles and the file is saved as - [x] Buy milk, as it is for a Markdown file inside the workspace. If the file has to be read-only, the preview should say so. A silently disabled checkbox looks broken.
Actual behavior
The click does nothing. The box stays unchecked, the file stays unchanged, and nothing explains why.
Impact
Minor bug or occasional failure
Version or commit
macOS desktop app 0.1.10-nightly.20261112.4564. Code references are from main @ ee90bdc.
Environment
macOS (Darwin 25.6.0), T3 Code Nightly desktop app.
Diagnosis
The toggle works for files inside the workspace. RenderedMarkdownSurface passes onTaskListChange only when the surface is not read-only, and the Files panel marks it read-only for any host path:
FilePreviewPanel.tsx#L1085-L1086, #L1606
const isHostFile =
attachment !== undefined || (relativePath !== null && isHostPath(relativePath));
...
readOnly={file.data.truncated || isHostFile || !canWriteFiles}
isHostPath is true for any absolute or ~/ path (packages/shared/src/path.ts#L129). Once onTaskListChange is undefined, ChatMarkdown's input renderer falls back to <input type="checkbox" readOnly> with no other cue (ChatMarkdown.tsx#L1071-L1080). The same thing happens for chat attachments, truncated files, and sessions without filesystem write scope.
Possible fixes:
- Let task-list toggles write to host-path Markdown files when the environment has filesystem write scope, since the agent can already edit those files.
- At minimum, when the checkbox is read-only, render it visibly disabled or with a tooltip such as "Read-only: file is outside the workspace" so the click doesn't look broken.
Related but different: #27338 (checkbox state carried over to the wrong row after an edit).
- 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ự
-
Autocomplete still accepts an option after becoming disabledCó thể đã có người làm @Xapollon430 đã nhận hôm nay. Đang mở
Độ 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 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ó 1/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 72/100
reduxjs/react-redux#2416 · 1 bình luận ·