I found what looks like a bug in org themes for code-first (Beta) React apps, plus a related feature request.
What happens
When an app uses an org theme, its frontend/theme.css becomes a single line: @import "@retool.org.pumpbilling//orgTheme.css". The generated orgTheme.css defines the color variables in :root and .dark, but it has no base rules. The starter theme.css our apps had before included:
Without the body rule, anything rendered outside the app's main tree falls back to the browser's default black text. That includes the built-in lib/shadcn Dialog and AlertDialog, which render in a portal. With a dark palette, dialog titles, headings and body text come out black on a near-black background. Text that sets its own color class (text-muted-foreground, badges) is fine, which is why the issue only shows in dialogs.
To reproduce
Create an org theme with dark colors (we used the same dark values in both the light and dark slots) and set it as the app's theme.
Open any built-in Dialog whose content has plain text (an h4 or p with no color class).
The text is black on the dark dialog background. Switch the app to a light org theme and it looks correct, because black happens to be the right color there.
Workaround
Adding the body and border rules above to each app's theme.css, under the @import line, fixes it. That works, but every app on a dark theme needs the same manual edit, and the theme JSON has no place to add it once for all apps.
Requests
Could the generated orgTheme.css include those base rules (or the built-in DialogContent apply text-foreground), so org themes work in dark mode without per-app edits?
Feature request: a way for an app's builder to lock the app to light or dark for all viewers. Today darkMode.ts follows each viewer's system setting, so the only way we found to force dark is a theme with identical light and dark palettes.
I'm happy to share screenshots or our theme export if that helps.
In the new code-first (Beta React) app builder, apps using an org theme get a theme.css that only contains @import "...orgTheme.css", and the generated orgTheme.css defines color variables in :root/.dark but no base body rule β so portal-rendered built-in Dialog/AlertDialog text falls back to browser-default black and becomes unreadable on dark palettes. A related feature request asks for a way to lock an app to light or dark for all viewers instead of following each viewer's system setting.
AI Response
This report appears consistent and the self-identified fix is the right approach: because the built-in Dialog/AlertDialog render in a portal, text with no explicit color class inherits the browser default rather than the theme's foreground, which is why only plain dialog text is affected. Adding the base rules back to each app's theme.css under the @import line resolves it: * { border-color: hsl(var(--border)); } and body { background-color: hsl(var(--background)); color: hsl(var(--foreground)); }. An alternative that avoids per-app edits is to ensure the dialog content itself carries a foreground color class (e.g. applying text-foreground to DialogContent/plain headings and paragraphs). A dedicated search of the Community forum and the product documentation did not surface any existing report, known-issue entry, or documented setting that directly covers this specific orgTheme.css base-rule gap or a built-in option to force light/dark for all viewers in code-first apps, so both items read as a legitimate bug report plus feature request rather than something with an existing published workaround beyond the CSS edits already identified.
Sources
The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a , , or . Or by marking this post as the "Solution"! Let us know if you have any feedback here.
Thanks for reporting this one. Weβve filed a ticket on our end for this one since weβve sporadically reproduced this one as well. Weβre aiming to get a fix in shortly and will keep you posted!
Thanks for the detailed write-up, and sorry this tripped you up with your dark-mode dialogs! As @sethg mentioned, the team was working on a fix, and it's now included in Cloud 4.80.0.
The text in dialogs and alert dialogs should be readable on your dark org theme without the extra body and border rules in each app's theme.css. Once it looks right on your end, you can remove those rules.
Could you take a look and let me know if it's working for you? If anything still looks off, let me know and I'll dig in.
On the light/dark lock request, engineering has logged that as a feature request, and I'll update this thread if I hear more.