Widget ignores short hex category colors (#CCC), so Uncategorized gets a fallback color
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Empieza por widget/CategoryTimeWidgetUpdater.kt, especialmente por resolveBarColors alrededor de las líneas 295–301, y por la prueba de Robolectric resolveBarColors_acceptsShortHexFromWebui descrita en el issue. Compara los valores hexadecimales cortos almacenados con el comportamiento de Color.parseColor. El trabajo estará terminado cuando #CCC y #0F0 se muestren en gris y verde en lugar de con colores de reserva y la prueba pase.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The home-screen widget ignores 3-digit hex category colors and falls back to its rank colors. This includes aw-webui's own default for Uncategorized (COLOR_UNCAT = '#CCC', src/util/classes.ts) and the legacy saved defaults (Work '#0F0', Media '#F33', Comms '#9FF'). Uncategorized is often a top-3 category on Android, and the widget shows it as teal, purple or blue instead of the dashboard's gray.
resolveBarColors (widget/CategoryTimeWidgetUpdater.kt:295-301) passes the stored string straight to Color.parseColor. That method accepts only #RRGGBB and #AARRGGBB (plus a few names) and throws IllegalArgumentException("Unknown color") for #CCC. The catch then substitutes FALLBACK_ACCENT_COLORS[i]. The existing test parseCategoryColors_handlesShortHexColors only checks that "#0F0" survives the JSON parse; nothing exercises the render path.
Failing test (Robolectric):
@Test fun resolveBarColors_acceptsShortHexFromWebui() {
val ctx = RuntimeEnvironment.getApplication()
val colors = CategoryTimeWidgetUpdater.resolveBarColors(
ctx, listOf("Uncategorized", "Work"),
mapOf("Uncategorized" to "#CCC", "Work" to "#0F0"))
assertEquals(Color.parseColor("#CCCCCC"), colors[0]) // today: teal fallback
assertEquals(Color.parseColor("#00FF00"), colors[1]) // today: purple fallback
}
Fix direction: expand #RGB / #ARGB to the long form before calling parseColor.
Priority: low (cosmetic mismatch with the dashboard). This repo only has a priority: high label, so no priority label is set.
fingerprint: widget/CategoryTimeWidgetUpdater.kt — short hex category colors (#CCC) ignored, fallback color shown
Found by code review on master 3b820d61. Not run on a device.
- Lenguaje dominante
- Kotlin
- Estrellas
- 291
- Forks
- 73
- Merge medio
- 4 d 5 h
- PR fusionados (30 d)
- 27
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ActivityWatch/aw-android
-
WebWatcher: keyboard events still split visits in detected browsers (browserIsActiveWindow checks only the hard-coded list)Posiblemente ocupada @TimeToBuildBob la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ActivityWatch/aw-android#435 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ActivityWatch/aw-android#431 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ActivityWatch/aw-android#430 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ActivityWatch/aw-android#383 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
Web watcher: add support for Brave (`com.brave.browser` missing from KNOWN_BROWSER_PACKAGES)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ActivityWatch/aw-android#306 · 1 comentario · 2 reacciones ·
Los mantenedores suelen responder en 2 días
Todos los issues de ActivityWatch/aw-android
Issues similares
-
Area: Java bug report needs triage OS: Windows
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
actions/runner-images#15458 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nwverse/persona#22164 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
(core): a cluster client ignores insecure TLS when a CA certificate or client identity is setAbiertobug 🐞
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
valkey-io/valkey-glide#8000 ·
Los mantenedores suelen responder en 2 días
-
Declare two limitations the 2026-12-02/03 plausibility runs confirmed: Huxleys ticket link, Gretchen flyerPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoafk-ok area:data-quality importer size:S
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
enorm-labs/event-junkie#5887 ·
Los mantenedores suelen responder en 1 día