Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: Download buttons in HTML previews do nothing

オープン 初心者向け
#14,362 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
playwright, typescript
領域
frontend, security

調査の方向性

apps/server/src/http.ts の CSP から始め、BrowserDocumentFrame iframe の sandbox 設定を特定します。Playwright Chromium で data-URL のダウンロードを再現し、そのうえで、既存の制限を維持しながら sandbox 設定によってダウンロードが許可されることを確認します。HTML プレビューのダウンロードボタンで、Cookie、ストレージ、API を公開することなくファイルを保存できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
24k
フォーク
6.3k
平均マージ
10時間 20分
マージ済み PR(30日)
309

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。