Skip to content

chart#10

Open
anurag-kantar wants to merge 13 commits into
getsentry:mainfrom
anurag-kantar:2026-04-08-odat
Open

chart#10
anurag-kantar wants to merge 13 commits into
getsentry:mainfrom
anurag-kantar:2026-04-08-odat

Conversation

@anurag-kantar
Copy link
Copy Markdown

No description provided.

Comment on lines +152 to +153
const parents = uniqueOrdered(rows.map((r) => r.parent));
x = 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The partition chart rendering logic in buildOverviewPartitionData assumes input rows are grouped by parent. Unsorted API data will cause visual misalignment between parent and child chart elements.
Severity: MEDIUM

Suggested Fix

Before passing the rows data to buildOverviewPartitionData, sort the array by the parent property. This will ensure that all rows for a given parent are contiguous, matching the function's implicit assumption and preventing visual misalignment.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/components/common/partition/buildPartitionSeriesData.js#L152-L153

Potential issue: The `buildOverviewPartitionData` function generates chart data assuming
the input `rows` are grouped by the `parent` property. It determines the layout of
parent strips based on the order of first appearance of each `parent` in the `rows`
array. However, the data from the backend API is not guaranteed to be sorted. If rows
for the same parent are interleaved with rows for other parents, the child elements will
be rendered under the incorrect parent strip, leading to a visually broken and
misleading hierarchical chart.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0164ed6. Configure here.

Comment thread .husky/pre-commit
@@ -0,0 +1,12 @@
#!/usr/bin/env sh

set -euo pipefail
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-commit hook is not portable

Medium Severity

The pre-commit hook's set -euo pipefail isn't supported by common sh implementations like dash. On such systems, the script exits early, preventing lint-staged from running and blocking commits.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0164ed6. Configure here.

Comment thread eslint.config.mjs
},
js.configs.recommended,
{
files: ['**/*.{js,jsx}'],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint command cannot run

Medium Severity

Adding eslint.config.mjs switches ESLint to flat config, but the existing npm run lint still passes --ext. ESLint 9 rejects --ext in flat-config mode, so the new CI lint step fails before checking files.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0164ed6. Configure here.

Comment thread eslint.config.mjs
'vitest.config.mjs',
],
},
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint rule breaks existing exports

Medium Severity

import/no-unused-modules is enabled without ignoring existing dual named/default exports like DmaIcicleDrillBridge and DmaPartitionChart. npm run lint now fails on unchanged source files, so the new CI pipeline cannot pass.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0164ed6. Configure here.

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