codeant-ai-for-open-source[bot] commented on code in PR #42792:
URL: https://github.com/apache/superset/pull/42792#discussion_r3718910778
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:
##########
@@ -197,6 +222,70 @@ export default function EchartsTimeseries({
[selectedValues, xAxis.label],
);
+ const getTimeAxisCrossFilterDataMask = useCallback(
+ (clickedTimestamp: number) => {
+ const filterColumn =
+ xAxis.label === DTTM_ALIAS ? formData.granularitySqla : xAxis.label;
+ const grain = formData.timeGrainSqla as TimeGranularity | undefined;
Review Comment:
**Suggestion:** The temporal mask uses only `formData.timeGrainSqla`, while
`transformProps` resolves the rendered axis grain from
`formData.extraFormData?.time_grain_sqla ?? timeGrainSqla`. When a
dashboard-level time-grain override is active, the axis can display one grain
but clicking it generates a `TEMPORAL_RANGE` for another grain. Use the same
resolved grain when constructing the cross-filter. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Temporal clicks can filter using the wrong time grain.
- ⚠️ Dashboard-level time-grain controls become inconsistent with chart
cross-filters.
- ❌ Users may receive incorrect temporal query results.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=53af4b6895e64768a85bb3051f3f79e4&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=53af4b6895e64768a85bb3051f3f79e4&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx
**Line:** 227:229
**Comment:**
*Api Mismatch: The temporal mask uses only `formData.timeGrainSqla`,
while `transformProps` resolves the rendered axis grain from
`formData.extraFormData?.time_grain_sqla ?? timeGrainSqla`. When a
dashboard-level time-grain override is active, the axis can display one grain
but clicking it generates a `TEMPORAL_RANGE` for another grain. Use the same
resolved grain when constructing the cross-filter.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42792&comment_hash=73cdb2c93b445ed264e3b5e633b3b4d6364ef84e67cac6b21f7f5ef211f152f1&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42792&comment_hash=73cdb2c93b445ed264e3b5e633b3b4d6364ef84e67cac6b21f7f5ef211f152f1&reaction=dislike'>👎</a>
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:
##########
@@ -349,9 +463,10 @@ export default function EchartsTimeseries({
crossFilter = getCrossFilterDataMask(seriesName);
} else if (
Review Comment:
**Suggestion:** Temporal axes are now included in `canCrossFilterByXAxis`,
and left-clicks generate temporal cross-filters, but the context-menu payload
still constructs `crossFilter` only for `AxisType.Category`. Consequently, a
temporal series point opened through the context menu has no equivalent
cross-filter action even though the chart advertises the axis as
cross-filterable. Add the temporal branch and build its mask from the
orientation-aware timestamp. [incomplete implementation]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Temporal point context menus lack cross-filter actions.
- ⚠️ Right-click behavior differs from temporal left-click behavior.
- ⚠️ Dashboard users cannot filter temporal points through context menus.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=7246de20cec44e06833916cf080c98d0&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=7246de20cec44e06833916cf080c98d0&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx
**Line:** 464:476
**Comment:**
*Incomplete Implementation: Temporal axes are now included in
`canCrossFilterByXAxis`, and left-clicks generate temporal cross-filters, but
the context-menu payload still constructs `crossFilter` only for
`AxisType.Category`. Consequently, a temporal series point opened through the
context menu has no equivalent cross-filter action even though the chart
advertises the axis as cross-filterable. Add the temporal branch and build its
mask from the orientation-aware timestamp.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42792&comment_hash=178206b5bff095dee1ec73312750d159496d947ee8836450cb0f473165e3c462&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42792&comment_hash=178206b5bff095dee1ec73312750d159496d947ee8836450cb0f473165e3c462&reaction=dislike'>👎</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]