fix(dashboard): surface size, limit, and config key in oversized dashboard error#41532
Conversation
…board error When a dashboard's layout JSON exceeds SUPERSET_DASHBOARD_POSITION_DATA_LIMIT, the save was blocked with a generic "Your dashboard is too large" toast that gave no indication of the actual size, the configured limit, or how to raise it. The values are already in scope at the check site, so include them along with the config key name and a hint to split the dashboard. Also document SUPERSET_DASHBOARD_POSITION_DATA_LIMIT in the configuration reference (default, MySQL TEXT rationale, and how/when to raise it), which was previously undocumented. Reported via #41528. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Code Review Agent Run #cbd68a
Actionable Suggestions - 1
-
docs/admin_docs/configuration/configuring-superset.mdx - 1
- Doc claim contradicts column type · Line 560-560
Review Details
-
Files reviewed - 3 · Commit Range:
4d7803a..4d7803a- docs/admin_docs/configuration/configuring-superset.mdx
- superset-frontend/src/dashboard/components/Header/Header.test.tsx
- superset-frontend/src/dashboard/components/Header/index.tsx
-
Files skipped - 0
-
Tools
- 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
…ength Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Review Agent Run #467dddActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
When a dashboard's serialized layout exceeds
SUPERSET_DASHBOARD_POSITION_DATA_LIMIT(default65535bytes), saving layout edits is blocked in the UI with a generic toast:This gives the user no indication of how large the layout is, what the limit is, or how to change it — leading to lengthy debugging (see #41528, where a programmatically-imported 120-chart dashboard hit the wall after importing fine).
This PR:
Improves the error message to include the actual layout size, the configured limit, and the name of the config setting to raise — the values are already in scope at the check site (
positionJSONLengthandlimit), so this is a small, self-contained change:Documents
SUPERSET_DASHBOARD_POSITION_DATA_LIMITin the configuration reference — it was previously undocumented. The note covers the default, the historical MySQLTEXTrationale, when/how to raise it, and the fact that an imported oversized dashboard renders but can't be re-saved until the limit is raised.The reporter (@Hamidcha-Mosaab) offered to take the error-message change; this folds it together with the docs gap they also identified, and credit goes to them for the thorough write-up.
BEFORE/AFTER
Before:
Your dashboard is too large. Please reduce its size before saving it.After:
Your dashboard is too large to save: the layout is 74,960 bytes but the limit is 65,535 bytes. Reduce the dashboard size (for example, split it into multiple dashboards) or raise the SUPERSET_DASHBOARD_POSITION_DATA_LIMIT config setting.TESTING INSTRUCTIONS
SUPERSET_DASHBOARD_POSITION_DATA_LIMIT(e.g.1) insuperset_config.py, or build a dashboard whose layout exceeds the default.Unit test added in
Header.test.tsxcovering the oversized-layout path (blocks save, surfaces size/limit/config key).ADDITIONAL INFORMATION
DASHBOARD_POSITION_DATA_LIMIT#41528🤖 Generated with Claude Code