Hamidcha-Mosaab opened a new issue, #41528:
URL: https://github.com/apache/superset/issues/41528

   ### Bug description
   
   
   **Type:** Bug report / UX improvement
   
   ### Environment
   - Superset version: **6.1**
   - Deployment: Docker Compose (official image)
   - Browser: any (Chrome/Firefox)
   - Metadata DB: PostgreSQL
   
   ### Summary
   A dashboard was **created programmatically** (its `position`/layout JSON and 
chart YAML were generated by an AI assistant — Claude — and imported via the 
dashboard import ZIP, not built by hand in the UI). The dashboard is large: 
**120 charts** organized in **nested tabs** (2 top tabs `CA` / `Volume`, each 
containing 7 sub-tabs), i.e. ~208 layout components.
   
   When I try to **move or resize any chart** in Edit mode and click **Save**, 
Superset returns:
   
   > **Your dashboard is too large. Please reduce its size before saving it.**
   
   ### Root cause (after investigation)
   The dashboard's `position_json` is **~74,960 bytes**, which exceeds the 
default `DASHBOARD_POSITION_DATA_LIMIT = 65535` bytes. The save is rejected by 
the backend validation.
   
   ### Steps to reproduce
   1. Import (or build) a dashboard whose layout JSON exceeds 65,535 bytes 
(e.g. ~120 charts across nested tabs).
   2. Open it in Edit mode.
   3. Move or resize a chart.
   4. Click **Save**.
   5. → Error: *"Your dashboard is too large. Please reduce its size before 
saving it."*
   
   ### Expected behaviour
   At minimum, a **clear, actionable** message, e.g.:
   - show the **current size vs the limit** ("Layout is 74,960 bytes; limit is 
65,535. Increase `DASHBOARD_POSITION_DATA_LIMIT` or split the dashboard."),
   - and/or surface this limit **at import time** (the import succeeded 
silently, but the dashboard then can't be edited/saved),
   - and/or document the limit prominently.
   
   ### Actual behaviour
   - The import **succeeds** with no warning, so the oversize layout is only 
discovered later, when the user tries to edit.
   - The error message gives **no indication** of *why* it's "too large", what 
the limit is, or how to fix it.
   
   ### Workaround that worked
   Setting in `superset_config.py`:
   ```python
   DASHBOARD_POSITION_DATA_LIMIT = 131072   # 128 KB (default 65535)
   ```
   then restarting the app. After a hard refresh, editing/saving works again.
   
   ### Questions / suggestions
   1. Could the error message include the **actual layout size and the 
configured limit**, and a hint (increase the limit or split the dashboard)?
   2. Could the import flow **warn** when an imported dashboard already exceeds 
the limit (since it will be uneditable)?
   3. Is there any guidance on a **recommended maximum** number of charts / 
layout size per dashboard for performance reasons?
   
   ### Additional context
   The dashboard layout was generated by an AI assistant (Claude) producing 
valid Superset import YAML; it imports and renders fine, but the size-limit 
check blocks subsequent layout edits. Splitting into two dashboards (CA / 
Volume) keeps each under the limit, but a clearer error and/or an import-time 
warning would have saved significant debugging time.
   
   
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   6.1.0
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
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