The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(settings): add language selection to appearance panel
Steven Enamakelcc5c3188b461
diff --git a/app/src/components/settings/panels/AppearancePanel.tsx b/app/src/components/settings/panels/AppearancePanel.tsxindex a8696caf3b..3b5f68d506 100644--- a/app/src/components/settings/panels/AppearancePanel.tsx+++ b/app/src/components/settings/panels/AppearancePanel.tsx@@ -1,6 +1,7 @@import { useState } from 'react';import { useLocation, useNavigate } from 'react-router-dom';+import { cn } from '../../../lib/cn';import { useT } from '../../../lib/i18n/I18nContext';import { useAppDispatch, useAppSelector } from '../../../store/hooks';import {@@ -12,7 +13,6 @@ import {setCustomFontSizePx,setFontSize,} from '../../../store/themeSlice';-import { cn } from '../../../lib/cn';import LanguageSelect from '../../LanguageSelect';import { Card, Field, Slider } from '../../ui';import { SettingsNumberField } from '../controls';@@ -103,98 +103,98 @@ const AppearancePanel = () => {const general = (<>- <ThemeStudioPanel embedded part="gallery" />+ <ThemeStudioPanel embedded part="gallery" />- <Card- title={t('settings.appearance.fontSizeHeading')}- description={t('settings.appearance.fontSizeHelperText')}- data-testid="font-size-card">- {/* Card forwards no `role`/`aria-label` to its wrapper, so the+ <Card+ title={t('settings.appearance.fontSizeHeading')}+ description={t('settings.appearance.fontSizeHelperText')}+ data-testid="font-size-card">+ {/* Card forwards no `role`/`aria-label` to its wrapper, so theradiogroup semantics sit on an inner div that encloses everyoption — `within(group)` in the specs resolves the same. */}- <div- role="radiogroup"- aria-label={t('settings.appearance.fontSizeAria')}- className="grid grid-cols-2 gap-2 p-4 sm:grid-cols-4">- {FONT_SIZE_OPTIONS.map(opt => {- // Highlight the preset whose px matches the effective size, so a- // fine-tuned value landing exactly on a preset still lights it up.- const selected = Number.parseInt(FONT_SIZE_PX[opt.id], 10) === effectiveFontSizePx;- return (- <button- key={opt.id}- type="button"- role="radio"- aria-checked={selected}- title={opt.description}- onClick={() => dispatch(setFontSize(opt.id))}+ <div+ role="radiogroup"+ aria-label={t('settings.appearance.fontSizeAria')}+ className="grid grid-cols-2 gap-2 p-4 sm:grid-cols-4">+ {FONT_SIZE_OPTIONS.map(opt => {+ // Highlight the preset whose px matches the effective size, so a+ // fine-tuned value landing exactly on a preset still lights it up.+ const selected = Number.parseInt(FONT_SIZE_PX[opt.id], 10) === effectiveFontSizePx;+ return (+ <button+ key={opt.id}+ type="button"+ role="radio"+ aria-checked={selected}+ title={opt.description}+ onClick={() => dispatch(setFontSize(opt.id))}+ className={cn(+ 'flex flex-col items-center gap-1.5 rounded-xl border px-3 py-3 transition-colors',+ 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary-500/25',+ selected+ ? 'border-primary-500 bg-primary-50 ring-1 ring-primary-500 dark:bg-primary-500/10'+ : 'border-line hover:bg-surface-hover'+ )}>+ <spanclassName={cn(- 'flex flex-col items-center gap-1.5 rounded-xl border px-3 py-3 transition-colors',- 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary-500/25',- selected- ? 'border-primary-500 bg-primary-50 ring-1 ring-primary-500 dark:bg-primary-500/10'- : 'border-line hover:bg-surface-hover'- )}>- <span- className={cn(- 'flex h-9 items-end font-semibold leading-none',- opt.glyphClass,- selected ? 'text-primary-500' : 'text-content-secondary'- )}- aria-hidden>- Aa- </span>- <span className="text-xs font-medium text-content">{opt.label}</span>- </button>- );- })}- </div>+ 'flex h-9 items-end font-semibold leading-none',+ opt.glyphClass,+ selected ? 'text-primary-500' : 'text-content-secondary'+ )}+ aria-hidden>+ Aa+ </span>+ <span className="text-xs font-medium text-content">{opt.label}</span>+ </button>+ );+ })}+ </div>- {/* Fine-tune the exact size beyond the presets (issue #4246). */}- <div className="px-4 py-3">- <div className="flex items-center justify-between gap-3">- <label htmlFor="font-size-custom-number" className="text-sm font-medium text-content">- {t('settings.appearance.fontSizeCustomLabel')}- </label>- <SettingsNumberField- id="font-size-custom-number"- value={pxDraft}- onChange={setPxDraft}- onCommit={commitCustomFontSize}- unit={t('settings.appearance.fontSizeUnit')}- min={MIN_FONT_SIZE_PX}- max={MAX_FONT_SIZE_PX}- aria-label={t('settings.appearance.fontSizeCustomAria')}- data-testid="font-size-custom-number"- />- </div>- <Slider- id="font-size-slider"+ {/* Fine-tune the exact size beyond the presets (issue #4246). */}+ <div className="px-4 py-3">+ <div className="flex items-center justify-between gap-3">+ <label htmlFor="font-size-custom-number" className="text-sm font-medium text-content">+ {t('settings.appearance.fontSizeCustomLabel')}+ </label>+ <SettingsNumberField+ id="font-size-custom-number"+ value={pxDraft}+ onChange={setPxDraft}+ onCommit={commitCustomFontSize}+ unit={t('settings.appearance.fontSizeUnit')}min={MIN_FONT_SIZE_PX}max={MAX_FONT_SIZE_PX}- step={1}- value={[effectiveFontSizePx]}- onValueChange={handleFontSizeSlider}- thumbLabels={[t('settings.appearance.fontSizeCustomSliderAria')]}- aria-valuetext={`${effectiveFontSizePx}${t('settings.appearance.fontSizeUnit')}`}- className="mt-3"- data-testid="font-size-slider"+ aria-label={t('settings.appearance.fontSizeCustomAria')}+ data-testid="font-size-custom-number"/>- <div className="mt-1 flex items-center justify-between text-[11px] text-content-faint">- <span>{`${MIN_FONT_SIZE_PX}${t('settings.appearance.fontSizeUnit')}`}</span>- <span>{`${MAX_FONT_SIZE_PX}${t('settings.appearance.fontSizeUnit')}`}</span>- </div></div>- </Card>-- {/* Display language (moved from the old settings home list). */}- <Card>- <Field- label={t('settings.language')}- description={t('settings.languageDesc')}- control={<LanguageSelect ariaLabel={t('settings.language')} />}+ <Slider+ id="font-size-slider"+ min={MIN_FONT_SIZE_PX}+ max={MAX_FONT_SIZE_PX}+ step={1}+ value={[effectiveFontSizePx]}+ onValueChange={handleFontSizeSlider}+ thumbLabels={[t('settings.appearance.fontSizeCustomSliderAria')]}+ aria-valuetext={`${effectiveFontSizePx}${t('settings.appearance.fontSizeUnit')}`}+ className="mt-3"+ data-testid="font-size-slider"/>- </Card>+ <div className="mt-1 flex items-center justify-between text-[11px] text-content-faint">+ <span>{`${MIN_FONT_SIZE_PX}${t('settings.appearance.fontSizeUnit')}`}</span>+ <span>{`${MAX_FONT_SIZE_PX}${t('settings.appearance.fontSizeUnit')}`}</span>+ </div>+ </div>+ </Card>++ {/* Display language (moved from the old settings home list). */}+ <Card>+ <Field+ label={t('settings.language')}+ description={t('settings.languageDesc')}+ control={<LanguageSelect ariaLabel={t('settings.language')} />}+ />+ </Card></>);diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.tsindex 17b7d9c20a..74320a9b74 100644--- a/app/src/lib/i18n/de.ts+++ b/app/src/lib/i18n/de.ts@@ -4707,7 +4707,8 @@ const messages: TranslationMap = {'Verwalte deine BIP39-Wiederherstellungsphrase für Verschlüsselung und Wallet-Zugriff','pages.settings.account.team': 'Team','pages.settings.account.teamDesc': 'Verwalte dein Team, deine Mitglieder und Einladungen',- 'pages.settings.accountSection.description': 'Dein Profil, dein Tarif und deine Sitzung auf diesem Gerät.',+ 'pages.settings.accountSection.description':+ 'Dein Profil, dein Tarif und deine Sitzung auf diesem Gerät.','pages.settings.accountSection.title': 'Konto','pages.settings.ai.llm': 'LLM','pages.settings.ai.llmDesc': 'Sprachmodell-Anbieter und Routing',diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.tsindex a8cbf57ec4..8fd8d7721d 100644--- a/app/src/lib/i18n/fr.ts+++ b/app/src/lib/i18n/fr.ts@@ -4686,7 +4686,8 @@ const messages: TranslationMap = {'pages.settings.account.recoveryPhraseDesc': 'Description de la phrase de récupération','pages.settings.account.team': 'Équipe','pages.settings.account.teamDesc': "Description de l'équipe",- 'pages.settings.accountSection.description': 'Votre profil, votre forfait et votre session sur cet appareil.',+ 'pages.settings.accountSection.description':+ 'Votre profil, votre forfait et votre session sur cet appareil.','pages.settings.accountSection.title': 'Compte','pages.settings.ai.llm': 'LLM','pages.settings.ai.llmDesc': 'Description du LLM',diff --git a/app/src/lib/i18n/it.ts b/app/src/lib/i18n/it.tsindex 81f64cf165..2d4bcaed17 100644--- a/app/src/lib/i18n/it.ts+++ b/app/src/lib/i18n/it.ts@@ -4656,7 +4656,8 @@ const messages: TranslationMap = {'pages.settings.account.recoveryPhraseDesc': 'Descrizione frase di recupero','pages.settings.account.team': 'Team','pages.settings.account.teamDesc': 'Descrizione team',- 'pages.settings.accountSection.description': 'Il tuo profilo, il piano e la sessione su questo dispositivo.',+ 'pages.settings.accountSection.description':+ 'Il tuo profilo, il piano e la sessione su questo dispositivo.','pages.settings.accountSection.title': 'Account','pages.settings.ai.llm': 'LLM','pages.settings.ai.llmDesc': 'Descrizione LLM',