From 9d249b97df62d82268908e63fdd09632ea56f16f Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 19 Sep 2026 16:14:27 -0700 Subject: [PATCH] fix(ci): restore editor line budget --- src/renderer/src/components/editor/DiffViewer.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/components/editor/DiffViewer.tsx b/src/renderer/src/components/editor/DiffViewer.tsx index 01a7db0ca5c..72bbdc08021 100644 --- a/src/renderer/src/components/editor/DiffViewer.tsx +++ b/src/renderer/src/components/editor/DiffViewer.tsx @@ -29,6 +29,7 @@ import { buildDiffEditorHideUnchangedOptions } from './diff-editor-hide-unchange import { useDiffEditorRegistration } from './diff-navigation-context' import { preserveDiffViewStateAcrossModelSwaps } from './diff-model-swap-view-state' import { monacoFindOptions } from './monaco-find-options' +import { resolveDocumentTheme } from '@/lib/document-theme' export default function DiffViewer({ modelKey, @@ -66,11 +67,8 @@ export default function DiffViewer({ () => (allDiffComments ?? []).filter((c) => c.filePath === relativePath && isDiffComment(c)), [allDiffComments, relativePath] ) - const terminalFontSize = settings?.terminalFontSize ?? 13 - const diffEditorFontSize = computeDiffEditorFontSize(terminalFontSize, editorFontZoomLevel) - const isDark = - settings?.theme === 'dark' || - (settings?.theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches) + const terminalFontSize = settings?.terminalFontSize ?? 13, + diffEditorFontSize = computeDiffEditorFontSize(terminalFontSize, editorFontZoomLevel) const diffEditorRef = useRef(null) const { registerDiffEditor, unregisterDiffEditor } = useDiffEditorRegistration() @@ -411,7 +409,7 @@ export default function DiffViewer({ language={language} original={originalContent} modified={modifiedContent} - theme={isDark ? 'vs-dark' : 'vs'} + theme={resolveDocumentTheme(settings?.theme ?? 'light') ? 'vs-dark' : 'vs'} onMount={handleMount} // Why: key models by tab identity and preserve the modified undo stack across Changes-mode HEAD rotations. originalModelPath={currentDiffModelPaths.originalModelPath}