fix(settings): the checks the settings redesign left red

The phone's MCP card still read the config fold state that the shared hook
no longer holds, so the client failed to typecheck. The phone keeps its
folded config, so it now holds that state itself.

SettingsColumns takes start and end instead of left and right: the prop
types counted as two physical sides for lint:rtl, and in a right-to-left
language the first column is the right one anyway.

Also: an unused icon import, seven files outside the format baseline run
through Prettier, Routing (de) and Services (fr) confirmed as the same word
as in English, and the size and warning baselines lowered to what the
redesign left (AdminPluginsPanel one wrapped line shorter, two promise
warnings, one long function and two non-null assertions in tests fewer).
This commit is contained in:
Maurice
2026-11-13 23:10:05 +00:00
parent 94ac7673a5
commit a0764b9c96
24 changed files with 49 additions and 83 deletions
+2 -3
View File
@@ -204,8 +204,7 @@ export default function AddonManager({ bagTrackingEnabled, onToggleBagTracking,
/* A card per type, the way every other admin tab sets its cards: Trip in the
left column, Global and Integration in the right one, each card with the
dialogs' head band carrying the type, its count and what it means. Above
them one card says how many are on and finds an addon by name. */
dialogs' head band carrying the type, its count and what it means. */
const groups = [
{ key: 'trip', addons: tripAddons },
{ key: 'global', addons: globalAddons },
@@ -252,5 +251,5 @@ export default function AddonManager({ bagTrackingEnabled, onToggleBagTracking,
)
}
return <SettingsColumns left={cards.start} right={<>{cards.end}{aside}</>} />
return <SettingsColumns start={cards.start} end={<>{cards.end}{aside}</>} />
}
@@ -74,7 +74,7 @@ export default function AdminMcpTokensPanel() {
<div>
{/* The sessions and the tokens side by side: two lists of the same kind. */}
<SettingsColumns
left={<>
start={<>
{/* OAuth Sessions. The tab's own subtitle sits in its band: the sidebar
already names the tab, so a bare heading over the cards only repeated it. */}
<SettingsCard
@@ -120,7 +120,7 @@ export default function AdminMcpTokensPanel() {
)}
</SettingsCard>
</>}
right={<>
end={<>
{/* MCP Tokens */}
<SettingsCard
icon={KeyRound}
@@ -108,7 +108,7 @@ export default function DefaultUserSettingsTab(): React.ReactElement {
return (
<SettingsColumns
left={
start={
<>
<Section title={t('admin.defaultSettings.title')} icon={Settings2} hint={t('admin.defaultSettings.description')}>
@@ -223,7 +223,7 @@ export default function DefaultUserSettingsTab(): React.ReactElement {
)}
</>
}
right={
end={
<Section title={t('settings.map')} icon={MapIcon}>
{/* Map Tile URL */}
<EditorField label={<>{t('settings.mapTemplate')}<ResetButton {...resetOf('map_tile_url')} /></>} hint={t('settings.mapDefaultHint')}>
@@ -92,7 +92,8 @@ function ServiceTile({ allowance }: { allowance: ServiceAllowance }) {
title={`${t('admin.trekApi.quota.remaining')}: ${number.format(quota.remaining)}`}
>
<span className={`font-semibold ${figureTone(quota)}`}>{number.format(quota.used)}</span>
{' / '}{number.format(quota.limit)}
{' / '}
{number.format(quota.limit)}
</span>
</>
)}
@@ -124,11 +124,7 @@ function InstanceConnection({ A }: { A: AiAdmin }) {
<AiConnectPanel scope="instance" onConnected={onConnected} prefill={connection?.prefill ?? null} />
)}
{replacing && (
<button
type="button"
onClick={cancelReplace}
className={`${SETTINGS_BUTTON} self-start`}
>
<button type="button" onClick={cancelReplace} className={`${SETTINGS_BUTTON} self-start`}>
{t('common.cancel')}
</button>
)}
@@ -160,12 +160,7 @@ function LocalModels({ P }: { P: Parsing }) {
</span>
{m.recommended && <StatusPill tone="success">{t('assistant.model.recommended')}</StatusPill>}
{here ? (
<button
type="button"
onClick={() => P.setModel(m.id)}
disabled={chosen}
className={SETTINGS_BUTTON}
>
<button type="button" onClick={() => P.setModel(m.id)} disabled={chosen} className={SETTINGS_BUTTON}>
{chosen ? <Check size={13} strokeWidth={2.4} /> : null}
{t(chosen ? 'admin.addons.ai.parsing.selected' : 'admin.addons.ai.parsing.use')}
</button>
@@ -138,7 +138,7 @@ export default function AdminStoragePanel(): React.ReactElement {
{/* Two columns by length: the health and the backends on the left, which
category goes where on the right, its save bar at the card's foot. */}
<SettingsColumns
left={<>
start={<>
<Section title={t('storage.health.title')} icon={Activity}>
{state.health.replicaFailures.length === 0 ? (
<p className="m-0 flex items-center gap-2 text-content-muted" style={fs(12.5, 'body')}>
@@ -493,7 +493,7 @@ export default function AdminStoragePanel(): React.ReactElement {
onDelete={(enabled) => void handleReclaimDelete(enabled)}
/>
</>}
right={<>
end={<>
<Section title={t('storage.categories.title')} icon={FolderTree}>
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2">
{STORAGE_CATEGORIES.map((category) => {
@@ -47,12 +47,7 @@ export default function StorageReclaimSection({
icon={Eraser}
hint={t('storage.reclaim.hint')}
action={
<button
type="button"
className={SETTINGS_BUTTON}
onClick={onCheck}
disabled={checking}
>
<button type="button" className={SETTINGS_BUTTON} onClick={onCheck} disabled={checking}>
{checking ? (
<Loader2 size={14} strokeWidth={2.2} className="animate-spin" />
) : (