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

   ### SUMMARY
   
   Enhances the dashboard chart **View query** action into a permission-aware 
**Query inspector**, following the troubleshooting workflow popularized by 
Grafana's panel inspector.
   
   The inspector keeps the existing generated SQL behavior and adds:
   
   - a **Response** tab showing the cached `queriesResponse` as copyable JSON;
   - a **Stats** tab showing query count, returned payload rows, cache hits, 
response size, and chart update duration;
   - no additional chart-data request for Response or Stats.
   
   Raw response JSON is only available when the user can already explore the 
chart or use **View as table**. Users with only query-view permission retain 
access to generated SQL and aggregate stats.
   
   Discussion: https://github.com/apache/superset/discussions/43375
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not included because this development environment does not have a running 
Superset backend. The UI behavior is covered by focused React tests.
   
   ### TESTING INSTRUCTIONS
   
   1. Open a dashboard containing a rendered chart.
   2. Open the chart menu and select **Query inspector**.
   3. Verify the Query tab shows generated SQL.
   4. Verify the Response tab shows cached chart JSON for a role with View 
table or Explore permission.
   5. Verify Stats shows query count, returned rows, cache count, response 
size, and duration.
   
   Automated checks:
   
   - `ViewQueryModal.test.tsx`: 7 passed
   - `SliceHeaderControls.test.tsx`: 46 passed
   - OXC lint, stylelint, custom frontend rules, and oxfmt passed for changed 
files
   - `npm run type` passed after building workspace declarations
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: GitHub Discussion linked above
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration
     - [ ] 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
   - [ ] 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