codeant-ai-for-open-source[bot] commented on code in PR #40679:
URL: https://github.com/apache/superset/pull/40679#discussion_r3799957262
##########
superset-frontend/src/dashboard/components/SliceHeader/index.tsx:
##########
@@ -60,6 +60,9 @@ type SliceHeaderProps = SliceHeaderControlsProps & {
annotationQuery?: object;
annotationError?: object;
sliceName?: string;
+ // Display-only localized name. Shown when not editing; editing always
+ // operates on the canonical sliceName.
+ localizedName?: string;
Review Comment:
**Suggestion:** The header tooltip effect does not depend on the newly added
`localizedName` prop. If the localized value arrives after the initial render,
or changes when the viewer locale changes, the displayed title updates but the
overflow measurement and tooltip content remain based on the previous canonical
title, leaving truncated localized titles without a tooltip or showing stale
tooltip text. Include the localized display value in the effect's dependencies
and use it when measuring/displaying the title tooltip as appropriate. [stale
reference]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Localized chart titles can lack overflow tooltips.
- ⚠️ Long translations may be difficult to read fully.
- ⚠️ Tooltip state can remain stale after localization updates.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=d3dde849330f4a6fb7f85da4774e133b&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=d3dde849330f4a6fb7f85da4774e133b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/src/dashboard/components/SliceHeader/index.tsx
**Line:** 63:65
**Comment:**
*Stale Reference: The header tooltip effect does not depend on the
newly added `localizedName` prop. If the localized value arrives after the
initial render, or changes when the viewer locale changes, the displayed title
updates but the overflow measurement and tooltip content remain based on the
previous canonical title, leaving truncated localized titles without a tooltip
or showing stale tooltip text. Include the localized display value in the
effect's dependencies and use it when measuring/displaying the title tooltip as
appropriate.
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%2F40679&comment_hash=74a36369a58325aaea62154cc742b1a37d9015d43c491cea983125cfe32bc455&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40679&comment_hash=74a36369a58325aaea62154cc742b1a37d9015d43c491cea983125cfe32bc455&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]