fix(settings): let fixed-width controls scale with font size and density

Merge main and resolve conflicts in RemoteInstancesPage.tsx (re-applied
the width bumps by hand at their current locations) and
KeyboardShortcutsSettings.tsx (dropped the PR's hunk entirely: main
replaced that fixed-width input with ShortcutRecordingDialog, which has
no equivalent clipping at 200% interface font size).

Closes #2320
This commit is contained in:
Bohdan Triapitsyn
2026-08-28 23:45:12 +03:00
1264 changed files with 107929 additions and 30301 deletions
@@ -21,7 +21,7 @@ import {
} from '@/lib/responseStyle';
import type { DesktopSettings } from '@/lib/desktop';
import { runtimeFetch } from '@/lib/runtime-fetch';
import { reloadOpenCodeConfiguration } from '@/stores/useAgentsStore';
import { noteDeferredRestartFromPayload, recordDeferredOpenCodeRestart } from '@/lib/opencode/deferredRestart';
import { SettingsPageLayout } from '@/components/sections/shared/SettingsPageLayout';
import {
SettingsSection,
@@ -243,13 +243,20 @@ export const BehaviorPage: React.FC = () => {
throw new Error(await readApiError(response, t('settings.behavior.page.toast.saveFailed')));
}
const payload = await response.json().catch(() => null);
const deferred = noteDeferredRestartFromPayload(payload, 'behavior', { id: 'agents-md' });
await saveBehaviorSetting({
globalBehaviorPrompt: content,
}, t('settings.behavior.page.toast.saveFailed'));
setPrompt(content);
setInitialPrompt(content);
toast.success(t('settings.behavior.page.toast.saved'));
toast.success(
deferred
? t('settings.view.pendingRestart.saved')
: t('settings.behavior.page.toast.saved'),
);
} catch (error) {
console.error('Failed to save behavior:', error);
const message = error instanceof Error ? error.message : t('settings.behavior.page.toast.saveFailed');
@@ -267,19 +274,8 @@ export const BehaviorPage: React.FC = () => {
t('settings.behavior.page.toast.saveFailed'),
);
setInitialOptimizeSystemPrompt(optimizeSystemPrompt);
} catch (error) {
const message = error instanceof Error ? error.message : t('settings.behavior.page.toast.saveFailed');
toast.error(message);
setIsApplyingPromptOptimization(false);
return;
}
try {
await reloadOpenCodeConfiguration({
message: t('settings.behavior.page.systemPromptOptimization.restarting'),
mode: 'projects',
scopes: ['all'],
});
recordDeferredOpenCodeRestart('behavior', { id: 'optimize-system-prompt' });
toast.success(t('settings.view.pendingRestart.saved'));
} catch (error) {
const message = error instanceof Error ? error.message : t('settings.behavior.page.toast.saveFailed');
toast.error(message);
@@ -318,7 +314,7 @@ export const BehaviorPage: React.FC = () => {
>
{isApplyingPromptOptimization
? t('settings.common.actions.saving')
: t('settings.openchamber.opencodeCli.actions.saveAndReload')}
: t('settings.common.actions.saveChanges')}
</Button>
</SettingsSection>
)}