Skip to content

fix(monitoring): scale tool-call heatmap colors by displayed cells only - #5898

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/heatmap-maxvalue-scale-w1
Aug 11, 2026
Merged

fix(monitoring): scale tool-call heatmap colors by displayed cells only#5898
pedrofrxncx merged 1 commit into
mainfrom
fix/heatmap-maxvalue-scale-w1

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Follows #5865 (tool-call heatmap by agent), which merged just before this tick.

Bug: ToolAgentHeatmap picks the top 12 tools and top 8 agents by total volume, then colors each cell with heatmapLevelClass(value, maxValue). But maxValue was computed by scanning every cell that matched the top-12 tools, without also restricting to the top-8 agents actually rendered. An agent that gets filtered out of the top 8 (low total across all its tools) can still have a single outlier cell higher than anything shown in the rendered grid — that outlier silently becomes the color-scale ceiling, so every displayed cell renders duller than its real share of the visible data, including the actual max cell shown.

Fix: compute maxValue only over cells whose tool AND agent both made the top lists — i.e. the same set that's actually rendered in the grid.

How to verify: cd apps/web && bunx tsc --noEmit (no errors touching overview.tsx) and bunx oxlint apps/web/src/routes/orgs/monitoring/overview.tsx (0 warnings/errors). This is a pure rendering-logic fix with no new dependency or schema change; full CI validates the rest.

Checked locally: bun run fmt, targeted tsc --noEmit in apps/web, bunx oxlint on the changed file.


Summary by cubic

Fix heatmap color scaling in ToolAgentHeatmap by normalizing against only the displayed cells (top 12 tools × top 8 agents). This prevents hidden outliers from setting the scale and makes visible cells reflect their true relative values.

  • Bug Fixes
    • Compute the color-scale max using only cells whose tool and agent are in the rendered top lists; previously included filtered agents, which washed out colors.

Written for commit 3778148. Summary will update on new commits.

Review in cubic

@pedrofrxncx
pedrofrxncx merged commit f3931cc into main Aug 11, 2026
25 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/heatmap-maxvalue-scale-w1 branch August 11, 2026 14:36
decocms Bot pushed a commit that referenced this pull request Aug 11, 2026
PR: #5898 fix(monitoring): scale tool-call heatmap colors by displayed cells only
Bump type: patch

- decocms (apps/api/package.json): 4.200.0 -> 4.200.1
- @decocms/native (apps/native/package.json): 4.200.0 -> 4.200.1

Deploy-Scope: web
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.

1 participant