Skip to content

Priority report: fix badge colors to match tier definitions#177

Merged
StudioNirin merged 1 commit into
StudioNirin:mainfrom
Brandon-Haney:fix/issue-175-priority-badge-colors
Jun 5, 2026
Merged

Priority report: fix badge colors to match tier definitions#177
StudioNirin merged 1 commit into
StudioNirin:mainfrom
Brandon-Haney:fix/issue-175-priority-badge-colors

Conversation

@Brandon-Haney

Copy link
Copy Markdown
Collaborator

Fixes #175

Problem

On the Priority Report (and the storage breakdown, file table, and eviction simulator), the per-item score badges were colored with outdated thresholds — >= 70 for green/high and >= 40 for orange/medium. The Priority Distribution legend and the backend tier counts use 90-100 high, 70-89 medium, 0-69 low. As a result the badge color contradicted the legend: a score of 85 or 70 showed green (when the legend marks them medium), and a 60 showed orange (when the legend marks it low/eviction).

Fix

Align the badge color thresholds in the four templates with the canonical tier boundaries already used by the backend (cache_service.py):

  • >= 90 -> high (green)
  • >= 70 -> medium (orange)
  • < 70 -> low (red)

This makes the list badges match the Priority Distribution cards, the footer summary badges, and the actual eviction behavior.

Test steps

  1. Cache a set of items with a spread of priority scores (or use --show-priorities).
  2. Open the web UI -> Cache -> Priority Report.
  3. Confirm the score badge colors now match the Priority Distribution legend:
    • 90-100 renders green (High)
    • 70-89 renders orange (Medium)
    • 0-69 renders red (Low)
  4. Spot-check the Storage breakdown, the cache file table, and the eviction simulator preview — badge colors are consistent everywhere.

The score badges in the priority report, storage breakdown, file table,
and eviction simulator colored scores with stale cutoffs (>=70 high,
>=40 medium), so the badge color disagreed with the Priority Distribution
legend and the backend tier counts. Use the canonical boundaries
(>=90 high, >=70 medium, <70 low) so badges match the distribution cards,
the footer summary, and eviction behavior.
@StudioNirin StudioNirin merged commit 133c0de into StudioNirin:main Jun 5, 2026
2 checks passed
@Brandon-Haney Brandon-Haney deleted the fix/issue-175-priority-badge-colors branch June 7, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Priority Report Wrong Colors

2 participants