fix(monitoring): scope heatmap color intensity to the agents actually shown - #5899
Merged
pedrofrxncx merged 2 commits intoAug 11, 2026
Merged
Conversation
# Conflicts: # apps/web/src/routes/orgs/monitoring/overview.tsx
pedrofrxncx
enabled auto-merge (squash)
August 11, 2026 14:39
pedrofrxncx
deleted the
fix/heatmap-color-scale-excludes-hidden-agents-w4
branch
August 11, 2026 15:28
decocms Bot
pushed a commit
that referenced
this pull request
Aug 11, 2026
PR: #5899 fix(monitoring): scope heatmap color intensity to the agents actually shown Bump type: patch - decocms (apps/api/package.json): 4.200.2 -> 4.200.3 - @decocms/native (apps/native/package.json): 4.200.2 -> 4.200.3 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 just merged.
In
ToolAgentHeatmap(Overview tab), the color-intensity scale (maxValue) was computed over all (agent, tool) cells that use a top tool — before narrowing down to the top-N agents actually rendered. An agent that doesn't make the top-N by overall total, but has one large spike on a single top tool, would still inflatemaxValue, silently dimming every cell of the agents that are shown (their true max never reaches the top color bucket).Why a maintainer wants this: the heatmap is a proxy for spotting the heaviest tool/agent combos at a glance — with the bug, the color scale can be stretched by data the user never sees, making the visible cells look uniformly lighter than they should.
Fix: extracted the tool/agent selection + color-scale calculation into a pure
computeHeatmapView()helper (apps/web/src/routes/orgs/monitoring/utils.ts), and moved themaxValuecomputation to run only over the cells for the agents that end up intopAgentIds. Addedutils.test.tswith a regression test reproducing the bug (an excluded agent's spike no longer sets the max) plus a basic top-N capping test.How to confirm:
bun test apps/web/src/routes/orgs/monitoring/utils.test.ts.Locally ran:
bun run fmt,cd apps/web && bunx tsc --noEmit,bunx oxlinton the touched files, and the targeted test above — all clean. Full CI validates the rest.Summary by cubic
Fixes heatmap color intensity in Monitoring Overview by basing the scale only on the agents shown. Visible spikes now render with the correct intensity.
computeHeatmapViewinapps/web/src/routes/orgs/monitoring/utils.tsto select top tools/agents and computemaxValueonly for rendered cells.ToolAgentHeatmapinoverview.tsxto usecomputeHeatmapView; resolved merge conflict inoverview.tsxafter syncing withmain.utils.test.tswith a regression test (excluded-agent spike no longer skews scale) and a top‑N capping test.Written for commit 2401bbc. Summary will update on new commits.