Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
Use the first-launch theme cards in Settings (#3741)
sarah979d741cceff
diff --git a/.changeset/settings-theme-cards.md b/.changeset/settings-theme-cards.mdnew file mode 100644index 000000000..db183c9bd--- /dev/null+++ b/.changeset/settings-theme-cards.md@@ -0,0 +1,5 @@+---+"@inkeep/open-knowledge": patch+---++The theme setting in Settings → Preferences is now the same card picker you saw during first-launch setup, instead of a row of plain text pills. Each of System, Light, and Dark shows a small preview of what that mode looks like, and the selected card is marked with a check. Picking one still applies immediately and saves to your config, and the cards remain fully keyboard-navigable with arrow keys. Both screens now list the options in the same order — System, then Light, then Dark — so the layout doesn't shift between where you first set your theme and where you later change it.diff --git a/packages/app/src/components/McpConsentDialog.dom.test.tsx b/packages/app/src/components/McpConsentDialog.dom.test.tsxindex 816be5c73..9004ac728 100644--- a/packages/app/src/components/McpConsentDialog.dom.test.tsx+++ b/packages/app/src/components/McpConsentDialog.dom.test.tsx@@ -740,6 +740,19 @@ describe('McpConsentDialog theme picker', () => {expect(screen.getByTestId('theme-picker-dark').getAttribute('aria-checked')).toBe('false');});+ test('offers the cards in the one order every surface uses', async () => {+ // The Settings row asserts this same sequence. Both render the shared+ // picker, so a reorder in one place must not be able to move only one+ // screen out from under a user who learned the layout on the other.+ await renderDialog();++ expect(screen.getAllByRole('radio').map((el) => el.textContent)).toEqual([+ 'System',+ 'Light',+ 'Dark',+ ]);+ });+test('applies a pick immediately rather than deferring it to Finish', async () => {const harness = await renderDialog();diff --git a/packages/app/src/components/McpConsentDialogBody.tsx b/packages/app/src/components/McpConsentDialogBody.tsxindex 798771800..7cb8f745a 100644--- a/packages/app/src/components/McpConsentDialogBody.tsx+++ b/packages/app/src/components/McpConsentDialogBody.tsx@@ -50,7 +50,7 @@ import { useId, useState } from 'react';import { toast as sonnerToast } from 'sonner';import { OkIcon } from '@/components/icons/ok';import { RowDisclosure } from '@/components/RowDisclosure';-import { ThemePicker, type ThemePreference } from '@/components/ThemePicker';+import { narrowThemePreference, ThemePicker, type ThemePreference } from '@/components/ThemePicker';import {AlertDialog,AlertDialogBody,@@ -198,7 +198,7 @@ function McpConsentDialogForm({ payload, store, toast }: McpConsentDialogFormPro// mode — resolvedTheme would show 'dark' for a system pick and check the// wrong card.const { theme, setTheme } = useTheme();- const themePreference: ThemePreference = theme === 'dark' || theme === 'light' ? theme : 'system';+ const themePreference = narrowThemePreference(theme);// Optional because this dialog also renders in the Navigator window, which has// no server and therefore no ConfigProvider.const configContext = useConfigContextOptional();diff --git a/packages/app/src/components/ThemePicker.dom.test.tsx b/packages/app/src/components/ThemePicker.dom.test.tsxindex 62628ce6c..f6b6edcbb 100644--- a/packages/app/src/components/ThemePicker.dom.test.tsx+++ b/packages/app/src/components/ThemePicker.dom.test.tsx@@ -31,8 +31,8 @@ describe('ThemePicker', () => {expect(screen.getByRole('radiogroup', { name: 'Choose your theme' })).toBeTruthy();expect(screen.getAllByRole('radio').map((el) => el.textContent)).toEqual(['System',- 'Dark','Light',+ 'Dark',]);});@@ -71,10 +71,10 @@ describe('ThemePicker', () => {screen.getByTestId('theme-picker-system').focus();await userEvent.keyboard('{ArrowRight}');- expect(document.activeElement).toBe(screen.getByTestId('theme-picker-dark'));+ expect(document.activeElement).toBe(screen.getByTestId('theme-picker-light'));await userEvent.keyboard(' ');- expect(onValueChange).toHaveBeenCalledWith('dark');+ expect(onValueChange).toHaveBeenCalledWith('light');});test('reports nothing while disabled', async () => {diff --git a/packages/app/src/components/ThemePicker.tsx b/packages/app/src/components/ThemePicker.tsxindex 2b8327603..057f788ff 100644--- a/packages/app/src/components/ThemePicker.tsx+++ b/packages/app/src/components/ThemePicker.tsx@@ -22,10 +22,12 @@ import { CheckIcon, MonitorIcon, MoonIcon, SunIcon } from 'lucide-react';import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';import type { ComponentType } from 'react';import { RadioGroup } from '@/components/ui/radio-group';+import { narrowThemePreference, type ThemePreference } from '@/lib/use-apply-config-theme';import { cn } from '@/lib/utils';-/** The three values `appearance.theme` accepts; `system` tracks the OS. */-export type ThemePreference = 'system' | 'dark' | 'light';+// Re-exported so the picker stays the one import for card call sites, while+// `lib/` consumers take the narrowing straight from its module.+export { narrowThemePreference, type ThemePreference };/** Which tone(s) an option's thumbnail renders. `split` is the system preview. */type PreviewTone = 'split' | 'dark' | 'light';@@ -39,13 +41,15 @@ interface ThemeOption {/*** Fixed order — system first, since it is the default and the one most users- * keep. `msg` defers translation to render time, matching how the Settings- * enum labels are declared.+ * keep, then light before dark so the row runs from lightest to darkest. Every+ * surface that offers the choice renders this one list, so the order stays the+ * same wherever the user meets it. `msg` defers translation to render time,+ * matching how the Settings enum labels are declared.*/const THEME_OPTIONS: readonly ThemeOption[] = [{ value: 'system', label: msg`System`, Icon: MonitorIcon, preview: 'split' },- { value: 'dark', label: msg`Dark`, Icon: MoonIcon, preview: 'dark' },{ value: 'light', label: msg`Light`, Icon: SunIcon, preview: 'light' },+ { value: 'dark', label: msg`Dark`, Icon: MoonIcon, preview: 'dark' },];export interface ThemePickerProps {@@ -54,6 +58,21 @@ export interface ThemePickerProps {disabled?: boolean;/** Accessible name for the group — each call site labels it in its own words. */'aria-label': string;+ /**+ * Placed on the first card. The group root renders a <div>, which is not a+ * labelable element, so a settings row's `<label htmlFor>` has to point at a+ * focusable descendant or clicking the label moves focus nowhere.+ */+ firstItemId?: string;+ /**+ * Declared rather than picked up from a rest spread: a caller inside a+ * `<FormControl>` slot hands these down for the group to expose, and a+ * component that only destructures its named props drops anything it does+ * not name. Without them the field description renders but is referenced by+ * nothing, which is the state assistive tech sees as no description at all.+ */+ 'aria-describedby'?: string;+ 'aria-invalid'?: boolean | 'true' | 'false';className?: string;}@@ -62,6 +81,9 @@ export function ThemePicker({onValueChange,disabled,'aria-label': ariaLabel,+ firstItemId,+ 'aria-describedby': ariaDescribedby,+ 'aria-invalid': ariaInvalid,className,}: ThemePickerProps) {const { t } = useLingui();@@ -71,14 +93,21 @@ export function ThemePicker({onValueChange={(next) => onValueChange(next as ThemePreference)}disabled={disabled}aria-label={ariaLabel}+ aria-describedby={ariaDescribedby}+ aria-invalid={ariaInvalid}// auto-fit rather than a breakpoint: this renders both in a wide dialog// and in the narrow Settings field column, so the wrap point has to come// from the space the group actually has, not the viewport width.className={cn('grid-cols-[repeat(auto-fit,minmax(9rem,1fr))] gap-3', className)}data-testid="theme-picker">- {THEME_OPTIONS.map((option) => (- <ThemePickerOption key={option.value} option={option} label={t(option.label)} />+ {THEME_OPTIONS.map((option, index) => (+ <ThemePickerOption+ key={option.value}+ option={option}+ label={t(option.label)}+ id={index === 0 ? firstItemId : undefined}+ />))}</RadioGroup>);@@ -89,11 +118,20 @@ export function ThemePicker({* selection styling reads off Radix's own state rather than a prop comparison* that could drift from what the group actually considers checked.*/-function ThemePickerOption({ option, label }: { option: ThemeOption; label: string }) {+function ThemePickerOption({+ option,+ label,+ id,+}: {+ option: ThemeOption;+ label: string;+ id?: string;+}) {const { Icon, preview, value } = option;return (<RadioGroupPrimitive.Itemvalue={value}+ id={id}// The card IS the control, so the shadcn RadioGroupItem circle styling is// deliberately not reused here.className="group relative flex cursor-pointer flex-col gap-2 rounded-lg border border-border bg-card/50 p-2 text-start outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary/5"@@ -111,7 +149,9 @@ function ThemePickerOption({ option, label }: { option: ThemeOption; label: stri</span></span><span className="flex items-center gap-1.5 px-0.5 pb-0.5 font-medium text-1sm text-foreground">- <Icon className="size-3.5 shrink-0 text-muted-foreground" />+ {/* Decorative: the adjacent text is the option's name, so announcing+ the icon too would read as "Sun icon Light". */}+ <Icon aria-hidden className="size-3.5 shrink-0 text-muted-foreground" />{label}</span></RadioGroupPrimitive.Item>diff --git a/packages/app/src/components/settings/ColorThemePicker.dom.test.tsx b/packages/app/src/components/settings/ColorThemePicker.dom.test.tsxindex 1a021b5f2..7bb1f0185 100644--- a/packages/app/src/components/settings/ColorThemePicker.dom.test.tsx+++ b/packages/app/src/components/settings/ColorThemePicker.dom.test.tsx@@ -60,6 +60,27 @@ describe('ColorThemePicker', () => {cleanup();});+ test('exposes the slot-forwarded description and invalid state on the group', async () => {+ // `<FormControl>` is a Radix Slot: it merges these onto its single child,+ // so they only reach the DOM if this component names them. It destructures+ // without a rest spread, which means an unnamed prop is dropped silently+ // and the settings row's description ends up referenced by nothing.+ const { ColorThemePicker } = await import('./ColorThemePicker');+ render(+ <ColorThemePicker+ selection={DEFAULTS}+ onAssign={() => {}}+ aria-label="Color theme"+ aria-describedby="palette-description"+ aria-invalid+ />,+ );++ const group = screen.getByRole('group', { name: 'Color theme' });+ expect(group.getAttribute('aria-describedby')).toBe('palette-description');+ expect(group.getAttribute('aria-invalid')).toBe('true');+ });+test('renders one tile per registered theme, each with a sun and a moon', async () => {await renderPicker(DEFAULTS);for (const theme of COLOR_THEMES) {diff --git a/packages/app/src/components/settings/ColorThemePicker.tsx b/packages/app/src/components/settings/ColorThemePicker.tsxindex ce062259e..388149a93 100644--- a/packages/app/src/components/settings/ColorThemePicker.tsx+++ b/packages/app/src/components/settings/ColorThemePicker.tsx@@ -74,6 +74,12 @@ export interface ColorThemePickerProps {firstItemId?: string;'aria-label'?: string;'aria-describedby'?: string;+ /**+ * Forwarded for the same reason as `aria-describedby`: a rejected palette+ * write surfaces through `form.setError`, and without this the group never+ * signals that state to assistive tech.+ */+ 'aria-invalid'?: boolean | 'true' | 'false';}/** The handful of palette colors a preview tile renders. */@@ -216,6 +222,7 @@ export function ColorThemePicker({firstItemId,'aria-label': ariaLabel,'aria-describedby': ariaDescribedby,+ 'aria-invalid': ariaInvalid,}: ColorThemePickerProps) {const { t } = useLingui();return (@@ -224,6 +231,7 @@ export function ColorThemePicker({<fieldsetaria-label={ariaLabel}aria-describedby={ariaDescribedby}+ aria-invalid={ariaInvalid}className="grid w-full min-w-0 grid-cols-2 gap-2 sm:grid-cols-3">{themes.map((theme, index) => {diff --git a/packages/app/src/components/settings/SettingsDialogBody.dom.test.tsx b/packages/app/src/components/settings/SettingsDialogBody.dom.test.tsxindex a093abf87..c10c4f1d9 100644--- a/packages/app/src/components/settings/SettingsDialogBody.dom.test.tsx+++ b/packages/app/src/components/settings/SettingsDialogBody.dom.test.tsx@@ -524,14 +524,14 @@ describe('SettingsDialogBody language picker', () => {});/**- * Optimistic theme-apply path. The Theme ToggleGroup must flip- * next-themes immediately on the originating client instead of waiting for- * the patch -> user-config Y.Text -> ConfigProvider merged-effect round-trip.+ * Optimistic theme-apply path. The Theme cards must flip next-themes+ * immediately on the originating client instead of waiting for the patch ->+ * user-config Y.Text -> ConfigProvider merged-effect round-trip.** This harness mounts no ConfigProvider effects; it only supplies the bare* ConfigContext needed by project-scope settings. The only thing that can move* next-themes state on click is still the optimistic `setTheme(next)` wired- * into `FieldControlBody`'s enum-toggle branch. That makes the probe assertion+ * into `FieldControlBody`'s theme-cards branch. That makes the probe assertion* a discriminating check: it goes green ONLY if the optimistic path fires. The* `binding.patch` assertion proves persistence is still wired.*/@@ -569,7 +569,7 @@ function renderPreferencesWithTheme(binding: ConfigBinding) {}/**- * What each theme value reads as on screen. The toggle renders a translated+ * What each theme value reads as on screen. Each card renders a translated* label rather than the config value, so the value alone no longer finds the* control; under this runner the Lingui macros pass English through, which is* what these are. Kept as a lookup so the call sites stay written in terms of@@ -581,13 +581,13 @@ const THEME_OPTION_LABELS: Record<string, string> = {system: 'System',};-function themeToggleItem(container: HTMLElement, option: string): HTMLElement {+function themeCardItem(container: HTMLElement, option: string): HTMLElement {const field = container.querySelector('[data-field="appearance.theme"]');if (!field) throw new Error('appearance.theme field not rendered');return within(field as HTMLElement).getByText(THEME_OPTION_LABELS[option] ?? option);}-describe('SettingsDialogBody theme toggle — optimistic apply', () => {+describe('SettingsDialogBody theme cards — optimistic apply', () => {afterEach(() => {cleanup();});@@ -600,7 +600,7 @@ describe('SettingsDialogBody theme toggle — optimistic apply', () => {// Default theme before any click.expect(screen.getByTestId('theme-probe').textContent).toBe('system');- await user.click(themeToggleItem(container, 'dark'));+ await user.click(themeCardItem(container, 'dark'));// Optimistic flip — observable only via the new setTheme path because// this tree has no ConfigProvider merged-effect to drive the theme.@@ -617,12 +617,12 @@ describe('SettingsDialogBody theme toggle — optimistic apply', () => {const { container } = renderPreferencesWithTheme(binding);// Move off the default first so the System transition is observable.- await user.click(themeToggleItem(container, 'dark'));+ await user.click(themeCardItem(container, 'dark'));await waitFor(() => {expect(screen.getByTestId('theme-probe').textContent).toBe('dark');});- await user.click(themeToggleItem(container, 'system'));+ await user.click(themeCardItem(container, 'system'));// Verbatim 'system' — the OS-tracking lever — not a resolved light/dark.await waitFor(() => {@@ -636,7 +636,7 @@ describe('SettingsDialogBody theme toggle — optimistic apply', () => {const { binding, patches } = makeBinding();const { container } = renderPreferencesWithTheme(binding);- await user.click(themeToggleItem(container, 'light'));+ await user.click(themeCardItem(container, 'light'));await waitFor(() => {expect(screen.getByTestId('theme-probe').textContent).toBe('light');diff --git a/packages/app/src/components/settings/field-controls.theme-cards.dom.test.tsx b/packages/app/src/components/settings/field-controls.theme-cards.dom.test.tsxnew file mode 100644index 000000000..d3d76ac67--- /dev/null+++ b/packages/app/src/components/settings/field-controls.theme-cards.dom.test.tsx@@ -0,0 +1,206 @@+/**+ * The Settings appearance row renders the shared light/dark/system card picker+ * and keeps the two-step commit the plain toggle it replaced had: flip+ * next-themes immediately (so the app repaints on click rather than after the+ * config round-trip), then persist through the form harness.+ */++import type { Config } from '@inkeep/open-knowledge-core';+import { cleanup, render, screen } from '@testing-library/react';+import userEvent from '@testing-library/user-event';+import type { ReactNode } from 'react';+import { FormProvider, useForm } from 'react-hook-form';+import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';+import { TooltipProvider } from '@/components/ui/tooltip';+import { renderLinguiTemplate } from '@/test-utils/lingui-mock';++function translateLingui(+ message: TemplateStringsArray | string | { message?: string },+ ...values: unknown[]+): string {+ if (typeof message === 'object' && 'message' in message) return message.message ?? '';+ return renderLinguiTemplate(message, ...values);+}++vi.doMock('@lingui/react/macro', () => ({+ Trans: ({ children }: { children: ReactNode }) => <>{children}</>,+ msg: renderLinguiTemplate,+ useLingui: () => ({ t: translateLingui }),+}));++const setTheme = vi.fn();+vi.doMock('next-themes', () => ({ useTheme: () => ({ setTheme, systemTheme: 'light' }) }));++const { SettingsField } = await import('./field-controls');+const { FIELDS_USER_PREFERENCES } = await import('./settings-fields');++const THEME_FIELD = FIELDS_USER_PREFERENCES.find(+ (f) => f.path.join('.') === 'appearance.theme',+) as (typeof FIELDS_USER_PREFERENCES)[number];++const commitField = vi.fn(() => true);++/**+ * Seeds the form the way the real dialog does — from the merged config — so+ * `ctl.value` is the stored preference rather than a resolved mode.+ */+function Harness({ theme }: { theme?: 'system' | 'light' | 'dark' }) {+ const form = useForm<Config>({+ defaultValues: { appearance: theme === undefined ? {} : { theme } } as Config,+ });+ return (+ <>+ {/* `dirtyFields`, not `isDirty`: the remote-update bridge keeps values for+ the fields listed here, while RHF's form-level `isDirty` stays true+ after a field-level reset even once nothing is actually dirty. */}+ <span data-testid="dirty-fields">{JSON.stringify(form.formState.dirtyFields)}</span>+ {/* The row's reset button is a Radix Tooltip trigger, which throws+ without a provider — the real dialog wraps its whole body in one. */}+ <TooltipProvider>+ <FormProvider {...form}>+ <SettingsField+ field={THEME_FIELD}+ scope="user"+ commitField={commitField}+ isFlashed={false}+ />+ </FormProvider>+ </TooltipProvider>+ </>+ );+}++function checkedCard(): string | null {+ return (+ screen.getAllByRole('radio').find((el) => el.getAttribute('aria-checked') === 'true')+ ?.textContent ?? null+ );+}++describe('Settings appearance theme row', () => {+ beforeEach(() => {+ setTheme.mockClear();+ commitField.mockClear();+ commitField.mockReturnValue(true);+ });+ afterEach(() => cleanup());++ test('renders the card picker rather than a plain toggle', () => {+ render(<Harness theme="system" />);++ // The row is labelled by the field label, which is also what the reset+ // button and the search index key off.+ expect(screen.getByRole('radiogroup', { name: 'Theme' })).toBeTruthy();+ expect(screen.getAllByRole('radio').map((el) => el.textContent)).toEqual([+ 'System',+ 'Light',+ 'Dark',+ ]);+ });++ test('points the row label at a focusable card', () => {+ // The group root is a <div>, so `<label htmlFor>` pointing at it would+ // focus nothing on click. Asserted against the first card's own id, which+ // is the only reason `firstItemId` exists — without this, blanking that+ // prop is a silent no-op to the whole suite.+ const { container } = render(<Harness theme="system" />);++ const forId = container.querySelector('label')?.getAttribute('for');+ expect(forId).toBeTruthy();+ expect(screen.getByTestId('theme-picker-system').id).toBe(forId);+ });++ test('lets the group carry the field description and invalid state', () => {+ // `<FormControl>` is a Radix Slot: it merges these onto its single child,+ // so they only reach the DOM if the picker names them. A picker that+ // silently drops them leaves the description rendered but referenced by+ // nothing — which reads to assistive tech as no description at all.+ const { container } = render(<Harness theme="system" />);++ const description = container.querySelector('[data-slot="form-description"]');+ expect(description?.id).toBeTruthy();+ const group = screen.getByRole('radiogroup');+ expect(group.getAttribute('aria-describedby')).toContain(description?.id as string);+ expect(group.getAttribute('aria-invalid')).toBe('false');+ });++ test('checks the card matching the stored preference', () => {+ render(<Harness theme="dark" />);++ expect(checkedCard()).toBe('Dark');+ });++ test('shows System for an unset preference, which is how unset behaves', () => {+ // `appearance.theme` has no schema default and is absent from a fresh+ // config.yml. The toggle this replaced rendered nothing selected; the OS is+ // what an unset value actually follows, so System is the honest card.+ render(<Harness />);++ expect(checkedCard()).toBe('System');+ });++ test('flips next-themes and commits the pick', async () => {+ render(<Harness theme="system" />);++ await userEvent.click(screen.getByTestId('theme-picker-dark'));++ expect(setTheme).toHaveBeenCalledWith('dark');+ expect(commitField).toHaveBeenCalledWith('appearance.theme');+ expect(checkedCard()).toBe('Dark');+ });++ test('paints back to the committed theme when the write is rejected', async () => {+ // The flip is optimistic, so a refused write would otherwise leave the app+ // showing a theme nothing persisted until a later merged-effect quietly+ // undid it. Both legs have to come back: the applied mode AND the checked+ // card, or the two disagree.+ commitField.mockReturnValue(false);+ render(<Harness theme="light" />);++ await userEvent.click(screen.getByTestId('theme-picker-dark'));++ expect(setTheme).toHaveBeenNthCalledWith(1, 'dark');+ expect(setTheme).toHaveBeenLastCalledWith('light');+ expect(checkedCard()).toBe('Light');+ });++ test('leaves an unset row clean after a rejected write, not permanently dirty', async () => {+ // `appearance.theme` has no schema default, so a fresh config carries no+ // such key. Reverting by writing the NARROWED value back puts 'system'+ // over that absent baseline and leaves the row in `dirtyFields` for good —+ // measured, not assumed: that version reports+ // `{"appearance":{"theme":true}}` here. Remote updates skip dirty fields,+ // so the row would stop absorbing theme changes from other windows with+ // nothing on screen to say so.+ commitField.mockReturnValue(false);+ render(<Harness />);++ await userEvent.click(screen.getByTestId('theme-picker-dark'));++ expect(setTheme).toHaveBeenLastCalledWith('system');+ expect(screen.getByTestId('dirty-fields').textContent).toBe('{}');+ });++ test('moves the applied theme too when the row is reset', async () => {+ // Reset clears the stored value, which the cards render as System — the+ // mode an unset preference follows. Without moving next-themes, the window+ // stays in the mode the cleared value forced, so the checked card and the+ // theme on screen disagree with nothing to explain it.+ render(<Harness theme="dark" />);++ await userEvent.click(screen.getByRole('button', { name: 'Reset Theme to default' }));++ expect(setTheme).toHaveBeenCalledWith('system');+ expect(checkedCard()).toBe('System');+ });++ test("forwards 'system' verbatim instead of resolving it to a mode", async () => {+ // Resolving here would write 'light'/'dark' into config and strand the+ // user's choice to track the OS — the whole point of the System card.+ render(<Harness theme="dark" />);++ await userEvent.click(screen.getByTestId('theme-picker-system'));++ expect(setTheme).toHaveBeenCalledWith('system');+ });+});diff --git a/packages/app/src/components/settings/field-controls.tsx b/packages/app/src/components/settings/field-controls.tsxindex 2e04f9bfa..cf8870e56 100644--- a/packages/app/src/components/settings/field-controls.tsx+++ b/packages/app/src/components/settings/field-controls.tsx@@ -18,13 +18,12 @@ import {getFieldMeta,isKnownConfigError,} from '@inkeep/open-knowledge-core';-import type { MessageDescriptor } from '@lingui/core';-import { msg } from '@lingui/core/macro';import { Trans, useLingui } from '@lingui/react/macro';import { Check, RotateCcw } from 'lucide-react';import { useTheme } from 'next-themes';import { useEffect, useRef, useState } from 'react';import { type ControllerRenderProps, type FieldPath, useFormContext } from 'react-hook-form';+import { narrowThemePreference, ThemePicker } from '@/components/ThemePicker';import { Button } from '@/components/ui/button';import {FormControl,@@ -74,21 +73,6 @@ import { pickFirstIssueForPath } from './use-config-form';*/export type Scope = 'user' | 'project';-/**- * Display copy for the enum values a toggle renders.- *- * A config enum value is a wire identifier (`'light'`, `'system'`), not copy.- * Rendering it verbatim puts English on screen in every locale — and visibly- * so, since the toggle sits directly beneath its own translated label and- * description. An unmapped value falls through to the raw identifier, so a new- * enum still renders something rather than blanking.- */-const ENUM_OPTION_LABELS: Record<string, MessageDescriptor> = {- light: msg`Light`,- dark: msg`Dark`,- system: msg`System`,-};-export function firstIssuePath(error: ConfigValidationError): string | null {if (!isKnownConfigError(error) || error.code !== 'SCHEMA_INVALID') return null;const first = error.issues[0];@@ -124,6 +108,9 @@ export function SettingsField({ field, scope, commitField, isFlashed }: Settings'use no memo';const { t } = useLingui();const form = useFormContext<Config>();+ // Safe unconditionally: next-themes returns a no-op `setTheme` with no+ // provider mounted, which is how the unit harnesses render this.+ const { setTheme } = useTheme();const configContext = useConfigContextOptional();const leafSchema = resolveLeafSchema(ConfigSchema, field.path);const typeTag = leafSchema ? getLeafTypeTag(leafSchema) : undefined;@@ -219,6 +206,13 @@ export function SettingsField({ field, scope, commitField, isFlashed }: Settings}const target = defaultValue === undefined ? null : defaultValue;form.setValue(dottedName, target as never, { shouldDirty: false });+ // The theme row is the one generic-reset field that paints the whole app.+ // Clearing the value alone snaps the card to System — what an unset+ // preference resolves to — while the window stays in the mode the old value+ // forced, so the checked card and the applied theme disagree until the next+ // merged-effect. The toggle this replaced hid that by rendering nothing+ // selected for an unset value; the cards state it outright.+ if (field.control === 'theme-cards') setTheme(narrowThemePreference(target));runCommit();};@@ -271,6 +265,7 @@ export function SettingsField({ field, scope, commitField, isFlashed }: SettingstypeTag={typeTag}enumOptions={enumOptions}onCommit={runCommitIfDirty}+ onRevertToBaseline={() => form.resetField(dottedName, { keepError: true })}onSavedOutsideForm={flashSavedTick}onWriteRejected={(error) => {form.setError(dottedName, {@@ -280,7 +275,7 @@ export function SettingsField({ field, scope, commitField, isFlashed }: Settings}}/></FormControl>- <SavedIndicator visible={savedTick} srOnly={field.control === 'theme-tiles'} />+ <SavedIndicator visible={savedTick} srOnly={selfIndicating(field.control)} /></div><FormMessage data-field-error={field.path.join('.')} /></FormItem>@@ -290,6 +285,17 @@ export function SettingsField({ field, scope, commitField, isFlashed }: Settings);}+/**+ * Controls that already show their own selection state — each renders a check+ * badge on the chosen card or tile and spans the full row — so the row's saved+ * tick would be a redundant second checkmark competing for the same width. It+ * stays in the tree for screen readers, which get no equivalent from the badge+ * (the badge is decorative and `aria-hidden`).+ */+function selfIndicating(control: FieldDef['control']): boolean {+ return control === 'theme-tiles' || control === 'theme-cards';+}+interface FieldControlBodyProps {field: FieldDef;ctl: ControllerRenderProps<Config, FieldPath<Config>>;@@ -301,6 +307,14 @@ interface FieldControlBodyProps {* `ctl.onChange` BEFORE invoking — the commit reads from form state.*/onCommit: () => boolean;+ /**+ * Restore the field to its committed baseline and clear its dirty flag,+ * keeping any error the rejection surfaced. Owned by the caller because only+ * it holds the form handle; `ctl.onChange(previous)` is NOT equivalent —+ * writing a value back leaves the key present, which RHF scores as dirty+ * against a baseline that never had one.+ */+ onRevertToBaseline: () => void;/*** Flash the saved indicator for a control that writes through the binding* directly instead of the form's per-field commit. `onCommit` is not usable@@ -336,6 +350,7 @@ function FieldControlBody({typeTag,enumOptions,onCommit,+ onRevertToBaseline,onSavedOutsideForm,onWriteRejected,...slotForwarded@@ -345,8 +360,8 @@ function FieldControlBody({// Optimistic theme apply. next-themes' `useTheme` is safe to// call unconditionally — it returns a no-op `setTheme` when no// <ThemeProvider> is mounted (e.g. in unit harnesses), and the app always- // mounts one in `main.tsx`. The actual flip is gated to the theme field in- // the enum-toggle branch below, so non-theme controls are unaffected.+ // mounts one in `main.tsx`. Only the two theme controls below call+ // `setTheme`, so every other control is unaffected.// `systemTheme` is the OS preference, independent of the mode a palette// forces — it's what `appearance.theme: 'system'` resolves to.const { setTheme, systemTheme } = useTheme();@@ -381,6 +396,63 @@ function FieldControlBody({/>);}+ if (field.control === 'theme-cards') {+ // Slot.Root forwards `id` onto its child, but the picker's group root is a+ // <div> — not a labelable element — so `<label htmlFor>` on it would focus+ // nothing. The id rides the first card instead, while the remaining slot+ // props go to the group, which is what they describe. The picker has to+ // NAME those two props: it destructures without a rest spread, so anything+ // handed down that it does not name is dropped rather than reaching the DOM.+ const { id: forwardedId, ...wrapperSlotProps } = slotForwarded;+ // No `ref` / `onBlur`, matching the theme-tiles card control: RHF's+ // `form.setFocus` was already inert for this field (the enum-toggle root it+ // replaced was a non-focusable <div>), and wiring the Controller ref into+ // one card here would leave the two card controls asymmetric.+ return (+ <ThemePicker+ {...wrapperSlotProps}+ firstItemId={forwardedId}+ // Read the stored preference, never next-themes' resolved mode: a+ // 'system' pick resolves to 'dark'/'light' and would check the wrong+ // card. An unset value reads as 'system', which is how it behaves.+ value={narrowThemePreference(ctl.value)}+ aria-label={t(field.label)}+ onValueChange={(next) => {+ // Read before the change: `ctl.value` is the render-time value, so+ // this is what was last committed. The two reverts below want+ // different shapes of it — see the rejection branch.+ const previousTheme = narrowThemePreference(ctl.value);+ // Optimistic flip, same contract as the toggle this replaced: apply+ // via next-themes synchronously so the UI changes on click rather+ // than after the patch -> user-config Y.Text -> ConfigProvider+ // merged-effect round-trip. `next` is forwarded verbatim so 'system'+ // stays the OS-tracking lever. The merged-effect still drives remote+ // clients and Electron native chrome, and no-ops here (same value ->+ // next-themes state bailout), so there is no double-flip.+ setTheme(next);+ ctl.onChange(next);+ if (onCommit()) return;+ // Rejected write (an unparseable config.yml, a binding that refused).+ // The paint already landed, so leaving it shows a theme nothing+ // persisted until a later merged-effect silently undoes it. Both legs+ // revert together: restoring only next-themes leaves the checked card+ // disagreeing with the applied mode, and restoring only the form+ // value leaves the reverse.+ //+ // The two legs revert differently on purpose. next-themes needs a+ // concrete preference, so it takes the narrowed value. The form goes+ // back through `resetField`, not `onChange`: `appearance.theme` is+ // unset by default, and writing any value back — narrowed OR raw —+ // leaves the row dirty against a baseline that has no such key.+ // `useConfigForm` bridges remote updates with `keepDirtyValues: true`,+ // so a permanently dirty row silently stops absorbing theme changes+ // from other windows or an external config edit.+ setTheme(previousTheme);+ onRevertToBaseline();+ }}+ />+ );+ }if (field.control === 'theme-tiles') {const { id: forwardedId, ...wrapperSlotProps } = slotForwarded;const customSeed = merged?.appearance?.customTheme;@@ -479,9 +551,6 @@ function FieldControlBody({// focus into the group. aria-describedby/aria-invalid stay on the// wrapper since they describe the group as a whole.const { id: forwardedId, ...wrapperSlotProps } = slotForwarded;- // Theme is the one enum-toggle that flips app-wide appearance. Detect it- // by path so the optimistic next-themes write stays scoped to this field.- const isThemeField = field.path[0] === 'appearance' && field.path[1] === 'theme';return (<ToggleGroup{...wrapperSlotProps}@@ -490,16 +559,6 @@ function FieldControlBody({ref={ctl.ref}onValueChange={(next) => {if (!next) return;- // Optimistic flip on the originating client: apply via next-themes- // synchronously so the UI changes on click instead of waiting for- // the patch -> user-config Y.Text -> ConfigProvider merged-effect- // round-trip (the perceived lag). `next` is forwarded verbatim —- // 'system' is the OS-tracking lever and must not be resolved here.- // The ConfigProvider merged-effect still drives cross-project /- // remote clients (via config.yml + file-watcher) and Electron- // native chrome, and no-ops here (same value -> next-themes- // state bailout), so there is no double-flip.- if (isThemeField) setTheme(next);ctl.onChange(next);onCommit();}}@@ -510,22 +569,20 @@ function FieldControlBody({className="bg-muted dark:bg-background p-0.5 rounded-lg"aria-label={t(field.label)}>- {enumOptions.map((opt, idx) => {- const label = ENUM_OPTION_LABELS[opt];- return (- <ToggleGroupItem- key={opt}- value={opt}- id={idx === 0 ? forwardedId : undefined}- // `capitalize` only styles the raw-identifier fallback; a- // translated label is already cased by its translator, and- // some scripts have no case at all.- className={label ? 'text-1sm' : 'text-1sm capitalize'}- >- {label ? t(label) : opt}- </ToggleGroupItem>- );- })}+ {enumOptions.map((opt, idx) => (+ <ToggleGroupItem+ key={opt}+ value={opt}+ id={idx === 0 ? forwardedId : undefined}+ // Raw schema identifiers, so they need casing; no enum field+ // declares this control today, and the only translated label set+ // it ever carried belonged to the theme field, which now renders+ // as cards.+ className="text-1sm capitalize"+ >+ {opt}+ </ToggleGroupItem>+ ))}</ToggleGroup>);}diff --git a/packages/app/src/components/settings/settings-fields.ts b/packages/app/src/components/settings/settings-fields.tsindex 9e7b5d6f7..3abd3e523 100644--- a/packages/app/src/components/settings/settings-fields.ts+++ b/packages/app/src/components/settings/settings-fields.ts@@ -18,12 +18,13 @@ export interface FieldDef {description?: MessageDescriptor;/*** Optional override: 'enum-toggle' renders enum as a ToggleGroup;+ * 'theme-cards' renders the light/dark/system cards with mode thumbnails;* 'theme-tiles' renders the IDE color-palette tile picker;* 'language-select' renders the interface-language picker, whose options* come from the reviewed picker set rather than from the schema enum;* default is a select-style toggle.*/- control?: 'enum-toggle' | 'theme-tiles' | 'language-select';+ control?: 'enum-toggle' | 'theme-cards' | 'theme-tiles' | 'language-select';}export const FIELDS_USER_PREFERENCES: FieldDef[] = [@@ -31,7 +32,7 @@ export const FIELDS_USER_PREFERENCES: FieldDef[] = [path: ['appearance', 'theme'],label: msg`Theme`,description: msg`Light, dark, or follow the OS.`,- control: 'enum-toggle',+ control: 'theme-cards',},{path: ['appearance', 'language'],diff --git a/packages/app/src/lib/use-apply-config-color-theme.ts b/packages/app/src/lib/use-apply-config-color-theme.tsindex c9d561bf4..9e261c8f1 100644--- a/packages/app/src/lib/use-apply-config-color-theme.ts+++ b/packages/app/src/lib/use-apply-config-color-theme.ts@@ -11,6 +11,7 @@ import {resolveColorTheme,resolveCustomScheme,} from './color-themes';+import { narrowThemePreference } from './use-apply-config-theme';/*** localStorage key the FOUC script in `index.html` reads pre-paint: the light +@@ -207,7 +208,7 @@ export function applyColorThemeToDom(input: ApplyColorThemeInput): void {localStorage.setItem(COLOR_THEME_PAIR_STORAGE_KEY,JSON.stringify({- pref: modePreference === 'light' || modePreference === 'dark' ? modePreference : 'system',+ pref: narrowThemePreference(modePreference),light: cachedSlot(selection.light, 'light', customSeed, themes),dark: cachedSlot(selection.dark, 'dark', customSeed, themes),}),diff --git a/packages/app/src/lib/use-apply-config-theme.ts b/packages/app/src/lib/use-apply-config-theme.tsindex a15e44932..70eb25f3f 100644--- a/packages/app/src/lib/use-apply-config-theme.ts+++ b/packages/app/src/lib/use-apply-config-theme.ts@@ -1,6 +1,27 @@import { useTheme } from 'next-themes';import { useEffect } from 'react';+/** The three values `appearance.theme` accepts; `system` tracks the OS. */+export type ThemePreference = 'system' | 'light' | 'dark';++/**+ * Narrow an unknown stored value to a pickable preference.+ *+ * Anything that is not an explicit 'dark' or 'light' — an unset+ * `appearance.theme`, next-themes' literal 'system', a hand-edited config+ * carrying nonsense — resolves to 'system', which is what the app actually does+ * in each of those cases. Callers must NOT substitute the resolved mode here:+ * 'system' is the OS-tracking lever, and collapsing it to 'dark'/'light' checks+ * the wrong card and strands the user's choice to follow the OS.+ *+ * Lives beside the apply hook rather than beside the picker so the non-React+ * `lib/` callers can reach it without importing a component, which is where+ * `narrowLanguagePreference` sits for the same reason.+ */+export function narrowThemePreference(value: unknown): ThemePreference {+ return value === 'dark' || value === 'light' ? value : 'system';+}+/*** Apply the merged-config `appearance.theme` into next-themes, app-wide. Owned* by `ConfigProvider`; the single seam that turns a config value (Settingsdiff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.poindex 0c9442122..3cf11a76f 100644--- a/packages/app/src/locales/ar/messages.po+++ b/packages/app/src/locales/ar/messages.po@@ -4229,7 +4229,6 @@ msgstr "خصّص تجربتك في OpenKnowledge."msgid "Cut"msgstr "قص"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "داكن"@@ -7247,7 +7246,6 @@ msgstr "لنبدأ الإعداد."msgid "Level"msgstr "المستوى"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "فاتح"@@ -12498,7 +12496,6 @@ msgstr "تجري المزامنة"msgid "Syncing your changes"msgstr "تجري مزامنة تغييراتك"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.poindex 8a0dec6fd..bc6ed895d 100644--- a/packages/app/src/locales/bn/messages.po+++ b/packages/app/src/locales/bn/messages.po@@ -4225,7 +4225,6 @@ msgstr "আপনার OpenKnowledge অভিজ্ঞতা নিজেরmsgid "Cut"msgstr "কাটুন"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "গাঢ়"@@ -7243,7 +7242,6 @@ msgstr "চলুন সেটআপ করি।"msgid "Level"msgstr "স্তর"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "হালকা"@@ -12494,7 +12492,6 @@ msgstr "সিঙ্ক হচ্ছে"msgid "Syncing your changes"msgstr "আপনার পরিবর্তন সিঙ্ক হচ্ছে"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 8f37ce765..61b475955 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -4229,7 +4229,6 @@ msgstr "Customize your OpenKnowledge experience."msgid "Cut"msgstr "Cut"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "Dark"@@ -7247,7 +7246,6 @@ msgstr "Let's get set up."msgid "Level"msgstr "Level"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "Light"@@ -12498,7 +12496,6 @@ msgstr "Syncing"msgid "Syncing your changes"msgstr "Syncing your changes"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.poindex 4cf68fd5e..085694483 100644--- a/packages/app/src/locales/es/messages.po+++ b/packages/app/src/locales/es/messages.po@@ -4229,7 +4229,6 @@ msgstr "Personaliza tu experiencia en OpenKnowledge."msgid "Cut"msgstr "Cortar"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "Oscuro"@@ -7247,7 +7246,6 @@ msgstr "Vamos a configurarlo."msgid "Level"msgstr "Nivel"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "Claro"@@ -12498,7 +12496,6 @@ msgstr "Sincronizando"msgid "Syncing your changes"msgstr "Sincronizando tus cambios"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.poindex e7e12c545..aa65bfea5 100644--- a/packages/app/src/locales/fr/messages.po+++ b/packages/app/src/locales/fr/messages.po@@ -4229,7 +4229,6 @@ msgstr "Personnalisez votre expérience OpenKnowledge."msgid "Cut"msgstr "Couper"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "Sombre"@@ -7247,7 +7246,6 @@ msgstr "Commençons la configuration."msgid "Level"msgstr "Niveau"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "Clair"@@ -12498,7 +12496,6 @@ msgstr "Synchronisation en cours"msgid "Syncing your changes"msgstr "Synchronisation de vos modifications"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.poindex 25e8e523d..2740b69bd 100644--- a/packages/app/src/locales/hi/messages.po+++ b/packages/app/src/locales/hi/messages.po@@ -4225,7 +4225,6 @@ msgstr "अपने OpenKnowledge अनुभव को अनुकूलिmsgid "Cut"msgstr "काटें"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "गहरा"@@ -7243,7 +7242,6 @@ msgstr "चलिए सेटअप करते हैं।"msgid "Level"msgstr "स्तर"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "हल्का"@@ -12494,7 +12492,6 @@ msgstr "सिंक हो रहा है"msgid "Syncing your changes"msgstr "आपके बदलाव सिंक हो रहे हैं"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.poindex 3b42682b2..ed8aa8965 100644--- a/packages/app/src/locales/id/messages.po+++ b/packages/app/src/locales/id/messages.po@@ -4225,7 +4225,6 @@ msgstr "Sesuaikan pengalaman OpenKnowledge Anda."msgid "Cut"msgstr "Potong"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "Gelap"@@ -7243,7 +7242,6 @@ msgstr "Mari kita siapkan."msgid "Level"msgstr "Tingkat"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "Terang"@@ -12494,7 +12492,6 @@ msgstr "Menyinkronkan"msgid "Syncing your changes"msgstr "Menyinkronkan perubahan Anda"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/ko/messages.po b/packages/app/src/locales/ko/messages.poindex 1de9df640..28e8bec0c 100644--- a/packages/app/src/locales/ko/messages.po+++ b/packages/app/src/locales/ko/messages.po@@ -4229,7 +4229,6 @@ msgstr "OpenKnowledge 환경을 원하는 대로 설정하세요."msgid "Cut"msgstr "잘라내기"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "어두운 테마"@@ -7247,7 +7246,6 @@ msgstr "설정을 시작해 볼까요."msgid "Level"msgstr "수준"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "밝은 테마"@@ -12498,7 +12496,6 @@ msgstr "동기화 중"msgid "Syncing your changes"msgstr "변경 사항 동기화 중"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex 31ebfb25b..214993184 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -4225,7 +4225,6 @@ msgstr ""msgid "Cut"msgstr ""-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr ""@@ -7243,7 +7242,6 @@ msgstr ""msgid "Level"msgstr ""-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr ""@@ -12494,7 +12492,6 @@ msgstr ""msgid "Syncing your changes"msgstr ""-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.poindex c8909c599..225e4a97f 100644--- a/packages/app/src/locales/pt-BR/messages.po+++ b/packages/app/src/locales/pt-BR/messages.po@@ -4225,7 +4225,6 @@ msgstr "Personalize sua experiência no OpenKnowledge."msgid "Cut"msgstr "Recortar"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "Escuro"@@ -7243,7 +7242,6 @@ msgstr "Vamos configurar."msgid "Level"msgstr "Nível"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "Claro"@@ -12494,7 +12492,6 @@ msgstr "Sincronizando"msgid "Syncing your changes"msgstr "Sincronizando suas alterações"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.poindex e0188c1d9..6d296f22a 100644--- a/packages/app/src/locales/ur/messages.po+++ b/packages/app/src/locales/ur/messages.po@@ -4229,7 +4229,6 @@ msgstr "اپنے OpenKnowledge تجربے کو اپنی پسند کے مطابقmsgid "Cut"msgstr "کاٹیں"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "تاریک"@@ -7247,7 +7246,6 @@ msgstr "آئیے سیٹ اپ کرتے ہیں۔"msgid "Level"msgstr "سطح"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "روشن"@@ -12498,7 +12496,6 @@ msgstr "مطابقت پذیری جاری ہے"msgid "Syncing your changes"msgstr "آپ کی تبدیلیاں مطابق کی جا رہی ہیں"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.poindex 50bb02dce..dae80a1c8 100644--- a/packages/app/src/locales/zh-Hans/messages.po+++ b/packages/app/src/locales/zh-Hans/messages.po@@ -4229,7 +4229,6 @@ msgstr "自定义你的 OpenKnowledge 使用体验。"msgid "Cut"msgstr "剪切"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "深色"@@ -7247,7 +7246,6 @@ msgstr "开始设置吧。"msgid "Level"msgstr "级别"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "浅色"@@ -12498,7 +12496,6 @@ msgstr "正在同步"msgid "Syncing your changes"msgstr "正在同步你的更改"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.poindex 257c1199a..0195ecc90 100644--- a/packages/app/src/locales/zh-Hant/messages.po+++ b/packages/app/src/locales/zh-Hant/messages.po@@ -4229,7 +4229,6 @@ msgstr "自訂你的 OpenKnowledge 使用體驗。"msgid "Cut"msgstr "剪下"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Dark"msgstr "深色"@@ -7247,7 +7246,6 @@ msgstr "開始設定吧。"msgid "Level"msgstr "層級"-#: src/components/settings/field-controls.tsx#: src/components/ThemePicker.tsxmsgid "Light"msgstr "淺色"@@ -12498,7 +12496,6 @@ msgstr "正在同步"msgid "Syncing your changes"msgstr "正在同步你的變更"-#: src/components/settings/field-controls.tsx#: src/components/settings/LanguageSelect.tsx#: src/components/ThemePicker.tsxmsgid "System"