You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/08/27 16:10:06 UTC
[PR] docs(theming): document THEME_DEFAULT_MODE config setting [superset]
rusackas opened a new pull request, #43601:
URL: https://github.com/apache/superset/pull/43601
### SUMMARY
#41007 added `THEME_DEFAULT_MODE` (config.py), letting operators default the app to `dark`, `default` (light), or `system` instead of always following the OS/browser preference. The theming docs never got updated for it, so `docs/admin_docs/configuration/theming.mdx` only documented `THEME_DEFAULT`/`THEME_DARK` and the Theme Management UI. This adds a short "Default Theme Mode" subsection covering the new setting, its allowed values, and how it interacts with a user's own saved theme preference.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A - docs only.
### TESTING INSTRUCTIONS
Read the new "Default Theme Mode" section under Configuration Options in `docs/admin_docs/configuration/theming.mdx`.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] 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
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
Follow-up docs gap from #41007.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs(theming): document THEME_DEFAULT_MODE config setting [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43601:
URL: https://github.com/apache/superset/pull/43601#issuecomment-5441900556
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs(theming): document THEME_DEFAULT_MODE config setting [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
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>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](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) [](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>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](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) [](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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs(theming): document THEME_DEFAULT_MODE config setting [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #43601:
URL: https://github.com/apache/superset/pull/43601#discussion_r3875341469
##########
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:
Good catch โ clarified that embedded dashboards use their own `themeMode` URL param instead of `THEME_DEFAULT_MODE`, falling back to light when absent.
##########
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:
Confirmed โ `determineInitialMode` forces light mode when no dark theme is configured, so `"system"` only follows the OS preference if `THEME_DARK` is set. Noted that in the doc.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs(theming): document THEME_DEFAULT_MODE config setting [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #43601:
URL: https://github.com/apache/superset/pull/43601
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs(theming): document THEME_DEFAULT_MODE config setting [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #43601:
URL: https://github.com/apache/superset/pull/43601#issuecomment-5441939929
### <span aria-hidden="true">โ
</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">๐จ</span> Latest commit | f1086ad758d03f1f10608e5e18008c3b5dd9844c |
|<span aria-hidden="true">๐</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a90615e0aac130008c8bea4 |
|<span aria-hidden="true">๐</span> Deploy Preview | [https://deploy-preview-43601--superset-docs-preview.netlify.app](https://deploy-preview-43601--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">๐ฑ</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">๐ค</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#LYxRCsIwEAXvst8u3WBbqzfwGNvsCxWbJqQpKOLdzYd_wwzMh3JJMVe6EZ1oLrr5pXF4vLrQAufCvRO58AbYzpb8zgFauS6I4KhPsCHosf5Vuxjymt53a59RrzK6AaLq3VlEJj_N0J6-Pw) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-43601--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] docs(theming): document THEME_DEFAULT_MODE config setting [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43601:
URL: https://github.com/apache/superset/pull/43601#issuecomment-5446210480
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - 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 <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org