codeant-ai-for-open-source[bot] commented on code in PR #42494:
URL: https://github.com/apache/superset/pull/42494#discussion_r3661933806


##########
superset/reports/api.py:
##########
@@ -194,6 +195,7 @@ def ensure_alert_reports_enabled(self) -> 
Optional[Response]:
         "extra",
         "force_screenshot",
         "grace_period",
+        "include_cta",

Review Comment:
   **Suggestion:** The new field is exposed by the detail and write 
configurations but omitted from `list_columns`, so `GET /api/v1/report` 
responses do not include the persisted per-schedule preference. Any list-based 
client cannot display or preserve the schedule's CTA setting consistently. Add 
`include_cta` to `list_columns` as well. [api mismatch]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ List API clients cannot read CTA preferences.
   - ⚠️ Alerts and Reports list data omits schedule configuration.
   - ⚠️ Clients require extra detail requests for consistency.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Create or update a schedule through `POST /api/v1/report/` or `PUT
   /api/v1/report/<id>`; `ReportScheduleRestApi.add_columns` and `edit_columns` 
include
   `include_cta` at `superset/reports/api.py:105-131`, so the value is 
persisted.
   
   2. Request the collection endpoint `GET /api/v1/report/?q=...`, which is 
used by
   `fetchUISpecificReport()` in
   `superset-frontend/src/features/reports/ReportModal/actions.ts:28-45` and by 
the Alerts &
   Reports list at 
`superset-frontend/src/pages/AlertReportList/index.tsx:85-92`.
   
   3. The collection serialization uses `ReportScheduleRestApi.list_columns` at
   `superset/reports/api.py:77-104`; that list does not contain `include_cta`, 
although the
   detail configuration includes it at `superset/reports/api.py:30-72`.
   
   4. Observe that the list response omits the persisted CTA preference, while 
`GET
   /api/v1/report/<id>` includes it; list-based clients therefore cannot 
display,
   synchronize, or preserve the per-schedule setting without an additional 
detail request.
   ```
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=b4ef56d234944b64b4daed8426d1873a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=b4ef56d234944b64b4daed8426d1873a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/reports/api.py
   **Line:** 198:198
   **Comment:**
        *Api Mismatch: The new field is exposed by the detail and write 
configurations but omitted from `list_columns`, so `GET /api/v1/report` 
responses do not include the persisted per-schedule preference. Any list-based 
client cannot display or preserve the schedule's CTA setting consistently. Add 
`include_cta` to `list_columns` as well.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42494&comment_hash=7fa98eb4314cd02086e935218357d93c91c77e7cbb87bbc1747afd154e796fc1&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42494&comment_hash=7fa98eb4314cd02086e935218357d93c91c77e7cbb87bbc1747afd154e796fc1&reaction=dislike'>👎</a>



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