File view comments disappear from the file after switching threads and coming back
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
- 82/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ệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Đọc apps/web/src/components/files/FilePreviewPanel.tsx quanh dòng 683, sau đó so sánh cách apps/web/src/components/diffs/AnnotatableCodeView.tsx khôi phục các chú thích từ kho bản nháp của composer. Khôi phục các nhận xét về tệp hiện tại bằng mục và phạm vi dòng của chúng khi chế độ xem được mount. Hoàn thành khi các nhận xét inline đã gửi vẫn hiển thị sau khi chuyển đổi thread và quay lại tệp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
After adding a line comment in the file view, it shows inline under the commented lines. After switching to another thread and back, the inline comments are gone from the file. They still exist as chips in the chat composer, but the file no longer shows which lines were commented, so you can't see what you've already said about the file.
Diagnosis
EditableFileSurface keeps inline comments in local React state that starts empty: useState<FileCommentLineAnnotation[]>([]) (apps/web/src/components/files/FilePreviewPanel.tsx:683 at v0.1.7). Submitting a comment writes it to the composer draft store (addReviewComment) and to that local state, but nothing rebuilds the local state from the store when the view mounts. Switching threads unmounts the view, so the inline comments are lost even though reviewComments in the draft store still has them.
The diff view already handles this: AnnotatableCodeView reads getComposerDraft(target)?.reviewComments and rebuilds the stored annotations (apps/web/src/components/diffs/AnnotatableCodeView.tsx:125-157). The file view could do the same for comments whose sectionId is file:<path>, using startIndex/endIndex for the line range. Current main has the same useState([]) initializer.
Steps to reproduce
- Open a thread in a project and open any file in the right panel's file view.
- Select some lines, type a comment, and submit it. The comment appears inline under those lines, and a chip appears in the composer.
- Switch to another thread.
- Switch back and look at the same file.
- Expected: the inline comment is still shown. Actual: it's gone, and only the composer chip remains.
Version
0.1.7 (T3 Code Desktop)
Environment
macOS 15 (Darwin 24.6.0), arm64. Desktop app against its local server.
Evidence
Source reading at v0.1.7 and `main`, as described above. No logs are involved, since this is client-side UI state.
Related issues
None found.
Fix applied or workaround
The composer chips (<file> L<a> to L<b>) still list every submitted comment, and the comments are still sent with the next message.
Filed by
Diagnosed and written by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, via T3 Code triage
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 8 giờ 26 phút
- Pull request đã merge (30 ngày)
- 133
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
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/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 74/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 83/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
pingdotgg/t3code#33044 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/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ự
-
area: build-and-ci S3: minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
manaflow-ai/cmux#39902 ·
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 82/100
refined-github/refined-github#10387 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CopilotKit/CopilotKit#8283 · 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 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
complexity:simple priority:P3 ready-to-build
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
junruxiong/IncarnaMind#2919 ·