Skip to content

Comments

fix: address numerous long-standing console errors (python & web)#34299

Merged
mistercrunch merged 2 commits intomasterfrom
console_fix
Jul 24, 2025
Merged

fix: address numerous long-standing console errors (python & web)#34299
mistercrunch merged 2 commits intomasterfrom
console_fix

Conversation

@mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Jul 24, 2025

Summary

  • fixing console errors related to aggrid/i18n seems those i18n files were not tied to anything ... see analysis below
  • tackled various annoying console issues in python
  • tackled some browser console warning

analysis

Import Chain Analysis:

  1. i18n.ts → imported by consts.ts (line 21)
  2. consts.ts → calls addLocaleData(i18n) (line 23) and exports constants
  3. consts.ts → imported by controlPanel.tsx, AgGridTable/index.tsx, and utils/getAggFunc.ts

Key Finding:

The translation strings in i18n.ts don't appear to be used anywhere. The grep search shows:

  • Control panel strings like "Query Mode", "Aggregate", "Raw Records" exist in code but use enum values
    (QueryMode.Aggregate) rather than translated strings
  • Pagination strings like "page_size.show", "table.previous_page" are only found in the i18n.ts file itself - not
    referenced elsewhere

Registration vs Usage:

  • Registration: The i18n data gets registered via addLocaleData() when consts.ts is imported
  • Usage: The actual translation keys aren't referenced anywhere in the codebase using t() calls

Conclusion:

The i18n.ts file contains translation keys that were likely intended for the ag-grid table plugin but are not
actually used by any components. The addLocaleData() call registers translations that are never looked up, making
this essentially dead code.

Copy link

@korbit-ai korbit-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.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Error Handling Inappropriate Log Level for Critical Error ▹ view 🧠 Incorrect
Readability Large inline translation object obscures component logic ▹ view 🧠 Not in standard
Files scanned
File Path Reviewed
superset-frontend/plugins/plugin-chart-ag-grid-table/src/consts.ts
superset-frontend/plugins/plugin-chart-table/src/consts.ts
superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx
superset/app.py
superset-frontend/packages/superset-ui-core/src/components/EmptyState/index.tsx
superset/db_engine_specs/init.py
superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTable/index.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@mistercrunch mistercrunch merged commit 30e5684 into master Jul 24, 2025
69 of 70 checks passed
@mistercrunch mistercrunch deleted the console_fix branch July 24, 2025 16:50
LisaHusband pushed a commit to LisaHusband/superset that referenced this pull request Aug 17, 2025
dankor pushed a commit to dankor/superset that referenced this pull request Aug 18, 2025
@github-actions github-actions bot added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 6.0.0 First shipped in 6.0.0 labels Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels packages plugins preset-io size/L 🚢 6.0.0 First shipped in 6.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants