fix(research): emit colors on the study category preset - #1441
Merged
ErikBjare merged 1 commit intoSep 9, 2026
Merged
Conversation
The research-study taxonomy shipped without data.color, so the Activity view rendered it unstyled. Map every study category to a stable hex color and fail the build if the table drifts from the watcher map. ActivityWatch#1439. Git-Session-Id: d16d
Contributor
Contributor
Author
🤖 AI code reviewSafe to merge — no P0/P1 findingsConfidence 5/5 ✅ No findings. The diff looks correct to me on this pass. Reviewed Maintainer commands
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Research Edition web UI ships a
research-studycategory set viascripts/emit_research_category_preset.py→AW_PRESET_CATEGORY_SETS. Theemitted taxonomy had no
data.color, so the Activity view rendered studycategories unstyled (grey) next to the colored built-in
defaultset.Tracked in #1439 (the companion aw-webui change
stops
defaultfrom silently winning; this PR is the color half).What this does
CATEGORY_COLORS.build_preset()fails the build if the color table drifts fromCATEGORY_MAP ∪ APP_CATEGORY_MAP(missing or extra keys).type/regex/ignore_caseonly) so theoldest pinned web UI parser still accepts the payload.
Tests
python3 -m pytest scripts/tests/test_emit_research_category_preset.py -q— 13 passed.#RRGGBBcolorNotes
Does not close #1439 on its own. The Activity view still needs the shipped
preset to be the active set (aw-webui follow-up) and a research recut to
pick both up.