mikebridge opened a new pull request, #44206: URL: https://github.com/apache/superset/pull/44206
### SUMMARY Show semantic-view provider requests in **View query** using the chart's existing run report, in both Explore and the dashboard chart menu. - Display and copy the complete provider request text verbatim, including host-authored kind headers and multiple request blocks. - Use SQL/JSON highlighting as a presentation hint, with plain text for unknown kinds. - Show distinct messages when the chart has not run or no request text is available for the run, including redacted reports. - Do not fetch or execute anything when opening View query for a semantic view. Regular dataset behavior is unchanged. - Replace the semantic-view compile-only placeholder with a translated validation error through the existing chart-data response envelope. - Add tests, translation catalog entries, and user documentation. No new endpoints, provider interfaces, migrations, or dependencies. Pre-execution preview is out of scope: providers report these requests with chart results. This PR reads that existing report rather than introducing a compile-only provider API. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: semantic-view View query displays `Not implemented for semantic layers`. After: it displays copyable provider request text from the chart's run, or the appropriate empty-state message. Screenshots and live-provider verification are pending. This PR is intentionally draft for manual review. ### TESTING INSTRUCTIONS Automated checks completed locally: - `npm run test -- ViewQueryModal.test.tsx SemanticRequestView.test.tsx --maxWorkers=2`: 27 tests passed, including the five unchanged existing dataset cases. - `pytest tests/unit_tests/semantic_layers/models_test.py -q`: 101 tests passed. - `pre-commit run --files <branch-changed files>`: all applicable hooks passed, including MyPy and frontend type checking; no repository-wide run. - Source-placeholder absence is checked by an automated regression test. Manual checks still required: 1. With `SEMANTIC_LAYERS` enabled, run a chart backed by a SQL-producing provider and open **View query** from Explore and a dashboard chart menu. 2. Compare displayed/copied text with the provider's reported request. Check complete headers, whitespace, multiple requests, and long-text scrolling. 3. Rerun with different filters and confirm the request updates with the chart's results. 4. Repeat for a non-SQL provider; unknown kinds must remain readable and copyable. 5. Check the distinct not-run and no-request empty states, and confirm opening the modal adds no chart-data requests. 6. Confirm regular dataset query fetching, formatting, and SQL Lab affordances remain unchanged. No live-provider or OS-clipboard pass is claimed. CI results will be evaluated separately. ### ADDITIONAL INFORMATION - [x] Has associated issue: [SC-104912](https://app.shortcut.com/preset/story/104912) - [x] Required feature flags: `SEMANTIC_LAYERS` (existing flag) - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [x] Introduces new feature or API: provider-request display; no new 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]
