Skip to content

Conversation

@Antonio-RiveroMartnez
Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez commented Dec 4, 2025

User description

SUMMARY

After #36246 the dashboard API was not setting the session cookie because we override the API but didn't include all the decorators from FAB. By including these, we can see the API sets the cookie correctly

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before
before

After
after

TESTING INSTRUCTIONS

Load the dashboard list page and make sure you see the cookie being set

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

CodeAnt-AI Description

Dashboard list API sets session cookie and supports merged response options

What Changed

  • Visiting the dashboard list page/API now sets the session cookie so browser requests remain authenticated.
  • Dashboard list responses now honor request options to merge visible columns, label columns, description columns, ordering, and the list title — matching other list endpoints.
  • Dashboard list behavior and response formatting are now consistent with other FAB-backed list APIs.

Impact

✅ Session cookie set for dashboard list
✅ Dashboard list returns requested columns/labels/descriptions/order/title
✅ Consistent list responses with other APIs

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is reviewing your PR.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Dec 4, 2025

Code Review Agent Run #37bd28

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 25848a3..25848a3
    • superset/dashboards/api.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ 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 Default Agent You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@github-actions github-actions bot added the api Related to the REST API label Dec 4, 2025
@dosubot dosubot bot added the change:backend Requires changing the backend label Dec 4, 2025
@codeant-ai-for-open-source codeant-ai-for-open-source bot added the size:S This PR changes 10-29 lines, ignoring generated files label Dec 4, 2025
@codeant-ai-for-open-source
Copy link
Contributor

codeant-ai-for-open-source bot commented Dec 4, 2025

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • FAB compatibility
    The new code imports merge_response_func and several API_* constants from Flask AppBuilder (FAB). If this repository needs to run with multiple FAB versions, those symbols might not exist in older FAB releases and the import will raise ImportError at import time, breaking the application. Verify supported FAB versions and add a safe fallback or graceful degradation if necessary.

  • Decorator ordering
    Multiple @merge_response_func(...) decorators were added to get_list. The order of decorators affects how request/response processing occurs (e.g., merging response options, safe/protect wrappers, event logging, and exception handling). Confirm the ordering matches other FAB-backed APIs and that these decorators don't interfere with protect(), safe, event_logger, or handle_api_exception behavior (particularly cookie setting and response headers).

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.97%. Comparing base (76d897e) to head (32d3535).
⚠️ Report is 3019 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #36423      +/-   ##
==========================================
+ Coverage   60.48%   67.97%   +7.48%     
==========================================
  Files        1931      634    -1297     
  Lines       76236    46738   -29498     
  Branches     8568     5071    -3497     
==========================================
- Hits        46114    31770   -14344     
+ Misses      28017    13701   -14316     
+ Partials     2105     1267     -838     
Flag Coverage Δ
hive 43.71% <100.00%> (-5.44%) ⬇️
javascript ?
mysql 67.03% <100.00%> (?)
postgres 67.08% <100.00%> (?)
presto 47.35% <100.00%> (-6.45%) ⬇️
python 67.94% <100.00%> (+4.43%) ⬆️
sqlite 66.79% <100.00%> (?)
unit 100.00% <ø> (+42.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@Vitor-Avila Vitor-Avila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for catching this

@Antonio-RiveroMartnez Antonio-RiveroMartnez merged commit 4a249a0 into apache:master Dec 4, 2025
60 checks passed
Facyla pushed a commit to Facyla/superset-contrib that referenced this pull request Dec 16, 2025
aminghadersohi pushed a commit to aminghadersohi/superset that referenced this pull request Jan 17, 2026
aminghadersohi pushed a commit to aminghadersohi/superset that referenced this pull request Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the REST API change:backend Requires changing the backend size/S size:S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants