Skip to content

fix: Badge count in folders editor - #38100

Merged
kgabryje merged 2 commits into
apache:masterfrom
kgabryje:folders/badge-count-fix
Feb 19, 2026
Merged

fix: Badge count in folders editor#38100
kgabryje merged 2 commits into
apache:masterfrom
kgabryje:folders/badge-count-fix

Conversation

@kgabryje

Copy link
Copy Markdown
Member

SUMMARY

Fixes the Folders tab badge count to accurately reflect all folders including nested sub-folders, instead of only counting top-level folders

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Open the dataset editor with folders enabled
  2. Create nested sub-folders
  3. Verify the badge count on the "Folders" tab matches the total number of folders (including nested ones and the default Metrics/Columns folders)

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@bito-code-review

bito-code-review Bot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #7f8311

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/src/components/Datasource/FoldersEditor/treeUtils.ts - 1
    • Implicit folder type check · Line 344-344
      The check 'children' in child works but is implicit, relying on property existence. Explicitly checking child.type === FoldersEditorItemType.Folder improves clarity and aligns with type-safe practices.
      Code suggestion
       @@ -344,1 +344,1 @@
      -        if ('children' in child) {
      +        if (child.type === FoldersEditorItemType.Folder) {
Review Details
  • Files reviewed - 4 · Commit Range: c943439..c943439
    • superset-frontend/src/components/Datasource/FoldersEditor/constants.ts
    • superset-frontend/src/components/Datasource/FoldersEditor/treeUtils.test.ts
    • superset-frontend/src/components/Datasource/FoldersEditor/treeUtils.ts
    • superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot Bot added the change:frontend Requires changing the frontend label Feb 19, 2026
@kgabryje
kgabryje force-pushed the folders/badge-count-fix branch from c943439 to 2e65a3c Compare February 19, 2026 17:01
@pull-request-size pull-request-size Bot added size/M and removed size/L labels Feb 19, 2026
@kgabryje
kgabryje merged commit 86c8fa5 into apache:master Feb 19, 2026
73 checks passed
@bito-code-review

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped – PR Already Merged

Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.
No action is needed if you didn't intend to review it. To get a review, you can type /review in a comment and save it

qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants