From 674ce9137347194934b5a8f41e47c975cc08bb68 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Sat, 1 Nov 2025 19:48:57 +0000 Subject: [PATCH 1/2] Fix light mode diff editor showing dark mode editor --- components/file-diff-viewer.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/components/file-diff-viewer.tsx b/components/file-diff-viewer.tsx index 99f66730..42b2fbe1 100644 --- a/components/file-diff-viewer.tsx +++ b/components/file-diff-viewer.tsx @@ -195,7 +195,9 @@ export function FileDiffViewer({ return null } - file.initTheme(mounted ? theme : 'light') + // Initialize with the current theme + const currentTheme = mounted ? theme : 'light' + file.initTheme(currentTheme) // Wrap file.init() in try-catch to handle diff parsing errors try { @@ -219,6 +221,13 @@ export function FileDiffViewer({ } }, [diffData, mounted, theme, viewMode]) + // Re-initialize theme when it changes + useEffect(() => { + if (diffFile && mounted) { + diffFile.initTheme(theme) + } + }, [diffFile, theme, mounted]) + if (!selectedFile) { // Don't show "No file selected" during initial loading if (isInitialLoading) { @@ -271,7 +280,7 @@ export function FileDiffViewer({ return (
-
📦
+
??

Binary File

This is binary content and cannot be displayed

From 1bda0c22cb3f669b1e6f55e9163837e65d110581 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Sat, 1 Nov 2025 20:01:19 +0000 Subject: [PATCH 2/2] Fix cursor agent follow-up bug --- components/file-diff-viewer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/file-diff-viewer.tsx b/components/file-diff-viewer.tsx index 42b2fbe1..ba00ce00 100644 --- a/components/file-diff-viewer.tsx +++ b/components/file-diff-viewer.tsx @@ -378,9 +378,9 @@ export function FileDiffViewer({ try { return ( -
+