codeant-ai-for-open-source[bot] commented on code in PR #40967:
URL: https://github.com/apache/superset/pull/40967#discussion_r3623729184


##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/SmoothLine/controlPanel.test.ts:
##########
@@ -16,58 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { ControlPanelsContainerProps } from 
'@superset-ui/chart-controls/types';
 import { GenericDataType } from '@apache-superset/core/common';
 import controlPanel from 
'../../../src/Timeseries/Regular/SmoothLine/controlPanel';
+import { getControl, mockControls } from '../helpers';

Review Comment:
   **Suggestion:** `mockControls` is imported but never used, which will trip 
no-unused-vars/no-unused-imports lint checks in strict CI setups. Remove the 
unused import or add a test that uses it. [possible bug]
   
   <details>
   <summary><b>Severity Level:</b> Minor 🧹</summary>
   
   ```mdx
   - ⚠️ Lint step may warn about unused mockControls import.
   - ⚠️ Minor dead code; no runtime behavior affected.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Open
   
`superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/SmoothLine/controlPanel.test.ts`
   and observe the import at line 21: `import { getControl, mockControls } from
   '../helpers';`.
   
   2. In the same file, inspect the usages at lines 25–34 where `getControl` is 
called to
   build `timeFormatControl` and `numberFormatControl`; `mockControls` is never 
referenced.
   
   3. Run the frontend lint task (e.g. `npm run lint` or `yarn lint`), which 
executes ESLint
   over test files including `SmoothLine/controlPanel.test.ts`.
   
   4. ESLint’s `no-unused-vars`/`no-unused-imports` rules (commonly enabled in 
this
   repository) will flag `mockControls` at line 21 as an unused import, causing 
the lint step
   (and CI that depends on it) to fail.
   ```
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=e1e127315a1740ceaa02f380e27d1baf&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=e1e127315a1740ceaa02f380e27d1baf&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/test/Timeseries/SmoothLine/controlPanel.test.ts
   **Line:** 21:21
   **Comment:**
        *Possible Bug: `mockControls` is imported but never used, which will 
trip no-unused-vars/no-unused-imports lint checks in strict CI setups. Remove 
the unused import or add a test that uses it.
   
   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%2F40967&comment_hash=9c9bb7d8e7371782b78305a5bc7c0a7b74e5e407ba76ef37e830ceca998bcfe6&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40967&comment_hash=9c9bb7d8e7371782b78305a5bc7c0a7b74e5e407ba76ef37e830ceca998bcfe6&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]

Reply via email to