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

Abierto Apto para principiantes
#33,044 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
67/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
frontend

Línea de trabajo

Empieza en apps/web y sigue los estilos compartidos del chip de adjunto y el token de color del PDF mencionado en el issue. Comprueba cómo aplica el chip su color de acento al icono, al nombre del archivo y al tamaño, y compáralo con el estado no válido. La tarea estará terminada cuando un chip de PDF correcto conserve una indicación de color PDF mientras su texto coincida con el texto circundante, y los chips fallidos sigan viéndose claramente como errores.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
24.8k
Forks
6.4k
Merge medio
8 h 26 min
PR fusionados (30 d)
133

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pingdotgg/t3code

Todos los issues de pingdotgg/t3code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.