aminghadersohi opened a new pull request, #45799:
URL: https://github.com/apache/superset/pull/45799

   ### SUMMARY
   
   Treat an empty `generate_dashboard` title exactly like a whitespace-only or 
omitted title: normalize it to `None`, then generate a descriptive title from 
the chart names. Remove the intentional-blank-title exception. The 
`dashboard_title`, `title`, and `name` aliases share the behavior.
   
   Update the schema description, tool docstring, user documentation, and 
regression coverage (including byte-string inputs).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   No UI change. Before: `dashboard_title: ""` persists an empty title. After: 
it persists the same chart-derived title as whitespace-only input.
   
   ### TESTING INSTRUCTIONS
   
   Call `generate_dashboard` with an accessible chart and compare 
`dashboard_title: ""`, `" "`, and an omitted title. All should save the same 
nonblank chart-derived title.
   
   Automated validation:
   - `PYTHONPATH=$PWD/superset-core/src:$PWD pytest -q 
tests/unit_tests/mcp_service/dashboard/test_dashboard_schemas.py 
tests/unit_tests/mcp_service/dashboard/tool/test_dashboard_generation.py -m 
'not manual and not llm_compliance'`: **297 passed**.
   - Revert-fails: restored `superset/mcp_service/dashboard/schemas.py` from 
the base while retaining regression tests, then ran those two modules with `-k 
'blank_title_uses_auto_title or blank_title_auto_generated'`: **4 failed, 11 
passed, 282 deselected**, exit **1**. Failures cover empty-string normalization 
through all three aliases and the saved title in the tool call; whitespace 
cases pass. Restored the implementation afterward.
   - Scoped `pre-commit run`: passed, including mypy.
   - No real-model tests run (`manual` / `llm_compliance` excluded).
   
   Sibling search over `superset/mcp_service/` (`dashboard_title`, 
`chart_name`, `slice_name`, blank/empty checks and name/title declarations):
   - `dashboard/schemas.py` and `dashboard/tool/generate_dashboard.py`: empty 
input uses the existing auto-title path; schema aliases and persisted title 
covered by regressions.
   - `dashboard/schemas.py`, `dashboard/tool/update_dashboard.py`, 
`dashboard/tool/duplicate_dashboard.py`: already reject explicit 
empty/whitespace titles; omitted update titles leave the title unchanged.
   - `chart/schemas.py` (`ChartNameMixin`): normalizes blank `chart_name`, 
`name`, `title`, and `slice_name` aliases to `None`. 
`chart/tool/generate_chart.py` generates a name. `chart/tool/update_chart.py` 
retains the existing name or generates one with config; a blank name-only 
update is rejected. Neither writes the supplied blank string.
   - `chart/tool/update_chart_preview.py`: generates a preview name, not a 
caller-provided blank title.
   - Chart/dashboard response models and restore/read tools may preserve an 
existing blank `slice_name`/title; they do not accept a rename or create a 
blank-named object. This change does not rewrite existing records.
   - `sql_lab/schemas.py`: SQL Lab tab titles already strip blanks to `None` 
for the default naming path.
   - Other name hits are dataset/metric/theme identifiers, 
native-filter/divider labels, query labels, or response metadata, not 
chart/dashboard titles. Required names have their own validation; optional 
labels and clearable slug/CSS/certification fields are separate contracts and 
remain unchanged.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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