Skip to content

[Dashboards] add primary axis select gap fill for bar and line charts#17098

Merged
ehconitin merged 10 commits intomainfrom
primary-axis-select-options-improvement
Jan 13, 2026
Merged

[Dashboards] add primary axis select gap fill for bar and line charts#17098
ehconitin merged 10 commits intomainfrom
primary-axis-select-options-improvement

Conversation

@ehconitin
Copy link
Copy Markdown
Contributor

closes twentyhq/core-team-issues#2056

CleanShot.2026-01-12.at.20.29.02.mp4

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 11 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/twenty-front/src/modules/page-layout/widgets/graph/utils/fillSelectGapsInTwoDimensionalChartData.ts">

<violation number="1" location="packages/twenty-front/src/modules/page-layout/widgets/graph/utils/fillSelectGapsInTwoDimensionalChartData.ts:33">
P1: Key collision vulnerability: Using underscore concatenation for Map keys can cause data corruption when dimension values contain underscores. Use JSON.stringify for reliable key generation.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

| null;
uniqueSecondDimensionValues.add(secondDimensionValue);

const key = `${String(primaryDimensionValue)}_${String(secondDimensionValue)}`;
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 12, 2026

Choose a reason for hiding this comment

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

P1: Key collision vulnerability: Using underscore concatenation for Map keys can cause data corruption when dimension values contain underscores. Use JSON.stringify for reliable key generation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/twenty-front/src/modules/page-layout/widgets/graph/utils/fillSelectGapsInTwoDimensionalChartData.ts, line 33:

<comment>Key collision vulnerability: Using underscore concatenation for Map keys can cause data corruption when dimension values contain underscores. Use JSON.stringify for reliable key generation.</comment>

<file context>
@@ -0,0 +1,52 @@
+      | null;
+    uniqueSecondDimensionValues.add(secondDimensionValue);
+
+    const key = `${String(primaryDimensionValue)}_${String(secondDimensionValue)}`;
+    existingGroupsMap.set(key, item);
+  }
</file context>
Suggested change
const key = `${String(primaryDimensionValue)}_${String(secondDimensionValue)}`;
const key = JSON.stringify([primaryDimensionValue, secondDimensionValue]);
Fix with Cubic

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 12, 2026

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:1686

This environment will automatically shut down when the PR is closed or after 5 hours.


for (const item of data) {
const dimensionValue = item.groupByDimensionValues?.[0];

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/transformGroupByDataToLineChartData.ts">

<violation number="1" location="packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetLineChart/utils/transformGroupByDataToLineChartData.ts:158">
P1: This change breaks gap filling for MULTI_SELECT fields. The original `isFieldMetadataSelectKind()` function checks for both SELECT and MULTI_SELECT types, but the new code only checks for SELECT. This will cause MULTI_SELECT fields to not have gaps filled in charts.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

LGTM regarding the code, I've left one nitpick comment, I'm testing locally now

@charlesBochet
Copy link
Copy Markdown
Member

Tested the behavior, LGTM, merge when you are ready :)

@ehconitin ehconitin enabled auto-merge January 13, 2026 10:17
@ehconitin ehconitin added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit e73aa80 Jan 13, 2026
68 checks passed
@ehconitin ehconitin deleted the primary-axis-select-options-improvement branch January 13, 2026 10:37
@twenty-eng-sync
Copy link
Copy Markdown

Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

1 similar comment
@twenty-eng-sync
Copy link
Copy Markdown

Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

@github-actions
Copy link
Copy Markdown
Contributor

Thanks @ehconitin for your contribution!
This marks your 288th PR on the repo. You're top 1% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DASHBOARDS] Always display all the select options even if the value is null

3 participants