Skip to content

Commit a00a563

Browse files
PR Batch Testerclaude
andcommitted
fix(web): say when the theme replaces environment artwork
Custom themes can't show sidebar artwork (#6183), so the sidebar falls back to the version pill while Settings kept showing the saved artwork choice. The Environment identification row now says so when the active theme hides the saved artwork. The saved choice stays, so switching back to a built-in theme restores the artwork. Fixes #27885 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 78f1ba8 commit a00a563

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

‎apps/web/src/components/settings/AppearanceSettingsPanel.tsx‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
useEnvironmentStageLabel,
2020
} from "../SidebarStageBackdrop";
2121
import { useCustomThemes } from "../../hooks/useCustomThemes";
22+
import { useEnvironmentIdentificationMode } from "../../hooks/useSettings";
2223
import { useTheme } from "../../hooks/useTheme";
2324
import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
2425
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
@@ -106,6 +107,20 @@ export function AppearanceSettingsPanel() {
106107
environmentIdentificationOptionList.find(
107108
([value]) => value === settings.environmentIdentificationMode,
108109
)?.[1] ?? ENVIRONMENT_IDENTIFICATION_LABELS[settings.environmentIdentificationMode];
110+
const effectiveEnvironmentIdentificationMode = useEnvironmentIdentificationMode();
111+
const themeHidesEnvironmentArtwork =
112+
effectiveEnvironmentIdentificationMode === "pill" &&
113+
resolveSidebarStageBackdropVariant(
114+
environmentStageLabel,
115+
settings.environmentIdentificationMode,
116+
) !== null;
117+
const environmentIdentificationDescription = themeHidesEnvironmentArtwork
118+
? environmentStageVariant
119+
? "Only built-in themes show artwork, so this theme shows the version pill."
120+
: "Only built-in themes show artwork."
121+
: environmentStageVariant
122+
? "Choose how Dev and Nightly environments are identified."
123+
: "Show Dev or Nightly artwork in the sidebar header.";
109124
const glassOpacityRatio =
110125
(settings.glassOpacity - MIN_GLASS_OPACITY) / (MAX_GLASS_OPACITY - MIN_GLASS_OPACITY);
111126
const glassOpacitySliderStyle = {
@@ -395,11 +410,7 @@ export function AppearanceSettingsPanel() {
395410
/>
396411
<SettingsRow
397412
{...searchableSetting("environment-identification")}
398-
description={
399-
environmentStageVariant
400-
? "Choose how Dev and Nightly environments are identified."
401-
: "Show Dev or Nightly artwork in the sidebar header."
402-
}
413+
description={environmentIdentificationDescription}
403414
resetAction={
404415
settings.environmentIdentificationMode !== DEFAULT_ENVIRONMENT_IDENTIFICATION_MODE ? (
405416
<SettingResetButton

0 commit comments

Comments
 (0)