Skip to content

feat(dashboard): add hierarchical dashboard folder management - #42799

Draft
coreforge196 wants to merge 7 commits into
apache:masterfrom
coreforge196:feature/dashboard-folders
Draft

feat(dashboard): add hierarchical dashboard folder management#42799
coreforge196 wants to merge 7 commits into
apache:masterfrom
coreforge196:feature/dashboard-folders

Conversation

@coreforge196

@coreforge196 coreforge196 commented Aug 5, 2026

Copy link
Copy Markdown

SUMMARY

Adds optional hierarchical folders to the dashboard list. The implementation includes a metadata model and migration, Command/DAO-based REST operations, object-aware visibility and write checks, a collapsible folder tree, synchronized Folder filtering, and a two-level parent/child dashboard move workflow. The folder tree intentionally shows navigation labels without dashboard counts to keep the narrow sidebar scannable.

Existing dashboards remain uncategorized and existing dashboard URLs remain unchanged. Deleting a folder subtree preserves its dashboards by setting their folder association to NULL. Folder names are normalized for duplicate validation, and read-only folders can be browsed without becoming write targets.

Associated SIP: #42798

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Runtime acceptance evidence covers the dashboard folder tree, collapsed and expanded states, parent/child selection, Folder filter synchronization, and dashboard movement. Public screenshots will be attached in a follow-up comment.

TESTING INSTRUCTIONS

  1. Apply the metadata migration and start the existing development Compose stack.
  2. Sign in as an administrator and open /dashboard/list/.
  3. Create a root folder and a child folder; verify duplicate sibling names and child names matching the parent are rejected case-insensitively.
  4. Collapse and expand the tree, select each folder, and verify the dashboard list and Folder filter remain synchronized.
  5. Move a dashboard by selecting a parent and optionally a child; clear the child selection and verify the dashboard moves to the parent.
  6. Rename and move folders; verify cyclic parent relationships are rejected.
  7. Delete a folder subtree and verify its dashboards remain available under Uncategorized.
  8. Sign in as a restricted user and verify read-only folders are navigable but cannot be used as write targets.

Automated checks completed after rebasing onto current upstream/master:

  • Backend dashboard-folder tests: 29 passed including API integration and Command branch coverage.
  • Frontend folder and filter tests: 27 passed; the updated folder-panel suite passes all 8 tests.
  • Jest shard 5: 148 suites and 1350 tests passed.
  • Ruff, targeted MyPy, TypeScript, Oxfmt, Stylelint and production build passed.
  • Oxlint: 0 errors; 9 pre-existing warnings.
  • Browser acceptance at 1440x900: no page-level horizontal or vertical overflow; folder panel widths are 48px collapsed and 280px expanded.

Known environment limitations: the combined pre-commit invocation can stall when WSL resolves the Windows Node runtime through a UNC path. Full Chinese catalog compilation is blocked by pre-existing placeholder errors unrelated to this change. Equivalent backend and frontend checks were run separately.

REVIEW STATUS

This remains a Draft PR until public screenshots, supported-engine migration verification, all required CI checks, and maintainer review are complete.

ADDITIONAL INFORMATION

  • Has associated issue: [SIP-223] Add hierarchical dashboard folders #42798
  • Required feature flags
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration upgrade and downgrade on all supported database engines: pending CI/reviewer verification
    • Migration is metadata-only, has no data rewrite, and preserves existing dashboards with NULL folder_id
  • Introduces new feature or API
  • Removes existing feature or API

@github-actions github-actions Bot added i18n Namespace | Anything related to localization risk:db-migration PRs that require a DB migration i18n:chinese Translation related to Chinese language api Related to the REST API labels Aug 5, 2026
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.52436% with 115 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.49%. Comparing base (b18015f) to head (b3bc8d8).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
superset/commands/dashboard_folder/update.py 52.54% 20 Missing and 8 partials ⚠️
superset/dashboard_folders/api.py 77.66% 23 Missing ⚠️
superset/daos/dashboard_folder.py 76.38% 15 Missing and 2 partials ⚠️
...uperset-frontend/src/pages/DashboardList/index.tsx 81.03% 11 Missing ⚠️
superset/commands/dashboard_folder/delete.py 67.64% 9 Missing and 2 partials ⚠️
superset/commands/dashboard_folder/create.py 73.68% 5 Missing and 5 partials ⚠️
...perset/commands/dashboard_folder/move_dashboard.py 79.41% 4 Missing and 3 partials ⚠️
superset/dashboards/filters.py 44.44% 5 Missing ⚠️
...d/src/pages/DashboardList/DashboardFolderPanel.tsx 98.76% 2 Missing ⚠️
...frontend/src/components/ListView/Filters/index.tsx 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #42799      +/-   ##
==========================================
+ Coverage   66.41%   66.49%   +0.08%     
==========================================
  Files        2857     2868      +11     
  Lines      161282   161970     +688     
  Branches    37128    37259     +131     
==========================================
+ Hits       107109   107697     +588     
- Misses      52151    52230      +79     
- Partials     2022     2043      +21     
Flag Coverage Δ
hive 38.29% <48.62%> (+0.05%) ⬆️
javascript 73.33% <95.28%> (+0.09%) ⬆️
mysql 57.87% <74.81%> (+0.08%) ⬆️
postgres 57.91% <74.81%> (+0.08%) ⬆️
presto 40.24% <48.62%> (+0.04%) ⬆️
python 59.30% <74.81%> (+0.07%) ⬆️
sqlite 57.54% <74.81%> (+0.08%) ⬆️
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coreforge196
coreforge196 force-pushed the feature/dashboard-folders branch from 89cb6c2 to 4e5a63d Compare August 6, 2026 04:08
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 818f9fe
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a7695a37ff15f00093715bc
😎 Deploy Preview https://deploy-preview-42799--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coreforge196

Copy link
Copy Markdown
Author

Hi maintainers, the latest commit fixes the Alembic multiple-head conflict caused by the new upstream migration c4a1b8e2d739.

Local verification completed:

  • a single Alembic head
  • full PostgreSQL 17 upgrade from an empty database
  • 29 dashboard-folder backend tests passed
  • pre-commit checks for the staged migration passed

Could someone please approve the fork workflows for this PR? The PR will remain in Draft while SIP #42798 is under discussion. Thank you.

@github-actions github-actions Bot added the doc Namespace | Anything related to documentation label Aug 7, 2026
@coreforge196

coreforge196 commented Aug 7, 2026

Copy link
Copy Markdown
Author

Dashboard folder feature screenshots

The following five screenshots demonstrate the dashboard folder feature: hierarchical folder navigation, synchronization with the Folder filter, moving dashboards between folders, folder creation, and the collapsed folder panel.

看板文件夹功能截图

以下五张截图展示看板文件夹功能:分层文件夹导航、与“文件夹”筛选器联动、在文件夹之间移动看板、创建文件夹以及折叠后的文件夹面板。

dashboard-list-folder-tree dashboard-list-folder-filter dashboard-move-folder-modal dashboard-create-folder-modal dashboard-folder-panel-collapsed

Originally posted by @coreforge196 in #42799 (comment)

@coreforge196
coreforge196 force-pushed the feature/dashboard-folders branch 2 times, most recently from 719db01 to ea40ccf Compare August 7, 2026 13:35
@coreforge196
coreforge196 force-pushed the feature/dashboard-folders branch from e1fb6f7 to 910c27b Compare August 7, 2026 13:52
@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the REST API doc Namespace | Anything related to documentation github_actions Pull requests that update GitHub Actions code i18n:chinese Translation related to Chinese language i18n Namespace | Anything related to localization review:draft risk:db-migration PRs that require a DB migration size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants