[Bug]: PDF attachment chips look like errors because the file-type colour is applied to the whole chip in red

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

apps/webから始め、共有されている添付チップのスタイルと、issueで言及されているPDFのカラートークンをたどってください。チップがアクセントカラーをアイコン、ファイル名、サイズにどのように適用しているかを確認し、無効な状態と比較してください。正常なPDFチップがPDFを示す色を保ちつつ、テキストは周囲のテキストと同じ色になり、失敗したチップは引き続きエラーだと明確にわかる状態になれば完了です。

索引モデルが 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/web

Steps to reproduce
  1. Use the default theme.
  2. Attach any valid PDF in the composer, or send a message with one.
  3. Look at the attachment chip.
Expected behavior

A healthy PDF attachment looks healthy. The chip can carry a PDF cue, but it shouldn't read as an error.

Actual behavior

The icon, filename and size all render in red, so a successful attachment looks like a failed upload.

Details from reading the built app:

  • --context-chip-doc-pdf is a fixed oklch(0.62 0.16 24), and only its lightness is adjusted for contrast per theme.
  • --context-chip-ink is bound to the accent and drives the label and the icon stroke, so the file-type colour takes over the whole chip.
  • The shared chip's invalid state uses --context-chip-invalid, which comes from errorForeground. That is usually a red close to hue 24, so a healthy PDF and a failed chip can be almost the same colour. On my custom theme, the healthy chip (about #f0706c) is more saturated than the error colour (#e07878).

Suggested fix: keep the accent on the icon only and let the filename and size inherit the surrounding text colour. The PDF cue stays, and red text can be reserved for real failures. A theme token for document chip colours would also help custom themes, as these colours can't currently be set from a theme file as far as I can tell.

Impact

Cosmetic issue

Version or commit

T3 Code (Beta) 0.1.7

Environment

macOS (Darwin 27.0.0), desktop app

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
8時間 26分
マージ済み PR(30日)
133

環境構築

Codespaces で開く

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

はじめの一歩

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

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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