Widget ignores short hex category colors (#CCC), so Uncategorized gets a fallback color
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start with widget/CategoryTimeWidgetUpdater.kt, especially resolveBarColors around lines 295–301, and the Robolectric test resolveBarColors_acceptsShortHexFromWebui described in the issue. Compare the stored short hex values with the behavior of Color.parseColor. Done when #CCC and #0F0 render as gray and green instead of fallback colors, with the test passing.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Kotlin
- Stars
- 291
- Forks
- 73
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 27
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ActivityWatch/aw-android
-
WebWatcher: keyboard events still split visits in detected browsers (browserIsActiveWindow checks only the hard-coded list)Possibly taken @TimeToBuildBob claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ActivityWatch/aw-android#435 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ActivityWatch/aw-android#431 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ActivityWatch/aw-android#430 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ActivityWatch/aw-android#383 · 2 comments ·
Maintainers usually reply within 2 days
-
Web watcher: add support for Brave (`com.brave.browser` missing from KNOWN_BROWSER_PACKAGES)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ActivityWatch/aw-android#306 · 1 comment · 2 reactions ·
Maintainers usually reply within 2 days
All issues in ActivityWatch/aw-android
Similar issues
-
Area: Java bug report needs triage OS: Windows
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
actions/runner-images#15458 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nwverse/persona#22164 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
valkey-io/valkey-glide#8000 ·
Maintainers usually reply within 2 days
-
Declare two limitations the 2026-12-02/03 plausibility runs confirmed: Huxleys ticket link, Gretchen flyerPossibly taken A pull request linked to this issue is open or already merged. Openafk-ok area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
enorm-labs/event-junkie#5887 ·
Maintainers usually reply within 1 day