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


##########
docs/admin_docs/configuration/theming.mdx:
##########
@@ -88,6 +88,22 @@ THEME_DARK = {
 # - OS preference detection is automatically enabled
 ```
 
+### Default Theme Mode
+
+By default, Superset mimics the visitor's OS/browser preference (light or 
dark) for
+sessions that don't have a saved user preference. Use `THEME_DEFAULT_MODE` to 
override
+that starting point instance-wide:

Review Comment:
   **Suggestion:** The setting is not instance-wide for embedded dashboards: 
embedded Superset creates a separate controller with an explicit `themeMode` 
URL parameter, which takes precedence over `THEME_DEFAULT_MODE`, and falls back 
to light when that parameter is absent. Scope this statement to the standard 
application flow or explain the embedded override. [api mismatch]
   
   <details>
   <summary><b>Severity Level:</b> Minor ๐Ÿงน</summary>
   
   ```mdx
   - โš ๏ธ Embedded dashboards can bypass `THEME_DEFAULT_MODE`.
   - โš ๏ธ Absent embedded parameters fall back to light mode.
   - โš ๏ธ Host applications control embedded theme initialization.
   ```
   </details>
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![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=4d54530033ef41e68c5a66acfb08ae0e&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=4d54530033ef41e68c5a66acfb08ae0e&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** docs/admin_docs/configuration/theming.mdx
   **Line:** 95:95
   **Comment:**
        *Api Mismatch: The setting is not instance-wide for embedded 
dashboards: embedded Superset creates a separate controller with an explicit 
`themeMode` URL parameter, which takes precedence over `THEME_DEFAULT_MODE`, 
and falls back to light when that parameter is absent. Scope this statement to 
the standard application flow or explain the embedded override.
   
   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%2F43601&comment_hash=6ac0978c06a308b2762d9e609b3fa2945c0f3a5baa222e6125e4effce55534ba&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43601&comment_hash=6ac0978c06a308b2762d9e609b3fa2945c0f3a5baa222e6125e4effce55534ba&reaction=dislike'>๐Ÿ‘Ž</a>



##########
docs/admin_docs/configuration/theming.mdx:
##########
@@ -88,6 +88,22 @@ THEME_DARK = {
 # - OS preference detection is automatically enabled
 ```
 
+### Default Theme Mode
+
+By default, Superset mimics the visitor's OS/browser preference (light or 
dark) for
+sessions that don't have a saved user preference. Use `THEME_DEFAULT_MODE` to 
override
+that starting point instance-wide:
+
+```python
+# Default theme mode for sessions without a saved user preference.
+# One of "default" (always light), "dark" (always dark), or "system" (mimic OS 
preference).
+THEME_DEFAULT_MODE = "dark"
+```
+
+- `"system"` (the default) preserves the existing behavior of following the 
OS/browser preference.

Review Comment:
   **Suggestion:** This claim is not true when `THEME_DARK = None` or no usable 
dark theme is configured: the controller discards the system mode and returns 
the default mode instead of following the OS preference. State that system 
detection requires a usable dark theme, or document the single-theme behavior 
separately. [incorrect condition logic]
   
   <details>
   <summary><b>Severity Level:</b> Minor ๐Ÿงน</summary>
   
   ```mdx
   - โš ๏ธ Single-theme deployments always resolve to light mode.
   - โš ๏ธ OS dark preference is ignored without a usable dark theme.
   - โš ๏ธ Operators may misdiagnose configured system-mode behavior.
   ```
   </details>
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![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=692ba210f2244d64b8195c818b250a52&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=692ba210f2244d64b8195c818b250a52&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent ๐Ÿค– </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** docs/admin_docs/configuration/theming.mdx
   **Line:** 103:103
   **Comment:**
        *Incorrect Condition Logic: This claim is not true when `THEME_DARK = 
None` or no usable dark theme is configured: the controller discards the system 
mode and returns the default mode instead of following the OS preference. State 
that system detection requires a usable dark theme, or document the 
single-theme behavior separately.
   
   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%2F43601&comment_hash=459126db13b9456553935c2fdfa0f0e563b53d0c1c9919a3ef0cd67fbe903c5c&reaction=like'>๐Ÿ‘</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43601&comment_hash=459126db13b9456553935c2fdfa0f0e563b53d0c1c9919a3ef0cd67fbe903c5c&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