fix(monitoring): scale tool-call heatmap colors by displayed cells only - #5898
Merged
Conversation
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
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.
Follows #5865 (tool-call heatmap by agent), which merged just before this tick.
Bug:
ToolAgentHeatmappicks the top 12 tools and top 8 agents by total volume, then colors each cell withheatmapLevelClass(value, maxValue). ButmaxValuewas 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
maxValueonly 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) andbunx 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, targetedtsc --noEmitin apps/web,bunx oxlinton the changed file.Summary by cubic
Fix heatmap color scaling in
ToolAgentHeatmapby 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.Written for commit 3778148. Summary will update on new commits.