Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Download buttons in HTML previews do nothing

Đã đóng Phù hợp với người mới
#14,362 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@stickerdaniel đang làm issue này rồi.

Từ ngày 30/9/2026.

  • #14363 của @stickerdaniel — đang mở
  • #16950 của @juliusmarminge — đang mở

Đá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
84/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ệ
playwright, typescript
Lĩnh vực
frontend, security

Hướng nghiên cứu

Bắt đầu với CSP trong apps/server/src/http.ts và tìm cấu hình sandbox của iframe BrowserDocumentFrame. Tái hiện việc tải xuống data-URL trong Playwright Chromium, sau đó xác minh rằng các thiết lập sandbox cho phép tải xuống trong khi vẫn giữ nguyên các hạn chế hiện có. Được xem là hoàn tất khi nút tải xuống của bản xem trước HTML lưu được tệp mà không làm lộ cookie, bộ nhớ lưu trữ hoặc API.

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/server

Steps to reproduce
  1. Have an agent write an HTML file with a download button into the workspace, for example <a href="data:text/plain,hi" download="hi.txt">Download</a>.
  2. Open it from a chat link or the file preview.
  3. Click the button.
Expected behavior

The file downloads.

Actual behavior

Nothing happens, and the page shows no error. HTML assets are served with Content-Security-Policy: sandbox allow-scripts allow-forms allow-popups allow-modals (apps/server/src/http.ts), and BrowserDocumentFrame uses the same list for its iframe sandbox. Chromium drops every download from a sandboxed document unless the sandbox includes allow-downloads.

Adding it keeps the opaque origin, so cookies, storage, and the API stay out of reach.

Impact

Minor bug or occasional failure

Version or commit

main @ 0fcd5f906

Environment

macOS, T3 Code (Nightly) desktop. Also reproduced in Playwright Chromium by serving a page with the same header.

Workaround

Open the file outside T3 Code.

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
8 giờ 4 phút
Pull request đã merge (30 ngày)
199

Chuẩn bị môi trường

Mở trong Codespaces

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.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.